Methods Summary |
---|
private org.hibernate.engine.ValueInclusion | determineInsertValueGenerationType(org.hibernate.mapping.Property mappingProperty, org.hibernate.tuple.StandardProperty runtimeProperty)
if ( runtimeProperty.isInsertGenerated() ) {
return ValueInclusion.FULL;
}
else if ( mappingProperty.getValue() instanceof Component ) {
if ( hasPartialInsertComponentGeneration( ( Component ) mappingProperty.getValue() ) ) {
return ValueInclusion.PARTIAL;
}
}
return ValueInclusion.NONE;
|
private org.hibernate.engine.ValueInclusion | determineUpdateValueGenerationType(org.hibernate.mapping.Property mappingProperty, org.hibernate.tuple.StandardProperty runtimeProperty)
if ( runtimeProperty.isUpdateGenerated() ) {
return ValueInclusion.FULL;
}
else if ( mappingProperty.getValue() instanceof Component ) {
if ( hasPartialUpdateComponentGeneration( ( Component ) mappingProperty.getValue() ) ) {
return ValueInclusion.PARTIAL;
}
}
return ValueInclusion.NONE;
|
public org.hibernate.engine.CascadeStyle[] | getCascadeStyles()
return cascadeStyles;
|
public org.hibernate.type.EntityType | getEntityType()
return entityType;
|
public org.hibernate.tuple.IdentifierProperty | getIdentifierProperty()
return identifierProperty;
|
public java.lang.String | getName()
return name;
|
public int[] | getNaturalIdentifierProperties()
return naturalIdPropertyNumbers;
|
public boolean[] | getNonlazyPropertyUpdateability()
return nonlazyPropertyUpdateability;
|
public int | getOptimisticLockMode()
return optimisticLockMode;
|
public org.hibernate.tuple.StandardProperty[] | getProperties()
return properties;
|
public boolean[] | getPropertyCheckability()
return propertyCheckability;
|
public int | getPropertyIndex(java.lang.String propertyName)
Integer index = getPropertyIndexOrNull(propertyName);
if ( index == null ) {
throw new HibernateException("Unable to resolve property: " + propertyName);
}
return index.intValue();
|
public java.lang.Integer | getPropertyIndexOrNull(java.lang.String propertyName)
return (Integer) propertyIndexes.get( propertyName );
|
public org.hibernate.engine.ValueInclusion[] | getPropertyInsertGenerationInclusions()
return insertInclusions;
|
public boolean[] | getPropertyInsertability()
return propertyInsertability;
|
public boolean[] | getPropertyLaziness()
return propertyLaziness;
|
public java.lang.String[] | getPropertyNames()
return propertyNames;
|
public boolean[] | getPropertyNullability()
return propertyNullability;
|
public int | getPropertySpan()
return propertySpan;
|
public org.hibernate.type.Type[] | getPropertyTypes()
return propertyTypes;
|
public org.hibernate.engine.ValueInclusion[] | getPropertyUpdateGenerationInclusions()
return updateInclusions;
|
public boolean[] | getPropertyUpdateability()
return propertyUpdateability;
|
public boolean[] | getPropertyVersionability()
return propertyVersionability;
|
public java.lang.String | getRootName()
return rootName;
|
public org.hibernate.engine.SessionFactoryImplementor | getSessionFactory()
return sessionFactory;
|
public java.util.Set | getSubclassEntityNames()
return subclassEntityNames;
|
public java.lang.String | getSuperclass()
return superclass;
|
public EntityTuplizer | getTuplizer(org.hibernate.EntityMode entityMode)
return (EntityTuplizer) tuplizerMapping.getTuplizer( entityMode );
|
public EntityTuplizer | getTuplizerOrNull(org.hibernate.EntityMode entityMode)
return ( EntityTuplizer ) tuplizerMapping.getTuplizerOrNull( entityMode );
|
public org.hibernate.tuple.VersionProperty | getVersionProperty()
if ( NO_VERSION_INDX == versionPropertyIndex ) {
return null;
}
else {
return ( VersionProperty ) properties[ versionPropertyIndex ];
}
|
public int | getVersionPropertyIndex()
return versionPropertyIndex;
|
public org.hibernate.EntityMode | guessEntityMode(java.lang.Object object)
return tuplizerMapping.guessEntityMode( object );
|
public boolean | hasCascades()
return hasCascades;
|
public boolean | hasCollections()
return hasCollections;
|
public boolean | hasInsertGeneratedValues()
return hasInsertGeneratedValues;
|
public boolean | hasLazyProperties()
return hasLazyProperties;
|
public boolean | hasMutableProperties()
return hasMutableProperties;
|
public boolean | hasNaturalIdentifier()
return naturalIdPropertyNumbers!=null;
|
public boolean | hasNonIdentifierPropertyNamedId()
return hasNonIdentifierPropertyNamedId;
|
private boolean | hasPartialInsertComponentGeneration(org.hibernate.mapping.Component component)
Iterator subProperties = component.getPropertyIterator();
while ( subProperties.hasNext() ) {
Property prop = ( Property ) subProperties.next();
if ( prop.getGeneration() == PropertyGeneration.ALWAYS || prop.getGeneration() == PropertyGeneration.INSERT ) {
return true;
}
else if ( prop.getValue() instanceof Component ) {
if ( hasPartialInsertComponentGeneration( ( Component ) prop.getValue() ) ) {
return true;
}
}
}
return false;
|
private boolean | hasPartialUpdateComponentGeneration(org.hibernate.mapping.Component component)
Iterator subProperties = component.getPropertyIterator();
while ( subProperties.hasNext() ) {
Property prop = ( Property ) subProperties.next();
if ( prop.getGeneration() == PropertyGeneration.ALWAYS ) {
return true;
}
else if ( prop.getValue() instanceof Component ) {
if ( hasPartialUpdateComponentGeneration( ( Component ) prop.getValue() ) ) {
return true;
}
}
}
return false;
|
public boolean | hasSubclasses()
return hasSubclasses;
|
public boolean | hasUpdateGeneratedValues()
return hasUpdateGeneratedValues;
|
private boolean | indicatesCollection(org.hibernate.type.Type type)
if ( type.isCollectionType() ) {
return true;
}
else if ( type.isComponentType() ) {
Type[] subtypes = ( ( AbstractComponentType ) type ).getSubtypes();
for ( int i = 0; i < subtypes.length; i++ ) {
if ( indicatesCollection( subtypes[i] ) ) {
return true;
}
}
}
return false;
|
public boolean | isAbstract()
return isAbstract;
|
public boolean | isDynamicInsert()
return dynamicInsert;
|
public boolean | isDynamicUpdate()
return dynamicUpdate;
|
public boolean | isExplicitPolymorphism()
return explicitPolymorphism;
|
public boolean | isInherited()
return inherited;
|
public boolean | isLazy()
return lazy;
|
public boolean | isMutable()
return mutable;
|
public boolean | isPolymorphic()
return polymorphic;
|
public boolean | isSelectBeforeUpdate()
return selectBeforeUpdate;
|
public boolean | isVersioned()
return versioned;
|
private void | mapPropertyToIndex(org.hibernate.mapping.Property prop, int i)
propertyIndexes.put( prop.getName(), new Integer(i) );
if ( prop.getValue() instanceof Component ) {
Iterator iter = ( (Component) prop.getValue() ).getPropertyIterator();
while ( iter.hasNext() ) {
Property subprop = (Property) iter.next();
propertyIndexes.put(
prop.getName() + '." + subprop.getName(),
new Integer(i)
);
}
}
|
public void | setLazy(boolean lazy)
this.lazy = lazy;
|
public java.lang.String | toString()
return "EntityMetamodel(" + name + ':" + ArrayHelper.toString(properties) + ')";
|