Methods Summary |
---|
public java.lang.Object | accept(PersistentClassVisitor mv)
return mv.accept(this);
|
public void | addSubclass(Subclass subclass)
super.addSubclass(subclass);
setPolymorphic(true);
|
private void | checkCompositeIdentifier()
if ( getIdentifier() instanceof Component ) {
Component id = (Component) getIdentifier();
if ( !id.isDynamic() ) {
Class idClass = id.getComponentClass();
if ( idClass != null && !ReflectHelper.overridesEquals( idClass ) ) {
LogFactory.getLog(RootClass.class)
.warn( "composite-id class does not override equals(): "
+ id.getComponentClass().getName() );
}
if ( !ReflectHelper.overridesHashCode( idClass ) ) {
LogFactory.getLog(RootClass.class)
.warn( "composite-id class does not override hashCode(): "
+ id.getComponentClass().getName() );
}
if ( !Serializable.class.isAssignableFrom( idClass ) ) {
throw new MappingException( "composite-id class must implement Serializable: "
+ id.getComponentClass().getName() );
}
}
}
|
public java.lang.String | getCacheConcurrencyStrategy()
return cacheConcurrencyStrategy;
|
public java.lang.String | getCacheRegionName()
return cacheRegionName==null ? getEntityName() : cacheRegionName;
|
public Value | getDiscriminator()
return discriminator;
|
public java.lang.Class | getEntityPersisterClass()
return entityPersisterClass;
|
public KeyValue | getIdentifier()
return identifier;
|
public Property | getIdentifierProperty()
return identifierProperty;
|
public java.util.Set | getIdentityTables()
Set tables = new HashSet();
Iterator iter = getSubclassClosureIterator();
while ( iter.hasNext() ) {
PersistentClass clazz = (PersistentClass) iter.next();
if ( clazz.isAbstract() == null || !clazz.isAbstract().booleanValue() ) tables.add( clazz.getIdentityTable() );
}
return tables;
|
public KeyValue | getKey()
return getIdentifier();
|
public java.util.Iterator | getKeyClosureIterator()
return new SingletonIterator( getKey() );
|
public int | getOptimisticLockMode()
return optimisticLockMode;
|
public java.util.Iterator | getPropertyClosureIterator()
return getPropertyIterator();
|
public org.hibernate.mapping.RootClass | getRootClass()
return this;
|
public Table | getRootTable()
return getTable();
|
public int | getSubclassId()
return 0;
|
public PersistentClass | getSuperclass()
return null;
|
public java.util.Set | getSynchronizedTables()
return synchronizedTables;
|
public Table | getTable()
return table;
|
public java.util.Iterator | getTableClosureIterator()
return new SingletonIterator( getTable() );
|
public Property | getVersion()
return version;
|
public java.lang.String | getWhere()
return where;
|
public boolean | hasEmbeddedIdentifier()
return embeddedIdentifier;
|
public boolean | hasIdentifierProperty()
return identifierProperty!=null;
|
public boolean | isDiscriminatorInsertable()
return discriminatorInsertable;
|
public boolean | isExplicitPolymorphism()
return explicitPolymorphism;
|
public boolean | isForceDiscriminator()
return forceDiscriminator;
|
public boolean | isInherited()
return false;
|
public boolean | isJoinedSubclass()
return false;
|
public boolean | isLazyPropertiesCacheable()
return lazyPropertiesCacheable;
|
public boolean | isMutable()
return mutable;
|
public boolean | isPolymorphic()
return polymorphic;
|
public boolean | isVersioned()
return version!=null;
|
int | nextSubclassId()
return ++nextSubclassId;
|
public void | setCacheConcurrencyStrategy(java.lang.String cacheConcurrencyStrategy)
this.cacheConcurrencyStrategy = cacheConcurrencyStrategy;
|
public void | setCacheRegionName(java.lang.String cacheRegionName)
this.cacheRegionName = cacheRegionName;
|
public void | setDiscriminator(Value discriminator)
this.discriminator = discriminator;
|
public void | setDiscriminatorInsertable(boolean insertable)
this.discriminatorInsertable = insertable;
|
public void | setEmbeddedIdentifier(boolean embeddedIdentifier)
this.embeddedIdentifier = embeddedIdentifier;
|
public void | setEntityPersisterClass(java.lang.Class persister)
this.entityPersisterClass = persister;
|
public void | setExplicitPolymorphism(boolean explicitPolymorphism)
this.explicitPolymorphism = explicitPolymorphism;
|
public void | setForceDiscriminator(boolean forceDiscriminator)
this.forceDiscriminator = forceDiscriminator;
|
public void | setIdentifier(KeyValue identifier)
this.identifier = identifier;
|
public void | setIdentifierProperty(Property identifierProperty)
this.identifierProperty = identifierProperty;
identifierProperty.setPersistentClass(this);
|
public void | setLazyPropertiesCacheable(boolean lazyPropertiesCacheable)
this.lazyPropertiesCacheable = lazyPropertiesCacheable;
|
public void | setMutable(boolean mutable)
this.mutable = mutable;
|
public void | setPolymorphic(boolean polymorphic)
this.polymorphic = polymorphic;
|
public void | setTable(Table table)
this.table=table;
|
public void | setVersion(Property version)
this.version = version;
|
public void | setWhere(java.lang.String string)
where = string;
|
public void | validate(org.hibernate.engine.Mapping mapping)
super.validate(mapping);
if ( !getIdentifier().isValid(mapping) ) {
throw new MappingException(
"identifier mapping has wrong number of columns: " +
getEntityName() +
" type: " +
getIdentifier().getType().getName()
);
}
checkCompositeIdentifier();
|