public boolean isLazy() { Iterator iter = getPropertyIterator(); while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( !prop.isLazy() ) { return false; } } return true; }
i++; final Property property = (Property) itr.next(); if ( property.isLazy() ) { final LazyAttributeDescriptor lazyAttributeDescriptor = LazyAttributeDescriptor.from( property, i, x++ ); lazyAttributeDescriptorMap.put( lazyAttributeDescriptor.getName(), lazyAttributeDescriptor );
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();
/** * @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() ); }
boolean lazy = prop.isLazy() && bytecodeEnhancementMetadata.isEnhancedForLazyLoading(); if ( lazy ) { hasLazy = true;
/** * 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; }
); boolean lazy = lazyAvailable && property.isLazy();
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() )
public boolean isLazy() { Iterator iter = getPropertyIterator(); while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( !prop.isLazy() ) return false; } return true; }
public boolean isLazy() { Iterator iter = getPropertyIterator(); while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( !prop.isLazy() ) { return false; } } return true; }
public boolean isLazy() { Iterator iter = getPropertyIterator(); while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( !prop.isLazy() ) return false; } return true; }
public boolean isLazy() { Iterator iter = getPropertyIterator(); while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( !prop.isLazy() ) return false; } return true; }
public boolean isLazy() { Iterator iter = getPropertyIterator(); while ( iter.hasNext() ) { Property prop = (Property) iter.next(); if ( !prop.isLazy() ) return false; } return true; }
/** * 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; }
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"; } }
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"; } }
/** * 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; }
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; } }
/** * 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; }
/** * 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; }