org.hibernate.mapping.Property.isLazy()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(9.4k)|赞(0)|评价(0)|浏览(166)

本文整理了Java中org.hibernate.mapping.Property.isLazy()方法的一些代码示例,展示了Property.isLazy()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.isLazy()方法的具体详情如下:
包路径:org.hibernate.mapping.Property
类名称:Property
方法名:isLazy

Property.isLazy介绍

暂无

代码示例

代码示例来源:origin: hibernate/hibernate-orm

public boolean isLazy() {
  Iterator iter = getPropertyIterator();
  while ( iter.hasNext() ) {
    Property prop = (Property) iter.next();
    if ( !prop.isLazy() ) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: hibernate/hibernate-orm

i++;
final Property property = (Property) itr.next();
if ( property.isLazy() ) {
  final LazyAttributeDescriptor lazyAttributeDescriptor = LazyAttributeDescriptor.from( property, i, x++ );
  lazyAttributeDescriptorMap.put( lazyAttributeDescriptor.getName(), lazyAttributeDescriptor );

代码示例来源:origin: hibernate/hibernate-orm

propertyColumnAliases[i] = colAliases;
if ( lazyAvailable && prop.isLazy() ) {
  lazyNames.add( prop.getName() );
  lazyNumbers.add( i );
int[] formnos = new int[prop.getColumnSpan()];
int l = 0;
Boolean lazy = Boolean.valueOf( prop.isLazy() && lazyAvailable );
while ( colIter.hasNext() ) {
  Selectable thing = (Selectable) colIter.next();

代码示例来源:origin: hibernate/hibernate-orm

/**
 * @deprecated See mainly {@link #buildEntityBasedAttribute}
 */
@Deprecated
public static StandardProperty buildStandardProperty(Property property, boolean lazyAvailable) {
  final Type type = property.getValue().getType();
  // we need to dirty check collections, since they can cause an owner
  // version number increment
  // we need to dirty check many-to-ones with not-found="ignore" in order
  // to update the cache (not the database), since in this case a null
  // entity reference can lose information
  boolean alwaysDirtyCheck = type.isAssociationType() &&
      ( (AssociationType) type ).isAlwaysDirtyChecked();
  return new StandardProperty(
      property.getName(),
      type,
      lazyAvailable && property.isLazy(),
      property.isInsertable(),
      property.isUpdateable(),
      property.getValueGenerationStrategy(),
      property.isOptional(),
      alwaysDirtyCheck || property.isUpdateable(),
      property.isOptimisticLocked(),
      property.getCascadeStyle(),
      property.getValue().getFetchMode()
  );
}

代码示例来源:origin: hibernate/hibernate-orm

boolean lazy = prop.isLazy() && bytecodeEnhancementMetadata.isEnhancedForLazyLoading();
if ( lazy ) {
  hasLazy = true;

代码示例来源:origin: hibernate/hibernate-orm

/**
 * create a property copy reusing the same value
 */
public static Property shallowCopy(Property property) {
  Property clone = new Property();
  clone.setCascade( property.getCascade() );
  clone.setInsertable( property.isInsertable() );
  clone.setLazy( property.isLazy() );
  clone.setName( property.getName() );
  clone.setNaturalIdentifier( property.isNaturalIdentifier() );
  clone.setOptimisticLocked( property.isOptimisticLocked() );
  clone.setOptional( property.isOptional() );
  clone.setPersistentClass( property.getPersistentClass() );
  clone.setPropertyAccessorName( property.getPropertyAccessorName() );
  clone.setSelectable( property.isSelectable() );
  clone.setUpdateable( property.isUpdateable() );
  clone.setValue( property.getValue() );
  return clone;
}

代码示例来源:origin: hibernate/hibernate-orm

);
boolean lazy = lazyAvailable && property.isLazy();

代码示例来源:origin: hibernate/hibernate-orm

type,
new BaselineAttributeInformation.Builder()
    .setLazy( lazyAvailable && property.isLazy() )
    .setInsertable( property.isInsertable() )
    .setUpdateable( property.isUpdateable() )
(CompositeType) type,
new BaselineAttributeInformation.Builder()
    .setLazy( lazyAvailable && property.isLazy() )
    .setInsertable( property.isInsertable() )
    .setUpdateable( property.isUpdateable() )
(AssociationType) type,
new BaselineAttributeInformation.Builder()
    .setLazy( lazyAvailable && property.isLazy() )
    .setInsertable( property.isInsertable() )
    .setUpdateable( property.isUpdateable() )

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public boolean isLazy() {
  Iterator iter = getPropertyIterator();
  while ( iter.hasNext() ) {
    Property prop = (Property) iter.next();
    if ( !prop.isLazy() ) return false;
  }
  return true;
}

代码示例来源:origin: org.hibernate.orm/hibernate-core

public boolean isLazy() {
  Iterator iter = getPropertyIterator();
  while ( iter.hasNext() ) {
    Property prop = (Property) iter.next();
    if ( !prop.isLazy() ) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

public boolean isLazy() {
  Iterator iter = getPropertyIterator();
  while ( iter.hasNext() ) {
    Property prop = (Property) iter.next();
    if ( !prop.isLazy() ) return false;
  }
  return true;
}

代码示例来源:origin: hibernate/hibernate

public boolean isLazy() {
  Iterator iter = getPropertyIterator();
  while ( iter.hasNext() ) {
    Property prop = (Property) iter.next();
    if ( !prop.isLazy() ) return false;
  }
  return true;
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public boolean isLazy() {
  Iterator iter = getPropertyIterator();
  while ( iter.hasNext() ) {
    Property prop = (Property) iter.next();
    if ( !prop.isLazy() ) return false;
  }
  return true;
}

代码示例来源:origin: org.hibernate/hibernate-annotations

/**
 * create a property copy reusing the same value
 */
public static Property shallowCopy(Property property) {
  Property clone = new Property();
  clone.setCascade( property.getCascade() );
  clone.setInsertable( property.isInsertable() );
  clone.setLazy( property.isLazy() );
  clone.setName( property.getName() );
  clone.setNodeName( property.getNodeName() );
  clone.setNaturalIdentifier( property.isNaturalIdentifier() );
  clone.setOptimisticLocked( property.isOptimisticLocked() );
  clone.setOptional( property.isOptional() );
  clone.setPersistentClass( property.getPersistentClass() );
  clone.setPropertyAccessorName( property.getPropertyAccessorName() );
  clone.setSelectable( property.isSelectable() );
  clone.setUpdateable( property.isUpdateable() );
  clone.setValue( property.getValue() );
  return clone;
}

代码示例来源:origin: org.hibernate/hibernate-tools

public String getFetchType(Property property) {
  Value value = property.getValue();
  String fetchType = importType( "javax.persistence.FetchType");
  boolean lazy = false;
  if ( value instanceof ToOne ) {
    lazy = ( (ToOne) value ).isLazy();
  }
  else if ( value instanceof Collection ) {
    lazy = ( (Collection) value ).isLazy();
  }
  else {
    //we're not collection neither *toone so we are looking for property fetching
    lazy = property.isLazy();
  }
  if ( lazy ) {
    return fetchType + "." + "LAZY";
  }
  else {
    return fetchType + "." + "EAGER";
  }
}

代码示例来源:origin: hibernate/hibernate-tools

public String getFetchType(Property property) {
  Value value = property.getValue();
  String fetchType = importType( "javax.persistence.FetchType");
  boolean lazy = false;
  if ( value instanceof ToOne ) {
    lazy = ( (ToOne) value ).isLazy();
  }
  else if ( value instanceof Collection ) {
    lazy = ( (Collection) value ).isLazy();
  }
  else {
    //we're not collection neither *toone so we are looking for property fetching
    lazy = property.isLazy();
  }
  if ( lazy ) {
    return fetchType + "." + "LAZY";
  }
  else {
    return fetchType + "." + "EAGER";
  }
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

/**
 * create a property copy reusing the same value
 */
public static Property shallowCopy(Property property) {
  Property clone = new Property();
  clone.setCascade( property.getCascade() );
  clone.setInsertable( property.isInsertable() );
  clone.setLazy( property.isLazy() );
  clone.setName( property.getName() );
  clone.setNaturalIdentifier( property.isNaturalIdentifier() );
  clone.setOptimisticLocked( property.isOptimisticLocked() );
  clone.setOptional( property.isOptional() );
  clone.setPersistentClass( property.getPersistentClass() );
  clone.setPropertyAccessorName( property.getPropertyAccessorName() );
  clone.setSelectable( property.isSelectable() );
  clone.setUpdateable( property.isUpdateable() );
  clone.setValue( property.getValue() );
  return clone;
}

代码示例来源:origin: org.hibernate.orm/hibernate-core

public Property shallowCopy() {
    Property clone = new Property( context );
    clone.setCascade( getCascade() );
    clone.setInsertable( isInsertable() );
    clone.setLazy( isLazy() );
    clone.setName( getName() );
    clone.setNaturalIdentifier( isNaturalIdentifier() );
    clone.setOptimisticLocked( isOptimisticLocked() );
    clone.setOptional( isOptional() );
    clone.setPersistentClass( (PersistentClass) getEntity() );
    clone.setPropertyAccessorName( getPropertyAccessorName() );
    clone.setSelectable( isSelectable() );
    clone.setUpdateable( isUpdateable() );
    clone.setValue( getValue() );
    return clone;
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

/**
 * create a property copy reusing the same value
 */
public static Property shallowCopy(Property property) {
  Property clone = new Property();
  clone.setCascade( property.getCascade() );
  clone.setInsertable( property.isInsertable() );
  clone.setLazy( property.isLazy() );
  clone.setName( property.getName() );
  clone.setNodeName( property.getNodeName() );
  clone.setNaturalIdentifier( property.isNaturalIdentifier() );
  clone.setOptimisticLocked( property.isOptimisticLocked() );
  clone.setOptional( property.isOptional() );
  clone.setPersistentClass( property.getPersistentClass() );
  clone.setPropertyAccessorName( property.getPropertyAccessorName() );
  clone.setSelectable( property.isSelectable() );
  clone.setUpdateable( property.isUpdateable() );
  clone.setValue( property.getValue() );
  return clone;
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

/**
 * create a property copy reusing the same value
 */
public static Property shallowCopy(Property property) {
  Property clone = new Property();
  clone.setCascade( property.getCascade() );
  clone.setInsertable( property.isInsertable() );
  clone.setLazy( property.isLazy() );
  clone.setName( property.getName() );
  clone.setNodeName( property.getNodeName() );
  clone.setNaturalIdentifier( property.isNaturalIdentifier() );
  clone.setOptimisticLocked( property.isOptimisticLocked() );
  clone.setOptional( property.isOptional() );
  clone.setPersistentClass( property.getPersistentClass() );
  clone.setPropertyAccessorName( property.getPropertyAccessorName() );
  clone.setSelectable( property.isSelectable() );
  clone.setUpdateable( property.isUpdateable() );
  clone.setValue( property.getValue() );
  return clone;
}

相关文章

微信公众号

最新文章

更多