Package org.hibernate.mapping
Class PersistentClass
java.lang.Object
org.hibernate.mapping.PersistentClass
- All Implemented Interfaces:
Serializable,Filterable,MetaAttributable
public abstract class PersistentClass
extends Object
implements Serializable, Filterable, MetaAttributable
Mapping for an entity.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ObjectvoidvoidvoidvoidvoidaddSubclass(Subclass subclass) protected voidaddSubclassJoin(Join join) protected voidaddSubclassProperty(Property prop) protected voidaddSubclassTable(Table subclassTable) voidaddSynchronizedTable(String table) voidaddTuplizer(EntityMode entityMode, String implClassName) protected voidprotected voidcheckColumnDuplication(Set distinctColumns, Iterator columns) protected voidcheckPropertyColumnDuplication(Set distinctColumns, Iterator properties) voidintabstract Stringabstract Propertyabstract Propertyabstract Valueprotected Iteratorabstract Classabstract KeyValueabstract PropertyintintgetJoinNumber(Property prop) abstract KeyValuegetKey()abstract IteratorgetMetaAttribute(String name) protected Iteratorabstract intgetProperty(String propertyName) abstract IteratorintBuild an iterator over the properties defined on this class.getRecursiveProperty(String propertyPath) Build an iterator of properties which are "referenceable".getReferencedProperty(String propertyPath) Given a property path, locate the appropriate referenceable property reference.abstract RootClassabstract Tableabstract intIterate over subclasses in a special 'order', most derived subclasses first.intabstract PersistentClassabstract Setabstract TablegetTable()abstract IteratorBuild an iterator over the properties defined on this class which are not defined as part of a join.abstract Propertyabstract StringgetWhere()booleanabstract booleanbooleanabstract booleanbooleanbooleanbooleanbooleanbooleanbooleanisClassOrSuperclassJoin(Join join) booleanisClassOrSuperclassTable(Table closureTable) booleanbooleanbooleanabstract booleanbooleanbooleanabstract booleanbooleanabstract booleanabstract booleanbooleanisLazy()abstract booleanabstract booleanabstract booleanabstract booleanvoidprepareTemporaryTables(Mapping mapping, Dialect dialect) voidsetAbstract(Boolean isAbstract) voidsetBatchSize(int batchSize) voidsetClassName(String className) voidsetCustomSQLDelete(String customSQLDelete, boolean callable, ExecuteUpdateResultCheckStyle checkStyle) voidsetCustomSQLInsert(String customSQLInsert, boolean callable, ExecuteUpdateResultCheckStyle checkStyle) voidsetCustomSQLUpdate(String customSQLUpdate, boolean callable, ExecuteUpdateResultCheckStyle checkStyle) voidsetDeclaredIdentifierMapper(Component declaredIdentifierMapper) voidsetDiscriminatorValue(String discriminatorValue) voidsetDynamicInsert(boolean dynamicInsert) voidsetDynamicUpdate(boolean dynamicUpdate) voidsetEntityName(String entityName) abstract voidsetEntityPersisterClass(Class classPersisterClass) voidsetIdentifierMapper(Component handle) voidsetJpaEntityName(String jpaEntityName) voidsetLazy(boolean lazy) voidsetLoaderName(String loaderName) voidsetMetaAttributes(Map metas) voidsetNodeName(String nodeName) voidsetOptimisticLockMode(int optimisticLockMode) voidsetProxyInterfaceName(String proxyInterfaceName) voidsetSelectBeforeUpdate(boolean selectBeforeUpdate) voidsetSubselectLoadableCollections(boolean hasSubselectCollections) voidsetSuperMappedSuperclass(MappedSuperclass superMappedSuperclass) toString()booleanbooleanvoid
-
Field Details
-
NULL_DISCRIMINATOR_MAPPING
- See Also:
-
NOT_NULL_DISCRIMINATOR_MAPPING
- See Also:
-
synchronizedTables
-
optimisticLockMode
protected int optimisticLockMode
-
-
Constructor Details
-
PersistentClass
public PersistentClass()
-
-
Method Details
-
getClassName
-
setClassName
-
getProxyInterfaceName
-
setProxyInterfaceName
-
getMappedClass
- Throws:
MappingException
-
getProxyInterface
-
useDynamicInsert
public boolean useDynamicInsert() -
getSubclassId
public abstract int getSubclassId() -
useDynamicUpdate
public boolean useDynamicUpdate() -
setDynamicInsert
public void setDynamicInsert(boolean dynamicInsert) -
setDynamicUpdate
public void setDynamicUpdate(boolean dynamicUpdate) -
getDiscriminatorValue
-
addSubclass
- Throws:
MappingException
-
hasSubclasses
public boolean hasSubclasses() -
getSubclassSpan
public int getSubclassSpan() -
getSubclassIterator
Iterate over subclasses in a special 'order', most derived subclasses first. -
getSubclassClosureIterator
-
getIdentityTable
-
getDirectSubclasses
-
addProperty
-
getTable
-
getEntityName
-
isMutable
public abstract boolean isMutable() -
hasIdentifierProperty
public abstract boolean hasIdentifierProperty() -
getIdentifierProperty
-
getDeclaredIdentifierProperty
-
getIdentifier
-
getVersion
-
getDeclaredVersion
-
getDiscriminator
-
isInherited
public abstract boolean isInherited() -
isPolymorphic
public abstract boolean isPolymorphic() -
isVersioned
public abstract boolean isVersioned() -
getCacheConcurrencyStrategy
-
getSuperclass
-
isExplicitPolymorphism
public abstract boolean isExplicitPolymorphism() -
isDiscriminatorInsertable
public abstract boolean isDiscriminatorInsertable() -
getPropertyClosureIterator
-
getTableClosureIterator
-
getKeyClosureIterator
-
addSubclassProperty
-
addSubclassJoin
-
addSubclassTable
-
getSubclassPropertyClosureIterator
-
getSubclassJoinClosureIterator
-
getSubclassTableClosureIterator
-
isClassOrSuperclassJoin
-
isClassOrSuperclassTable
-
isLazy
public boolean isLazy() -
setLazy
public void setLazy(boolean lazy) -
hasEmbeddedIdentifier
public abstract boolean hasEmbeddedIdentifier() -
getEntityPersisterClass
-
setEntityPersisterClass
-
getRootTable
-
getRootClass
-
getKey
-
setDiscriminatorValue
-
setEntityName
-
createPrimaryKey
public void createPrimaryKey() -
getWhere
-
getBatchSize
public int getBatchSize() -
setBatchSize
public void setBatchSize(int batchSize) -
hasSelectBeforeUpdate
public boolean hasSelectBeforeUpdate() -
setSelectBeforeUpdate
public void setSelectBeforeUpdate(boolean selectBeforeUpdate) -
getReferenceablePropertyIterator
Build an iterator of properties which are "referenceable".- Returns:
- The property iterator.
- See Also:
-
getReferencedProperty
Given a property path, locate the appropriate referenceable property reference. A referenceable property is a property which can be a target of a foreign-key mapping (an identifier or explcitly named in a property-ref).- Parameters:
propertyPath- The property path to resolve into a property reference.- Returns:
- The property reference (never null).
- Throws:
MappingException- If the property could not be found.
-
getRecursiveProperty
- Throws:
MappingException
-
getProperty
- Throws:
MappingException
-
getOptimisticLockMode
public abstract int getOptimisticLockMode() -
setOptimisticLockMode
public void setOptimisticLockMode(int optimisticLockMode) -
validate
- Throws:
MappingException
-
isDiscriminatorValueNotNull
public boolean isDiscriminatorValueNotNull() -
isDiscriminatorValueNull
public boolean isDiscriminatorValueNull() -
getMetaAttributes
- Specified by:
getMetaAttributesin interfaceMetaAttributable
-
setMetaAttributes
- Specified by:
setMetaAttributesin interfaceMetaAttributable
-
getMetaAttribute
- Specified by:
getMetaAttributein interfaceMetaAttributable
-
toString
-
getJoinIterator
-
getJoinClosureIterator
-
addJoin
-
getJoinClosureSpan
public int getJoinClosureSpan() -
getPropertyClosureSpan
public int getPropertyClosureSpan() -
getJoinNumber
-
getPropertyIterator
Build an iterator over the properties defined on this class. The returned iterator only accounts for "normal" properties (i.e. non-identifier properties). Differs fromgetUnjoinedPropertyIterator()in that the iterator we return here will include properties defined as part of a join.- Returns:
- An iterator over the "normal" properties.
-
getUnjoinedPropertyIterator
Build an iterator over the properties defined on this class which are not defined as part of a join. As withgetPropertyIterator(), the returned iterator only accounts for non-identifier properties.- Returns:
- An iterator over the non-joined "normal" properties.
-
setCustomSQLInsert
public void setCustomSQLInsert(String customSQLInsert, boolean callable, ExecuteUpdateResultCheckStyle checkStyle) -
getCustomSQLInsert
-
isCustomInsertCallable
public boolean isCustomInsertCallable() -
getCustomSQLInsertCheckStyle
-
setCustomSQLUpdate
public void setCustomSQLUpdate(String customSQLUpdate, boolean callable, ExecuteUpdateResultCheckStyle checkStyle) -
getCustomSQLUpdate
-
isCustomUpdateCallable
public boolean isCustomUpdateCallable() -
getCustomSQLUpdateCheckStyle
-
setCustomSQLDelete
public void setCustomSQLDelete(String customSQLDelete, boolean callable, ExecuteUpdateResultCheckStyle checkStyle) -
getCustomSQLDelete
-
isCustomDeleteCallable
public boolean isCustomDeleteCallable() -
getCustomSQLDeleteCheckStyle
-
addFilter
- Specified by:
addFilterin interfaceFilterable
-
getFilterMap
- Specified by:
getFilterMapin interfaceFilterable
-
isForceDiscriminator
public boolean isForceDiscriminator() -
isJoinedSubclass
public abstract boolean isJoinedSubclass() -
getLoaderName
-
setLoaderName
-
getSynchronizedTables
-
addSynchronizedTable
-
isAbstract
-
setAbstract
-
checkColumnDuplication
protected void checkColumnDuplication(Set distinctColumns, Iterator columns) throws MappingException - Throws:
MappingException
-
checkPropertyColumnDuplication
protected void checkPropertyColumnDuplication(Set distinctColumns, Iterator properties) throws MappingException - Throws:
MappingException
-
getNonDuplicatedPropertyIterator
-
getDiscriminatorColumnIterator
-
checkColumnDuplication
protected void checkColumnDuplication() -
accept
-
getNodeName
-
setNodeName
-
getJpaEntityName
-
setJpaEntityName
-
hasPojoRepresentation
public boolean hasPojoRepresentation() -
hasDom4jRepresentation
public boolean hasDom4jRepresentation() -
hasSubselectLoadableCollections
public boolean hasSubselectLoadableCollections() -
setSubselectLoadableCollections
public void setSubselectLoadableCollections(boolean hasSubselectCollections) -
prepareTemporaryTables
-
getTemporaryIdTableName
-
getTemporaryIdTableDDL
-
getIdentifierMapper
-
getDeclaredIdentifierMapper
-
setDeclaredIdentifierMapper
-
hasIdentifierMapper
public boolean hasIdentifierMapper() -
setIdentifierMapper
-
addTuplizer
-
getTuplizerImplClassName
-
getTuplizerMap
-
hasNaturalId
public boolean hasNaturalId() -
isLazyPropertiesCacheable
public abstract boolean isLazyPropertiesCacheable() -
getDeclaredPropertyIterator
-
addMappedsuperclassProperty
-
getSuperMappedSuperclass
-
setSuperMappedSuperclass
-