private static CascadeStyle getCompositeCascadeStyle(CompositeType compositeType, String cascade) { if ( compositeType.isAnyType() ) { return getCascadeStyle( cascade ); } int length = compositeType.getSubtypes().length; for ( int i=0; i<length; i++ ) { if ( compositeType.getCascadeStyle(i) != CascadeStyles.NONE ) { return CascadeStyles.ALL; } } return getCascadeStyle( cascade ); }
private static CascadeStyle getCollectionCascadeStyle(Type elementType, String cascade) { if ( elementType.isComponentType() ) { return getCompositeCascadeStyle( (CompositeType) elementType, cascade ); } else { return getCascadeStyle( cascade ); } }
public CascadeStyle getCascadeStyle() throws MappingException { Type type = value.getType(); if ( type.isComponentType() ) { return getCompositeCascadeStyle( (CompositeType) type, cascade ); } else if ( type.isCollectionType() ) { return getCollectionCascadeStyle( ( (Collection) value ).getElement().getType(), cascade ); } else { return getCascadeStyle( cascade ); } }
cascades.add( prop.getCascadeStyle() );
/** * @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() ); }
.setDirtyCheckable( property.isUpdateable() && !lazy ) .setVersionable( property.isOptimisticLocked() ) .setCascadeStyle( property.getCascadeStyle() ) .createInformation(), unsavedValue
.setDirtyCheckable( alwaysDirtyCheck || property.isUpdateable() ) .setVersionable( property.isOptimisticLocked() ) .setCascadeStyle( property.getCascadeStyle() ) .setFetchMode( property.getValue().getFetchMode() ) .createInformation() .setDirtyCheckable( alwaysDirtyCheck || property.isUpdateable() ) .setVersionable( property.isOptimisticLocked() ) .setCascadeStyle( property.getCascadeStyle() ) .setFetchMode( property.getValue().getFetchMode() ) .createInformation() .setDirtyCheckable( alwaysDirtyCheck || property.isUpdateable() ) .setVersionable( property.isOptimisticLocked() ) .setCascadeStyle( property.getCascadeStyle() ) .setFetchMode( property.getValue().getFetchMode() ) .createInformation()
private static CascadeStyle getCompositeCascadeStyle(CompositeType compositeType, String cascade) { if ( compositeType.isAnyType() ) { return getCascadeStyle( cascade ); } int length = compositeType.getSubtypes().length; for ( int i=0; i<length; i++ ) { if ( compositeType.getCascadeStyle(i) != CascadeStyle.NONE ) { return CascadeStyle.ALL; } } return getCascadeStyle( cascade ); }
private static CascadeStyle getCompositeCascadeStyle(CompositeType compositeType, String cascade) { if ( compositeType.isAnyType() ) { return getCascadeStyle( cascade ); } int length = compositeType.getSubtypes().length; for ( int i=0; i<length; i++ ) { if ( compositeType.getCascadeStyle(i) != CascadeStyle.NONE ) { return CascadeStyle.ALL; } } return getCascadeStyle( cascade ); }
private static CascadeStyle getCollectionCascadeStyle(Type elementType, String cascade) { if ( elementType.isComponentType() ) { return getCompositeCascadeStyle( (CompositeType) elementType, cascade ); } else { return getCascadeStyle( cascade ); } }
private static CascadeStyle getCollectionCascadeStyle(Type elementType, String cascade) { if ( elementType.isComponentType() ) { return getCompositeCascadeStyle( (CompositeType) elementType, cascade ); } else { return getCascadeStyle( cascade ); } }
public CascadeStyle getCascadeStyle() throws MappingException { Type type = value.getType(); if ( type.isComponentType() ) { return getCompositeCascadeStyle( (CompositeType) type, cascade ); } else if ( type.isCollectionType() ) { return getCollectionCascadeStyle( ( (Collection) value ).getElement().getType(), cascade ); } else { return getCascadeStyle( cascade ); } }
public CascadeStyle getCascadeStyle() throws MappingException { Type type = value.getType(); if ( type.isComponentType() ) { return getCompositeCascadeStyle( (CompositeType) type, cascade ); } else if ( type.isCollectionType() ) { return getCollectionCascadeStyle( ( (Collection) value ).getElement().getType(), cascade ); } else { return getCascadeStyle( cascade ); } }
names[j] = prop.getName(); types[j] = prop.getType(); cascade[j] = prop.getCascadeStyle(); joinedFetch[j] = prop.getValue().getFetchMode(); nullabilities[j] = prop.isNullable();
cascades.add( prop.getCascadeStyle() );
cascades.add( prop.getCascadeStyle() );
cascades.add( prop.getCascadeStyle() );