public abstract class PersistentClass extends Object implements AttributeContainer, Serializable, Filterable, MetaAttributable
Modifier and Type | Field and Description |
---|---|
static String |
NOT_NULL_DISCRIMINATOR_MAPPING |
static String |
NULL_DISCRIMINATOR_MAPPING |
protected Set |
synchronizedTables |
Constructor and Description |
---|
PersistentClass(MetadataBuildingContext metadataBuildingContext) |
public static final String NULL_DISCRIMINATOR_MAPPING
public static final String NOT_NULL_DISCRIMINATOR_MAPPING
protected final Set synchronizedTables
public PersistentClass(MetadataBuildingContext metadataBuildingContext)
public ServiceRegistry getServiceRegistry()
public String getClassName()
public void setClassName(String className)
public String getProxyInterfaceName()
public void setProxyInterfaceName(String proxyInterfaceName)
public Class getMappedClass() throws MappingException
MappingException
public Class getProxyInterface()
public boolean useDynamicInsert()
public abstract int getSubclassId()
public boolean useDynamicUpdate()
public void setDynamicInsert(boolean dynamicInsert)
public void setDynamicUpdate(boolean dynamicUpdate)
public String getDiscriminatorValue()
public void addSubclass(Subclass subclass) throws MappingException
MappingException
public boolean hasSubclasses()
public int getSubclassSpan()
public Iterator getSubclassIterator()
public Iterator getSubclassClosureIterator()
public Table getIdentityTable()
public Iterator getDirectSubclasses()
public void addProperty(Property p)
addProperty
in interface AttributeContainer
public abstract Table getTable()
public String getEntityName()
public abstract boolean isMutable()
public abstract boolean hasIdentifierProperty()
public abstract Property getIdentifierProperty()
public abstract Property getDeclaredIdentifierProperty()
public abstract KeyValue getIdentifier()
public abstract Property getVersion()
public abstract Property getDeclaredVersion()
public abstract Value getDiscriminator()
public abstract boolean isInherited()
public abstract boolean isPolymorphic()
public abstract boolean isVersioned()
public abstract String getNaturalIdCacheRegionName()
public abstract String getCacheConcurrencyStrategy()
public abstract PersistentClass getSuperclass()
public abstract boolean isExplicitPolymorphism()
public abstract boolean isDiscriminatorInsertable()
public abstract Iterator getPropertyClosureIterator()
public abstract Iterator getTableClosureIterator()
public abstract Iterator getKeyClosureIterator()
protected void addSubclassProperty(Property prop)
protected void addSubclassJoin(Join join)
protected void addSubclassTable(Table subclassTable)
public Iterator getSubclassPropertyClosureIterator()
public Iterator getSubclassJoinClosureIterator()
public Iterator getSubclassTableClosureIterator()
public boolean isClassOrSuperclassJoin(Join join)
public boolean isClassOrSuperclassTable(Table closureTable)
public boolean isLazy()
public void setLazy(boolean lazy)
public abstract boolean hasEmbeddedIdentifier()
public abstract Class getEntityPersisterClass()
public abstract void setEntityPersisterClass(Class classPersisterClass)
public abstract Table getRootTable()
public abstract RootClass getRootClass()
public abstract KeyValue getKey()
public void setDiscriminatorValue(String discriminatorValue)
public void setEntityName(String entityName)
public void createPrimaryKey()
public abstract String getWhere()
public int getBatchSize()
public void setBatchSize(int batchSize)
public boolean hasSelectBeforeUpdate()
public void setSelectBeforeUpdate(boolean selectBeforeUpdate)
public Iterator getReferenceablePropertyIterator()
for a discussion of "referenceable"
public Property getReferencedProperty(String propertyPath) throws MappingException
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).
propertyPath
- The property path to resolve into a property reference.MappingException
- If the property could not be found.public Property getRecursiveProperty(String propertyPath) throws MappingException
MappingException
public Property getProperty(String propertyName) throws MappingException
MappingException
public boolean hasProperty(String name)
name
- The property name to checktrue
if a property with that name exists; false
if notpublic boolean isPropertyDefinedInSuperHierarchy(String name)
name
- The property name to checktrue
if a property with that name exists; false
if notpublic boolean isPropertyDefinedInHierarchy(String name)
isPropertyDefinedInSuperHierarchy(java.lang.String)
,
this method does check this PersistentClassname
- The property name to checktrue
if a property with that name exists; false
if not@Deprecated public int getOptimisticLockMode()
getOptimisticLockStyle()
@Deprecated public void setOptimisticLockMode(int optimisticLockMode)
setOptimisticLockStyle(org.hibernate.engine.OptimisticLockStyle)
public OptimisticLockStyle getOptimisticLockStyle()
public void setOptimisticLockStyle(OptimisticLockStyle optimisticLockStyle)
public void validate(Mapping mapping) throws MappingException
MappingException
public boolean isDiscriminatorValueNotNull()
public boolean isDiscriminatorValueNull()
public Map getMetaAttributes()
getMetaAttributes
in interface MetaAttributable
public void setMetaAttributes(Map metas)
setMetaAttributes
in interface MetaAttributable
public MetaAttribute getMetaAttribute(String name)
getMetaAttribute
in interface MetaAttributable
public Iterator getJoinIterator()
public Iterator getJoinClosureIterator()
public void addJoin(Join join)
public int getJoinClosureSpan()
public int getPropertyClosureSpan()
public int getJoinNumber(Property prop)
public Iterator getPropertyIterator()
Differs from getUnjoinedPropertyIterator()
in that the iterator
we return here will include properties defined as part of a join.
public Iterator getUnjoinedPropertyIterator()
getPropertyIterator()
,
the returned iterator only accounts for non-identifier properties.public void setCustomSQLInsert(String customSQLInsert, boolean callable, ExecuteUpdateResultCheckStyle checkStyle)
public String getCustomSQLInsert()
public boolean isCustomInsertCallable()
public ExecuteUpdateResultCheckStyle getCustomSQLInsertCheckStyle()
public void setCustomSQLUpdate(String customSQLUpdate, boolean callable, ExecuteUpdateResultCheckStyle checkStyle)
public String getCustomSQLUpdate()
public boolean isCustomUpdateCallable()
public ExecuteUpdateResultCheckStyle getCustomSQLUpdateCheckStyle()
public void setCustomSQLDelete(String customSQLDelete, boolean callable, ExecuteUpdateResultCheckStyle checkStyle)
public String getCustomSQLDelete()
public boolean isCustomDeleteCallable()
public ExecuteUpdateResultCheckStyle getCustomSQLDeleteCheckStyle()
public void addFilter(String name, String condition, boolean autoAliasInjection, Map<String,String> aliasTableMap, Map<String,String> aliasEntityMap)
addFilter
in interface Filterable
public List getFilters()
getFilters
in interface Filterable
public boolean isForceDiscriminator()
public abstract boolean isJoinedSubclass()
public String getLoaderName()
public void setLoaderName(String loaderName)
public abstract Set getSynchronizedTables()
public void addSynchronizedTable(String table)
public Boolean isAbstract()
public void setAbstract(Boolean isAbstract)
protected void checkColumnDuplication(Set distinctColumns, Iterator columns) throws MappingException
MappingException
protected void checkPropertyColumnDuplication(Set distinctColumns, Iterator properties) throws MappingException
MappingException
protected Iterator getNonDuplicatedPropertyIterator()
protected Iterator getDiscriminatorColumnIterator()
protected void checkColumnDuplication()
public abstract Object accept(PersistentClassVisitor mv)
public String getJpaEntityName()
public void setJpaEntityName(String jpaEntityName)
public boolean hasPojoRepresentation()
public boolean hasSubselectLoadableCollections()
public void setSubselectLoadableCollections(boolean hasSubselectCollections)
public Component getIdentifierMapper()
public Component getDeclaredIdentifierMapper()
public void setDeclaredIdentifierMapper(Component declaredIdentifierMapper)
public boolean hasIdentifierMapper()
public void setIdentifierMapper(Component handle)
public void addTuplizer(EntityMode entityMode, String implClassName)
public String getTuplizerImplClassName(EntityMode mode)
public Map getTuplizerMap()
public boolean hasNaturalId()
public abstract boolean isLazyPropertiesCacheable()
public Iterator getDeclaredPropertyIterator()
public void addMappedsuperclassProperty(Property p)
public MappedSuperclass getSuperMappedSuperclass()
public void setSuperMappedSuperclass(MappedSuperclass superMappedSuperclass)
Copyright © 2017 JBoss by Red Hat. All rights reserved.