类 AbstractEntityPersister
- java.lang.Object
-
- org.hibernate.persister.entity.AbstractEntityPersister
-
- 所有已实现的接口:
LazyPropertyInitializer,PostInsertIdentityPersister,ClassMetadata,EntityPersister,Joinable,Loadable,Lockable,OuterJoinLoadable,PropertyMapping,Queryable,SQLLoadable,UniqueKeyLoadable,AttributeSource,EntityDefinition
public abstract class AbstractEntityPersister extends Object implements OuterJoinLoadable, Queryable, ClassMetadata, UniqueKeyLoadable, SQLLoadable, LazyPropertyInitializer, PostInsertIdentityPersister, Lockable
Basic functionality for persisting an entity via JDBC through either generated or custom SQL- 作者:
- Gavin King
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static interfaceAbstractEntityPersister.CacheEntryHelperConsolidated these onto a single helper because the 2 pieces work in tandem.protected static interfaceAbstractEntityPersister.InclusionChecker-
从接口继承的嵌套类/接口 org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer
LazyPropertyInitializer.InterceptorImplementor
-
从接口继承的嵌套类/接口 org.hibernate.persister.entity.Queryable
Queryable.Declarer
-
-
字段概要
字段 修饰符和类型 字段 说明 protected intbatchSizeprotected String[]customSQLDeleteprotected String[]customSQLInsertprotected String[]customSQLUpdateprotected boolean[]deleteCallableprotected ExecuteUpdateResultCheckStyle[]deleteResultCheckStylesstatic StringENTITY_CLASSprotected boolean[]insertCallableprotected ExecuteUpdateResultCheckStyle[]insertResultCheckStylesprotected BasicEntityPropertyMappingpropertyMappingWarning: When there are duplicated property names in the subclasses then propertyMapping will only contain one of those properties.protected StringrowIdNameprotected boolean[]updateCallableprotected ExecuteUpdateResultCheckStyle[]updateResultCheckStyles-
从接口继承的字段 org.hibernate.persister.entity.EntityPersister
ENTITY_ID
-
从接口继承的字段 org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer
UNFETCHED_PROPERTY
-
从接口继承的字段 org.hibernate.persister.entity.Loadable
ROWID_ALIAS
-
-
构造器概要
构造器 构造器 说明 AbstractEntityPersister(PersistentClass persistentClass, EntityDataAccess cacheAccessStrategy, NaturalIdDataAccess naturalIdRegionAccessStrategy, PersisterCreationContext creationContext)
-
方法概要
所有方法 静态方法 实例方法 抽象方法 具体方法 已过时的方法 修饰符和类型 方法 说明 protected voidaddDiscriminatorToInsert(Insert insert)protected voidaddDiscriminatorToSelect(SelectFragment select, String name, String suffix)voidafterInitialize(Object entity, SharedSessionContractImplementor session)Called just after the entities properties have been initializedvoidafterReassociate(Object entity, SharedSessionContractImplementor session)Called just after the entity has been reassociated with the sessionCacheEntrybuildCacheEntry(Object entity, Object[] state, Object version, SharedSessionContractImplementor session)protected AbstractEntityPersister.CacheEntryHelperbuildCacheEntryHelper()booleancanExtractIdOutOfEntity()Determine whether detached instances of this entity carry their own identifier value.booleancanOmitSuperclassTableJoin()If true, persister can omit superclass tables during joining if they are not needed in the query.booleancanReadFromCache()booleancanUseReferenceCacheEntries()booleancanWriteToCache()protected booleancheck(int rows, Serializable id, int tableNumber, Expectation expectation, PreparedStatement statement)booleancheckVersion(boolean[] includeProperty)protected StringconcretePropertySelectFragment(String alias, boolean[] includeProperty)protected StringconcretePropertySelectFragment(String alias, AbstractEntityPersister.InclusionChecker inclusionChecker)protected StringconcretePropertySelectFragmentSansLeadingComma(String alias, boolean[] include)booleanconsumesCollectionAlias()Very, very, very ugly...booleanconsumesEntityAlias()Very, very, very ugly...intcountSubclassProperties()How many properties are there, for this class and all subclasses?protected DeletecreateDelete()protected UniqueEntityLoadercreateEntityLoader(LockMode lockMode)Used internally to create static loaders.protected UniqueEntityLoadercreateEntityLoader(LockMode lockMode, LoadQueryInfluencers loadQueryInfluencers)protected UniqueEntityLoadercreateEntityLoader(LockOptions lockOptions, LoadQueryInfluencers loadQueryInfluencers)protected StringcreateFrom(int tableNumber, String alias)protected InsertcreateInsert()protected JoinFragmentcreateJoin(int[] tableNumbers, String drivingAlias)protected JoinFragmentcreateJoin(String name, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)protected JoinFragmentcreateJoin(String name, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations, Set<String> referencedTables)protected voidcreateLoaders()ObjectcreateProxy(Serializable id, SharedSessionContractImplementor session)Create a new proxy instanceprotected voidcreateQueryLoader()protected SelectFragmentcreateSelect(int[] subclassColumnNumbers, int[] subclassFormulaNumbers)protected voidcreateUniqueKeyLoaders()protected UpdatecreateUpdate()protected StringcreateWhereByKey(int tableNumber, String alias)intdehydrate(Serializable id, Object[] fields, boolean[] includeProperty, boolean[][] includeColumns, int j, PreparedStatement st, SharedSessionContractImplementor session, boolean isUpdate)intdehydrate(Serializable id, Object[] fields, Object rowId, boolean[] includeProperty, boolean[][] includeColumns, int j, PreparedStatement ps, SharedSessionContractImplementor session, int index, boolean isUpdate)Marshall the fields of a persistent instance to a prepared statementvoiddelete(Serializable id, Object version, int j, Object object, String sql, SharedSessionContractImplementor session, Object[] loadedState)Perform an SQL DELETEvoiddelete(Serializable id, Object version, Object object, SharedSessionContractImplementor session)Delete an objectprotected JoinTypedetermineSubclassTableJoinType(int subclassTableNumber, boolean canInnerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)protected JoinTypedetermineSubclassTableJoinType(int subclassTableNumber, boolean canInnerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations, Set<String> referencedTables)protected StringdetermineTableName(Table table, JdbcEnvironment jdbcEnvironment)intdetermineTableNumberForColumn(String columnName)protected voiddoPostInstantiate()protected abstract StringfilterFragment(String alias)StringfilterFragment(String alias, Map enabledFilters)Get the where clause filter, given a query alias and considering enabled session filtersStringfilterFragment(String alias, Map enabledFilters, Set<String> treatAsDeclarations)Get the where clause filter, given a query alias and considering enabled session filtersprotected abstract StringfilterFragment(String alias, Set<String> treatAsDeclarations)int[]findDirty(Object[] currentState, Object[] previousState, Object entity, SharedSessionContractImplementor session)Locate the property-indices of all properties considered to be dirty.int[]findModified(Object[] old, Object[] current, Object entity, SharedSessionContractImplementor session)Locate the property-indices of all properties considered to be dirty.ObjectforceVersionIncrement(Serializable id, Object currentVersion, SharedSessionContractImplementor session)StringfromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)Get the from clause part of any joins (optional operation)StringfromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)Get the from clause part of any joins (optional operation)StringfromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations, Set<String> referencedTables)Get the from clause part of any joins (optional operation)StringgenerateDeleteString(int j)Generate the SQL that deletes a row by id (and version)voidgenerateEntityDefinition()Generate the entity definition for this object.StringgenerateFilterConditionAlias(String rootAlias)The alias used for any filter conditions (mapped where-fragments or enabled-filters).StringgenerateIdByUniqueKeySelectString(String uniquePropertyName)StringgenerateIdentityInsertString(boolean[] includeProperty)Used to generate an insert statement against the root table in the case of identifier generation strategies where the insert statement executions actually generates the identifier value.StringgenerateInsertGeneratedValuesSelectString()StringgenerateInsertString(boolean[] includeProperty, int j)StringgenerateInsertString(boolean identityInsert, boolean[] includeProperty)StringgenerateInsertString(boolean identityInsert, boolean[] includeProperty, int j)Generate the SQL that inserts a rowprotected Map<String,String>generateLazySelectStringsByFetchGroup()protected LockingStrategygenerateLocker(LockMode lockMode)StringgenerateSelectVersionString()Generate the SQL that selects the version number by idStringgenerateSnapshotSelectString()static StringgenerateTableAlias(String rootAlias, int tableNumber)StringgenerateUpdateGeneratedValuesSelectString()StringgenerateUpdateString(boolean[] includeProperty, int j, boolean useRowId)StringgenerateUpdateString(boolean[] includeProperty, int j, Object[] oldFields, boolean useRowId)Generate the SQL that updates a row by id (and version)protected UniqueEntityLoadergetAppropriateLoader(LockOptions lockOptions, SharedSessionContractImplementor session)Iterable<AttributeDefinition>getAttributes()BytecodeEnhancementMetadatagetBytecodeEnhancementMetadata()EntityDataAccessgetCacheAccessStrategy()Get the cache (optional operation)CacheEntryStructuregetCacheEntryStructure()Get the cache structureCascadeStylegetCascadeStyle(int i)Get the cascade style of this (subclass closure) propertyClassMetadatagetClassMetadata()Get the user-visible metadata for the class (optional operation)protected SerializablegetCollectionKey(CollectionPersister persister, Object owner, EntityEntry ownerEntry, SharedSessionContractImplementor session)ClassgetConcreteProxyClass()Get the proxy interface that instances of this concrete class will be cast to (optional operation).ObjectgetCurrentVersion(Serializable id, SharedSessionContractImplementor session)Retrieve the version numberObject[]getDatabaseSnapshot(Serializable id, SharedSessionContractImplementor session)Get the current database state of the object, in a "hydrated" form, without resolving identifiersExecuteUpdateResultCheckStyle[]getDeleteResultCheckStyles()StringgetDiscriminatorAlias()StringgetDiscriminatorAlias(String suffix)Get the result set aliases used for the identifier columns, given a suffixStringgetDiscriminatorColumnName()StringgetDiscriminatorColumnReaders()StringgetDiscriminatorColumnReaderTemplate()StringgetDiscriminatorFormulaTemplate()EntityEntryFactorygetEntityEntryFactory()Get the EntityEntryFactory indicated for the entity mapped by this persister.EntityIdentifierDefinitiongetEntityKeyDefinition()EntityMetamodelgetEntityMetamodel()Retrieve the underlying entity metamodel instance...EntityModegetEntityMode()StringgetEntityName()The entity name which this persister maps.EntityPersistergetEntityPersister()EntityTuplizergetEntityTuplizer()EntityTypegetEntityType()SessionFactoryImplementorgetFactory()Return the SessionFactory to which this persister "belongs".FetchModegetFetchMode(int i)May this (subclass closure) property be fetched using an SQL outerjoin?SerializablegetIdByUniqueKey(Serializable key, String uniquePropertyName, SharedSessionContractImplementor session)SerializablegetIdentifier(Object object)Get the identifier of an instance (throw an exception if no identifier property)SerializablegetIdentifier(Object entity, SharedSessionContractImplementor session)Get the identifier of an instance (throw an exception if no identifier property)String[]getIdentifierAliases()String[]getIdentifierAliases(String suffix)Get the result set aliases used for the identifier columns, given a suffixString[]getIdentifierColumnNames()Get the names of columns used to persist the identifierString[]getIdentifierColumnReaders()String[]getIdentifierColumnReaderTemplates()intgetIdentifierColumnSpan()IdentifierGeneratorgetIdentifierGenerator()Determine which identifier generation strategy is used for this entity.StringgetIdentifierPropertyName()Get the name of the identifier property (or return null) - need not return the name of an actual Java propertyTypegetIdentifierType()Get the identifier typeStringgetIdentitySelectString()Get the database-specific SQL command to retrieve the last generated IDENTITY value.ExecuteUpdateResultCheckStyle[]getInsertResultCheckStyles()BytecodeEnhancementMetadatagetInstrumentationMetadata()String[]getKeyColumnNames()The columns to join onabstract String[]getKeyColumns(int j)protected UniqueEntityLoadergetLoaderByLockMode(LockMode lockMode)protected MapgetLoaders()已过时。Because there are better patterns for thisClassgetMappedClass()The persistent class, or nullStringgetMappedSuperclass()Get the class that this class is mapped as a subclass of - not necessarily the direct superclassStringgetName()An identifying name; a class name or collection role name.NaturalIdDataAccessgetNaturalIdCacheAccessStrategy()Get the NaturalId cache (optional operation)int[]getNaturalIdentifierProperties()If the entity defines a natural id (EntityPersister.hasNaturalIdentifier()), which properties make up the natural id.Object[]getNaturalIdentifierSnapshot(Serializable id, SharedSessionContractImplementor session)Retrieve the current state of the natural-id properties from the database.NavigableRolegetNavigableRole()boolean[]getNonLazyPropertyUpdateability()String[][]getPolymorphicJoinColumns(String lhsTableAlias, String propertyPath)boolean[]getPropertiesToInsert(Object[] fields)Transform the array of property indexes to an array of booleans, true when the property is insertable and non-nullboolean[]getPropertiesToUpdate(int[] dirtyProperties, boolean hasDirtyCollection)Transform the array of property indexes to an array of booleans, true when the property is dirtyString[]getPropertyAliases(String suffix, int i)Get the result set aliases used for the property columns, given a suffix (properties of this class, only).CascadeStyle[]getPropertyCascadeStyles()Get the cascade styles of the properties (optional operation)boolean[]getPropertyCheckability()Get the "checkability" of the properties of this class (is the property dirty checked, does the cache need to be updated)boolean[][]getPropertyColumnInsertable()String[]getPropertyColumnNames(int i)Get the result set column names mapped for this property (properties of this class, only).String[]getPropertyColumnNames(String propertyName)Get the column names for the given property pathintgetPropertyColumnSpan(int i)boolean[][]getPropertyColumnUpdateable()String[]getPropertyColumnWriters(int i)intgetPropertyIndex(String propertyName)Get the property number of the unique key propertyboolean[]getPropertyInsertability()Get the "insertability" of the properties of this class (does the property appear in an SQL INSERT)ValueInclusion[]getPropertyInsertGenerationInclusions()已过时。no simple, direct replacementboolean[]getPropertyLaziness()Get the "laziness" of the properties of this classString[]getPropertyNames()Get the names of the class properties - doesn't have to be the names of the actual Java properties (used for XML generation only)boolean[]getPropertyNullability()Get the nullability of the properties of this classboolean[]getPropertySelectable()intgetPropertySpan()protected String[]getPropertySubclassNames()protected abstract int[]getPropertyTableNumbers()protected abstract int[]getPropertyTableNumbersInSelect()TypegetPropertyType(String propertyName)Get the type of a particular property by name.Type[]getPropertyTypes()Get the Hibernate types of the class propertiesboolean[]getPropertyUniqueness()boolean[]getPropertyUpdateability()Get the "updateability" of the properties of this class (does the property appear in an SQL UPDATE)boolean[]getPropertyUpdateability(Object entity)Which properties appear in the SQL update?ValueInclusion[]getPropertyUpdateGenerationInclusions()已过时。no simple, direct replacementObjectgetPropertyValue(Object object, int i)Get the value of a particular propertyObjectgetPropertyValue(Object object, String propertyName)Get the value of a particular propertyObject[]getPropertyValues(Object object)Return the (loaded) values of the mapped properties of the object (not including backrefs)Object[]getPropertyValuesToInsert(Object object, Map mergeMap, SharedSessionContractImplementor session)Return the values of the insertable properties of the object (including backrefs)boolean[]getPropertyVersionability()Get the "versionability" of the properties of this class (is the property optimistic-locked)Serializable[]getQuerySpaces()Returns an array of objects that identify spaces in which properties of this entity are persisted, for instances of this class and its subclasses.StringgetRootEntityName()Returns an object that identifies the space in which identifiers of this entity hierarchy are unique.StringgetRootTableAlias(String drivingAlias)Get the SQL alias this persister would use for the root table given the passed driving alias.String[]getRootTableIdentifierColumnNames()Get the names of columns on the root table used to persist the identifier.String[]getRootTableKeyColumnNames()The names of the primary key columns in the root table.StringgetRootTableName()Locks are always applied to the "root table".StringgetSelectByUniqueKeyString(String propertyName)Get a SQL select string that performs a select based on a unique key determined by the given property name).protected StringgetSequentialSelect(String entityName)String[]getSQLDeleteStrings()StringgetSQLIdentityInsertString()The query that inserts a row, letting the database generate an idString[]getSQLInsertStrings()StringgetSQLLazySelectString(String fetchGroup)String[]getSQLLazyUpdateByRowIdStrings()String[]getSQLLazyUpdateStrings()StringgetSQLSnapshotSelectString()String[]getSQLUpdateByRowIdStrings()String[]getSQLUpdateStrings()protected StringgetSQLWhereString(String alias)protected String[]getSubclassColumnAliasClosure()protected String[]getSubclassColumnClosure()protected boolean[]getSubclassColumnLazyiness()String[]getSubclassColumnReaderTemplateClosure()protected abstract int[]getSubclassColumnTableNumberClosure()EntityPersistergetSubclassEntityPersister(Object instance, SessionFactoryImplementor factory)A request has already identified the entity-name of this persister as the mapping for the given instance.protected String[]getSubclassFormulaAliasClosure()protected String[]getSubclassFormulaClosure()protected boolean[]getSubclassFormulaLazyiness()protected abstract int[]getSubclassFormulaTableNumberClosure()protected String[]getSubclassFormulaTemplateClosure()String[]getSubclassPropertyColumnAliases(String propertyName, String suffix)Return the column alias names used to persist/query the named property of the class or a subclass (optional operation).protected String[][]getSubclassPropertyColumnNameClosure()String[]getSubclassPropertyColumnNames(int i)Return the column names used to persist the numbered property of the class or a subclass.String[]getSubclassPropertyColumnNames(String propertyName)Return the column names used to persist/query the named property of the class or a subclass (optional operation).String[][]getSubclassPropertyColumnReaderClosure()String[][]getSubclassPropertyColumnReaderTemplateClosure()Queryable.DeclarergetSubclassPropertyDeclarer(String propertyPath)Determine whether the given property is declared by our mapped class, our super class, or one of our subclasses...String[][]getSubclassPropertyFormulaTemplateClosure()StringgetSubclassPropertyName(int i)Get the name of the numbered property of the class or a subclass.protected String[]getSubclassPropertyNameClosure()protected String[]getSubclassPropertySubclassNameClosure()protected abstract intgetSubclassPropertyTableNumber(int i)intgetSubclassPropertyTableNumber(String propertyPath)Warning: When there are duplicated property names in the subclasses of the class, this method may return the wrong table number for the duplicated subclass property (note that SingleTableEntityPersister defines an overloaded form which takes the entity name.TypegetSubclassPropertyType(int i)Get the type of the numbered property of the class or a subclass.protected Type[]getSubclassPropertyTypeClosure()protected abstract String[]getSubclassTableKeyColumns(int j)abstract StringgetSubclassTableName(int j)Get the name of the table with the given index from the internal array.abstract intgetSubclassTableSpan()StringgetTableAliasForColumn(String columnName, String rootAlias)Given a column name and the root table alias in use for the entity hierarchy, determine the proper table alias for the table in that hierarchy that contains said column.static intgetTableId(String tableName, String[] tables)abstract StringgetTableName(int j)String[]getTableNames()abstract intgetTableSpan()boolean[]getTableUpdateNeeded(int[] dirtyProperties, boolean hasDirtyCollection)Decide which tables need to be updated.protected static StringgetTemplateFromString(String string, SessionFactoryImplementor factory)TypegetType()Get the type of the thing containing the propertiesDiscriminatorMetadatagetTypeDiscriminatorMetadata()Retrieve the information needed to properly deal with this entity's discriminator in a query.ExecuteUpdateResultCheckStyle[]getUpdateResultCheckStyles()ObjectgetVersion(Object object)Get the version number (or timestamp) from the object's version property (or return null if not versioned)StringgetVersionColumnName()For versioned entities, get the name of the column (again, expected on the root table) used to store the version values.ComparatorgetVersionComparator()StringgetVersionedTableName()intgetVersionProperty()IfEntityPersister.isVersioned(), then what is the index of the property holding the locking value.StringgetVersionSelectString()VersionTypegetVersionType()IfEntityPersister.isVersioned(), then what is the type of the property holding the locking value.booleanhasCache()Does this class have a cache.booleanhasCascades()Determine whether this entity has any non-none cascading.booleanhasCollections()Determine whether this entity contains references to persistent collections.booleanhasEmbeddedCompositeIdentifier()booleanhasFormulaProperties()booleanhasIdentifierProperty()Determine whether the entity has a particular property holding the identifier value.booleanhasInsertGeneratedProperties()Does this entity define any properties as being database generated on insert?booleanhasLazyProperties()Determine whether this entity defines any lazy properties (ala bytecode instrumentation).booleanhasMutableProperties()Determine whether any properties of this entity are considered mutable.booleanhasNaturalIdCache()Does this class have a natural id cachebooleanhasNaturalIdentifier()Determine whether this entity defines a natural identifier.booleanhasProxy()Determine whether this entity supports dynamic proxies.booleanhasRowId()Does the result set contain rowids?booleanhasSequentialSelect()booleanhasSubclasses()Does this persistent class have subclasses?booleanhasSubselectLoadableCollections()Determine whether this entity contains references to persistent collections which are fetchable by subselect?booleanhasUninitializedLazyProperties(Object object)Does the given instance have any uninitialized lazy properties?booleanhasUpdateGeneratedProperties()Does this entity define any properties as being database generated on update?protected booleanhasWhere()Object[]hydrate(ResultSet rs, Serializable id, Object object, Loadable rootLoadable, String[][] suffixedPropertyColumns, boolean allProperties, SharedSessionContractImplementor session)Unmarshal the fields of a persistent instance from a result set, without resolving associations or collections.StringidentifierSelectFragment(String name, String suffix)Given a query alias and an identifying suffix, render the identifier select fragment.booleanimplementsLifecycle()Does the class implement theLifecycleinterface.ObjectinitializeEnhancedEntityUsedAsProxy(Object entity, String nameOfAttributeBeingAccessed, SharedSessionContractImplementor session)Called fromEnhancementAsProxyLazinessInterceptorto trigger load of the entity's non-lazy state as well as the named attribute we are accessing if it is still uninitialized after fetching non-lazy stateObjectinitializeLazyProperty(String fieldName, Object entity, SharedSessionContractImplementor session)Initialize the property, and return its new value.protected voidinitLockers()protected voidinitPropertyPaths(Mapping mapping)protected voidinitSubclassPropertyAliasesMap(PersistentClass model)Must be called by subclasses, at the end of their constructorsvoidinsert(Serializable id, Object[] fields, boolean[] notNull, int j, String sql, Object object, SharedSessionContractImplementor session)Perform an SQL INSERT.voidinsert(Serializable id, Object[] fields, Object object, SharedSessionContractImplementor session)Persist an instanceSerializableinsert(Object[] fields, boolean[] notNull, String sql, Object object, SharedSessionContractImplementor session)Perform an SQL INSERT, and then retrieve a generated identifier.Serializableinsert(Object[] fields, Object object, SharedSessionContractImplementor session)Persist an instance, using a natively generated identifier (optional operation)Objectinstantiate(Serializable id, SharedSessionContractImplementor session)Create a class instance initialized with the given identifierbooleanisAbstract()Is this an abstract class?booleanisAllNull(Object[] array, int tableNumber)booleanisBatchable()booleanisBatchLoadable()Is batch loading enabled?booleanisCacheInvalidationRequired()We can't immediately add to the cache if we have formulas which must be evaluated, or if we have the possibility of two concurrent updates to the same item being merged on the database.protected booleanisClassOrSuperclassJoin(int j)protected abstract booleanisClassOrSuperclassTable(int j)booleanisCollection()Is this instance actually a CollectionPersister?booleanisDefinedOnSubclass(int i)Is this property defined on a subclass of the mapped class.booleanisDeleteCallable(int j)booleanisExplicitPolymorphism()Is this class explicit polymorphism only?booleanisIdentifierAssignedByInsert()Are identifiers of this entity assigned known before the insert execution?booleanisInherited()Determine whether the entity is inherited one or more other entities.booleanisInsertCallable(int j)booleanisInstance(Object object)Is the given object an instance of this entity?booleanisInstrumented()Has the class actually been bytecode instrumented?protected booleanisInverseSubclassTable(int j)booleanisInverseTable(int j)booleanisLazyPropertiesCacheable()Should lazy properties of this entity be cached?booleanisModifiableEntity(EntityEntry entry)booleanisMultiTable()Is the inheritance hierarchy described by this persister contained across multiple tables?booleanisMutable()Determine whether instances of this entity are considered mutable.booleanisNaturalIdNonNullable()protected booleanisNullableSubclassTable(int j)booleanisNullableTable(int j)booleanisPolymorphic()abstract booleanisPropertyOfTable(int property, int j)booleanisSelectBeforeUpdateRequired()Is select snapshot before update enabled?booleanisSubclassEntityName(String entityName)Determine whether the given name represents a subclass entity (or this entity itself) of the entity mapped by this persister.protected booleanisSubclassPropertyDeferred(String propertyName, String entityName)booleanisSubclassPropertyNullable(int i)Is the numbered property of the class of subclass nullable?protected booleanisSubclassTableIndicatedByTreatAsDeclarations(int subclassTableNumber, Set<String> treatAsDeclarations)protected booleanisSubclassTableLazy(int j)protected booleanisSubclassTableSequentialSelect(int j)abstract booleanisTableCascadeDeleteEnabled(int j)BooleanisTransient(Object entity, SharedSessionContractImplementor session)Is this a new transient instance?booleanisUpdateCallable(int j)booleanisVersioned()Determine whether optimistic locking by column is enabled for this entity.booleanisVersionPropertyGenerated()Does this entity contain a version property that is defined to be database generated?booleanisVersionPropertyInsertable()Is the version property included in insert statements?Objectload(Serializable id, Object optionalObject, LockMode lockMode, SharedSessionContractImplementor session)Load an instance using either the forUpdateLoader or the outer joining loader, depending upon the value of the lock parameterObjectload(Serializable id, Object optionalObject, LockOptions lockOptions, SharedSessionContractImplementor session)Load an instance using either the forUpdateLoader or the outer joining loader, depending upon the value of the lock parameterObjectload(Serializable id, Object optionalObject, LockOptions lockOptions, SharedSessionContractImplementor session, Boolean readOnly)ObjectloadByUniqueKey(String propertyName, Object uniqueKey, SharedSessionContractImplementor session)Load an instance of the persistent class, by a unique key other than the primary key.SerializableloadEntityIdByNaturalId(Object[] naturalIdValues, LockOptions lockOptions, SharedSessionContractImplementor session)Load the id for the entity based on the natural id.voidlock(Serializable id, Object version, Object object, LockMode lockMode, SharedSessionContractImplementor session)Do a version check (optional operation)voidlock(Serializable id, Object version, Object object, LockOptions lockOptions, SharedSessionContractImplementor session)Do a version check (optional operation)protected voidlogStaticSQL()ListmultiLoad(Serializable[] ids, SharedSessionContractImplementor session, MultiLoadOptions loadOptions)Performs a load of multiple entities (of this type) by identifier simultaneously.StringoneToManyFilterFragment(String alias)StringoneToManyFilterFragment(String alias, Set<String> treatAsDeclarations)protected OptimisticLockStyleoptimisticLockStyle()protected voidpostConstruct(Mapping mapping)Post-construct is a callback for AbstractEntityPersister subclasses to call after they are all done with their constructor processing.voidpostInstantiate()Finish the initialization of this object.voidprocessInsertGeneratedProperties(Serializable id, Object entity, Object[] state, SharedSessionContractImplementor session)Perform a select to retrieve the values of any generated properties back from the database, injecting these generated values into the given entity as well as writing this state to thePersistenceContext.voidprocessUpdateGeneratedProperties(Serializable id, Object entity, Object[] state, SharedSessionContractImplementor session)Perform a select to retrieve the values of any generated properties back from the database, injecting these generated values into the given entity as well as writing this state to thePersistenceContext.StringpropertySelectFragment(String tableAlias, String suffix, boolean allProperties)Given a query alias and an identifying suffix, render the property select fragment.SelectFragmentpropertySelectFragmentFragment(String tableAlias, String suffix, boolean allProperties)voidregisterAffectingFetchProfile(String fetchProfileName)Register the name of a fetch profile determined to have an affect on the underlying loadable in regards to the fact that the underlying load SQL needs to be adjust when the given fetch profile is enabled.protected StringrenderSelect(int[] tableNumbers, int[] columnNumbers, int[] formulaNumbers)voidresetIdentifier(Object entity, Serializable currentId, Object currentVersion, SharedSessionContractImplementor session)Set the identifier and version of the given instance back to its "unsaved" value.int[]resolveAttributeIndexes(String[] attributeNames)Converts an array of attribute names to a set of indexes, according to the entity metamodelStringselectFragment(String alias, String suffix)Generate a list of collection index, key and element columnsStringselectFragment(Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns)All columns to select, when loading.voidsetIdentifier(Object entity, Serializable id, SharedSessionContractImplementor session)Inject the identifier value into the given entity.voidsetPropertyValue(Object object, int i, Object value)Set the value of a particular propertyvoidsetPropertyValue(Object object, String propertyName, Object value)Set the value of a particular (named) propertyvoidsetPropertyValues(Object object, Object[] values)Set the given values to the mapped properties of the given objectString[]toColumns(String propertyName)Given a property path, return the corresponding column name(s).String[]toColumns(String name, int i)Given the number of a property of a subclass, and a table alias, return the aliased column names.String[]toColumns(String alias, String propertyName)Obtain aliased column/formula fragments for the specified property path.StringtoString()TypetoType(String propertyName)Given a component path expression, get the type of the propertyvoidupdate(Serializable id, Object[] fields, int[] dirtyFields, boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object object, Object rowId, SharedSessionContractImplementor session)Update an objectbooleanupdate(Serializable id, Object[] fields, Object[] oldFields, Object rowId, boolean[] includeProperty, int j, Object oldVersion, Object object, String sql, SharedSessionContractImplementor session)voidupdateOrInsert(Serializable id, Object[] fields, Object[] oldFields, Object rowId, boolean[] includeProperty, int j, Object oldVersion, Object object, String sql, SharedSessionContractImplementor session)Perform an SQL UPDATE or SQL INSERTprotected booleanuseDynamicInsert()protected booleanuseDynamicUpdate()booleanuseGetGeneratedKeys()booleanuseInsertSelectIdentity()StringwhereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)Get the where clause part of any joins (optional operation)StringwhereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)Get the where clause part of any joins (optional operation)-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 org.hibernate.metadata.ClassMetadata
getIdentifier, getPropertyValuesToInsert, instantiate, setIdentifier
-
从接口继承的方法 org.hibernate.persister.entity.EntityPersister
canIdentityInsertBeDelayed, getFilterAliasGenerator, getPropertySpaces, load
-
从接口继承的方法 org.hibernate.persister.entity.Joinable
getTableName
-
从接口继承的方法 org.hibernate.persister.entity.Loadable
getDiscriminatorType, getDiscriminatorValue, getSubclassForDiscriminatorValue
-
从接口继承的方法 org.hibernate.persister.entity.OuterJoinLoadable
fromTableFragment, getPropertyTableName, getSubclassPropertyTableName
-
从接口继承的方法 org.hibernate.persister.entity.Queryable
getConstraintOrderedTableNameClosure, getContraintOrderedTableKeyColumnClosure, getDiscriminatorSQLValue
-
-
-
-
字段详细资料
-
batchSize
protected final int batchSize
-
rowIdName
protected final String rowIdName
-
insertCallable
protected boolean[] insertCallable
-
updateCallable
protected boolean[] updateCallable
-
deleteCallable
protected boolean[] deleteCallable
-
customSQLInsert
protected String[] customSQLInsert
-
customSQLUpdate
protected String[] customSQLUpdate
-
customSQLDelete
protected String[] customSQLDelete
-
insertResultCheckStyles
protected ExecuteUpdateResultCheckStyle[] insertResultCheckStyles
-
updateResultCheckStyles
protected ExecuteUpdateResultCheckStyle[] updateResultCheckStyles
-
deleteResultCheckStyles
protected ExecuteUpdateResultCheckStyle[] deleteResultCheckStyles
-
propertyMapping
protected final BasicEntityPropertyMapping propertyMapping
Warning: When there are duplicated property names in the subclasses then propertyMapping will only contain one of those properties. To ensure correct results, propertyMapping should only be used for the concrete EntityPersister (since the concrete EntityPersister cannot have duplicated property names).
-
-
构造器详细资料
-
AbstractEntityPersister
public AbstractEntityPersister(PersistentClass persistentClass, EntityDataAccess cacheAccessStrategy, NaturalIdDataAccess naturalIdRegionAccessStrategy, PersisterCreationContext creationContext) throws HibernateException
-
-
方法详细资料
-
addDiscriminatorToInsert
protected void addDiscriminatorToInsert(Insert insert)
-
addDiscriminatorToSelect
protected void addDiscriminatorToSelect(SelectFragment select, String name, String suffix)
-
getSubclassColumnTableNumberClosure
protected abstract int[] getSubclassColumnTableNumberClosure()
-
getSubclassFormulaTableNumberClosure
protected abstract int[] getSubclassFormulaTableNumberClosure()
-
getSubclassTableName
public abstract String getSubclassTableName(int j)
从接口复制的说明:QueryableGet the name of the table with the given index from the internal array.- 指定者:
getSubclassTableName在接口中Queryable- 参数:
j- The index into the internal array.
-
getSubclassTableKeyColumns
protected abstract String[] getSubclassTableKeyColumns(int j)
-
isClassOrSuperclassTable
protected abstract boolean isClassOrSuperclassTable(int j)
-
isClassOrSuperclassJoin
protected boolean isClassOrSuperclassJoin(int j)
-
getSubclassTableSpan
public abstract int getSubclassTableSpan()
-
getTableSpan
public abstract int getTableSpan()
-
isTableCascadeDeleteEnabled
public abstract boolean isTableCascadeDeleteEnabled(int j)
-
getTableName
public abstract String getTableName(int j)
-
getKeyColumns
public abstract String[] getKeyColumns(int j)
-
isPropertyOfTable
public abstract boolean isPropertyOfTable(int property, int j)
-
getPropertyTableNumbersInSelect
protected abstract int[] getPropertyTableNumbersInSelect()
-
getPropertyTableNumbers
protected abstract int[] getPropertyTableNumbers()
-
getSubclassPropertyTableNumber
protected abstract int getSubclassPropertyTableNumber(int i)
-
filterFragment
protected abstract String filterFragment(String alias) throws MappingException
- 抛出:
MappingException
-
filterFragment
protected abstract String filterFragment(String alias, Set<String> treatAsDeclarations)
-
getDiscriminatorColumnName
public String getDiscriminatorColumnName()
- 指定者:
getDiscriminatorColumnName在接口中Loadable- 返回:
- the column name for the discriminator as specified in the mapping.
-
getDiscriminatorColumnReaders
public String getDiscriminatorColumnReaders()
-
getDiscriminatorColumnReaderTemplate
public String getDiscriminatorColumnReaderTemplate()
-
getDiscriminatorAlias
public String getDiscriminatorAlias()
-
getDiscriminatorFormulaTemplate
public String getDiscriminatorFormulaTemplate()
-
isInverseTable
public boolean isInverseTable(int j)
-
isNullableTable
public boolean isNullableTable(int j)
-
isNullableSubclassTable
protected boolean isNullableSubclassTable(int j)
-
isInverseSubclassTable
protected boolean isInverseSubclassTable(int j)
-
isSubclassEntityName
public boolean isSubclassEntityName(String entityName)
从接口复制的说明:EntityPersisterDetermine whether the given name represents a subclass entity (or this entity itself) of the entity mapped by this persister.- 指定者:
isSubclassEntityName在接口中EntityPersister- 参数:
entityName- The entity name to be checked.- 返回:
- True if the given entity name represents either the entity mapped by this persister or one of its subclass entities; false otherwise.
-
getRootTableKeyColumnNames
public String[] getRootTableKeyColumnNames()
从接口复制的说明:PostInsertIdentityPersisterThe names of the primary key columns in the root table.- 指定者:
getRootTableKeyColumnNames在接口中PostInsertIdentityPersister- 返回:
- The primary key column names.
-
getSQLUpdateByRowIdStrings
public String[] getSQLUpdateByRowIdStrings()
-
getSQLLazyUpdateByRowIdStrings
public String[] getSQLLazyUpdateByRowIdStrings()
-
getSQLSnapshotSelectString
public String getSQLSnapshotSelectString()
-
getSQLDeleteStrings
public String[] getSQLDeleteStrings()
-
getSQLInsertStrings
public String[] getSQLInsertStrings()
-
getSQLUpdateStrings
public String[] getSQLUpdateStrings()
-
getSQLLazyUpdateStrings
public String[] getSQLLazyUpdateStrings()
-
getInsertResultCheckStyles
public ExecuteUpdateResultCheckStyle[] getInsertResultCheckStyles()
-
getUpdateResultCheckStyles
public ExecuteUpdateResultCheckStyle[] getUpdateResultCheckStyles()
-
getDeleteResultCheckStyles
public ExecuteUpdateResultCheckStyle[] getDeleteResultCheckStyles()
-
getSQLIdentityInsertString
public String getSQLIdentityInsertString()
The query that inserts a row, letting the database generate an id- 返回:
- The IDENTITY-based insertion query.
-
getVersionSelectString
public String getVersionSelectString()
-
isInsertCallable
public boolean isInsertCallable(int j)
-
isUpdateCallable
public boolean isUpdateCallable(int j)
-
isDeleteCallable
public boolean isDeleteCallable(int j)
-
isSubclassPropertyDeferred
protected boolean isSubclassPropertyDeferred(String propertyName, String entityName)
-
isSubclassTableSequentialSelect
protected boolean isSubclassTableSequentialSelect(int j)
-
hasSequentialSelect
public boolean hasSequentialSelect()
-
getTableUpdateNeeded
public boolean[] getTableUpdateNeeded(int[] dirtyProperties, boolean hasDirtyCollection)Decide which tables need to be updated. The return here is an array of boolean values with each index corresponding to a given table in the scope of this persister.- 参数:
dirtyProperties- The indices of all the entity properties considered dirty.hasDirtyCollection- Whether any collections owned by the entity which were considered dirty.- 返回:
- Array of booleans indicating which table require updating.
-
hasRowId
public boolean hasRowId()
从接口复制的说明:LoadableDoes the result set contain rowids?
-
getPropertyColumnUpdateable
public boolean[][] getPropertyColumnUpdateable()
-
getPropertyColumnInsertable
public boolean[][] getPropertyColumnInsertable()
-
getPropertySelectable
public boolean[] getPropertySelectable()
-
getTableNames
public String[] getTableNames()
-
buildCacheEntryHelper
protected AbstractEntityPersister.CacheEntryHelper buildCacheEntryHelper()
-
canUseReferenceCacheEntries
public boolean canUseReferenceCacheEntries()
- 指定者:
canUseReferenceCacheEntries在接口中EntityPersister
-
getTemplateFromString
protected static String getTemplateFromString(String string, SessionFactoryImplementor factory)
-
generateLazySelectStringsByFetchGroup
protected Map<String,String> generateLazySelectStringsByFetchGroup()
-
initializeLazyProperty
public Object initializeLazyProperty(String fieldName, Object entity, SharedSessionContractImplementor session)
从接口复制的说明:LazyPropertyInitializerInitialize the property, and return its new value.- 指定者:
initializeLazyProperty在接口中LazyPropertyInitializer- 参数:
fieldName- The name of the field being initializedentity- The entity on which the initialization is occurringsession- The session from which the initialization originated.- 返回:
- ?
-
getCollectionKey
protected Serializable getCollectionKey(CollectionPersister persister, Object owner, EntityEntry ownerEntry, SharedSessionContractImplementor session)
-
isBatchable
public boolean isBatchable()
-
getNavigableRole
public NavigableRole getNavigableRole()
- 指定者:
getNavigableRole在接口中EntityPersister
-
getQuerySpaces
public Serializable[] getQuerySpaces()
从接口复制的说明:EntityPersisterReturns an array of objects that identify spaces in which properties of this entity are persisted, for instances of this class and its subclasses. Much likeEntityPersister.getPropertySpaces(), except that here we include subclass entity spaces.- 指定者:
getQuerySpaces在接口中EntityPersister- 返回:
- The query spaces.
-
isBatchLoadable
public boolean isBatchLoadable()
从接口复制的说明:EntityPersisterIs batch loading enabled?- 指定者:
isBatchLoadable在接口中EntityPersister
-
getIdentifierColumnNames
public String[] getIdentifierColumnNames()
从接口复制的说明:LoadableGet the names of columns used to persist the identifier- 指定者:
getIdentifierColumnNames在接口中Loadable- 指定者:
getIdentifierColumnNames在接口中PostInsertIdentityPersister- 指定者:
getIdentifierColumnNames在接口中Queryable
-
getIdentifierColumnReaders
public String[] getIdentifierColumnReaders()
-
getIdentifierColumnReaderTemplates
public String[] getIdentifierColumnReaderTemplates()
-
getIdentifierColumnSpan
public int getIdentifierColumnSpan()
-
getIdentifierAliases
public String[] getIdentifierAliases()
-
getVersionColumnName
public String getVersionColumnName()
从接口复制的说明:LockableFor versioned entities, get the name of the column (again, expected on the root table) used to store the version values.- 指定者:
getVersionColumnName在接口中Lockable- 返回:
- The version column name.
-
getVersionedTableName
public String getVersionedTableName()
-
getSubclassColumnLazyiness
protected boolean[] getSubclassColumnLazyiness()
-
getSubclassFormulaLazyiness
protected boolean[] getSubclassFormulaLazyiness()
-
isCacheInvalidationRequired
public boolean isCacheInvalidationRequired()
We can't immediately add to the cache if we have formulas which must be evaluated, or if we have the possibility of two concurrent updates to the same item being merged on the database. This can happen if (a) the item is not versioned and either (b) we have dynamic update enabled or (c) we have multiple tables holding the state of the item.- 指定者:
isCacheInvalidationRequired在接口中EntityPersister
-
isLazyPropertiesCacheable
public boolean isLazyPropertiesCacheable()
从接口复制的说明:EntityPersisterShould lazy properties of this entity be cached?- 指定者:
isLazyPropertiesCacheable在接口中EntityPersister
-
selectFragment
public String selectFragment(String alias, String suffix)
从接口复制的说明:OuterJoinLoadableGenerate a list of collection index, key and element columns- 指定者:
selectFragment在接口中OuterJoinLoadable- 指定者:
selectFragment在接口中SQLLoadable
-
getIdentifierAliases
public String[] getIdentifierAliases(String suffix)
从接口复制的说明:LoadableGet the result set aliases used for the identifier columns, given a suffix- 指定者:
getIdentifierAliases在接口中Loadable
-
getPropertyAliases
public String[] getPropertyAliases(String suffix, int i)
从接口复制的说明:LoadableGet the result set aliases used for the property columns, given a suffix (properties of this class, only).- 指定者:
getPropertyAliases在接口中Loadable
-
getDiscriminatorAlias
public String getDiscriminatorAlias(String suffix)
从接口复制的说明:LoadableGet the result set aliases used for the identifier columns, given a suffix- 指定者:
getDiscriminatorAlias在接口中Loadable
-
identifierSelectFragment
public String identifierSelectFragment(String name, String suffix)
从接口复制的说明:QueryableGiven a query alias and an identifying suffix, render the identifier select fragment.- 指定者:
identifierSelectFragment在接口中Queryable
-
propertySelectFragment
public String propertySelectFragment(String tableAlias, String suffix, boolean allProperties)
从接口复制的说明:QueryableGiven a query alias and an identifying suffix, render the property select fragment.- 指定者:
propertySelectFragment在接口中Queryable
-
propertySelectFragmentFragment
public SelectFragment propertySelectFragmentFragment(String tableAlias, String suffix, boolean allProperties)
- 指定者:
propertySelectFragmentFragment在接口中Queryable
-
getDatabaseSnapshot
public Object[] getDatabaseSnapshot(Serializable id, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:EntityPersisterGet the current database state of the object, in a "hydrated" form, without resolving identifiers- 指定者:
getDatabaseSnapshot在接口中EntityPersister- 返回:
- null if there is no row in the database
- 抛出:
HibernateException
-
getIdByUniqueKey
public Serializable getIdByUniqueKey(Serializable key, String uniquePropertyName, SharedSessionContractImplementor session) throws HibernateException
- 指定者:
getIdByUniqueKey在接口中EntityPersister- 抛出:
HibernateException
-
generateIdByUniqueKeySelectString
public String generateIdByUniqueKeySelectString(String uniquePropertyName)
-
generateSelectVersionString
public String generateSelectVersionString()
Generate the SQL that selects the version number by id
-
getPropertyUniqueness
public boolean[] getPropertyUniqueness()
-
generateInsertGeneratedValuesSelectString
public String generateInsertGeneratedValuesSelectString()
-
generateUpdateGeneratedValuesSelectString
public String generateUpdateGeneratedValuesSelectString()
-
concretePropertySelectFragment
protected String concretePropertySelectFragment(String alias, boolean[] includeProperty)
-
concretePropertySelectFragment
protected String concretePropertySelectFragment(String alias, AbstractEntityPersister.InclusionChecker inclusionChecker)
-
generateSnapshotSelectString
public String generateSnapshotSelectString()
-
forceVersionIncrement
public Object forceVersionIncrement(Serializable id, Object currentVersion, SharedSessionContractImplementor session)
- 指定者:
forceVersionIncrement在接口中EntityPersister
-
getCurrentVersion
public Object getCurrentVersion(Serializable id, SharedSessionContractImplementor session) throws HibernateException
Retrieve the version number- 指定者:
getCurrentVersion在接口中EntityPersister- 抛出:
HibernateException
-
initLockers
protected void initLockers()
-
generateLocker
protected LockingStrategy generateLocker(LockMode lockMode)
-
lock
public void lock(Serializable id, Object version, Object object, LockMode lockMode, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:EntityPersisterDo a version check (optional operation)- 指定者:
lock在接口中EntityPersister- 抛出:
HibernateException
-
lock
public void lock(Serializable id, Object version, Object object, LockOptions lockOptions, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:EntityPersisterDo a version check (optional operation)- 指定者:
lock在接口中EntityPersister- 抛出:
HibernateException
-
getRootTableName
public String getRootTableName()
从接口复制的说明:LockableLocks are always applied to the "root table".- 指定者:
getRootTableName在接口中Lockable- 返回:
- The root table name
-
getRootTableAlias
public String getRootTableAlias(String drivingAlias)
从接口复制的说明:LockableGet the SQL alias this persister would use for the root table given the passed driving alias.- 指定者:
getRootTableAlias在接口中Lockable- 参数:
drivingAlias- The driving alias; or the alias for the table mapped by this persister in the hierarchy.- 返回:
- The root table alias.
-
getRootTableIdentifierColumnNames
public String[] getRootTableIdentifierColumnNames()
从接口复制的说明:LockableGet the names of columns on the root table used to persist the identifier.- 指定者:
getRootTableIdentifierColumnNames在接口中Lockable- 返回:
- The root table identifier column names.
-
toColumns
public String[] toColumns(String alias, String propertyName) throws QueryException
Obtain aliased column/formula fragments for the specified property path. Warning: When there are duplicated property names in the subclasses then this method may return the wrong results. To ensure correct results, this method should only be used when this is the concrete EntityPersister (since the concrete EntityPersister cannot have duplicated property names).- 指定者:
toColumns在接口中PropertyMapping- 抛出:
QueryException
-
toColumns
public String[] toColumns(String propertyName) throws QueryException
Given a property path, return the corresponding column name(s). Warning: When there are duplicated property names in the subclasses then this method may return the wrong results. To ensure correct results, this method should only be used when this is the concrete EntityPersister (since the concrete EntityPersister cannot have duplicated property names).- 指定者:
toColumns在接口中PropertyMapping- 抛出:
QueryException
-
toType
public Type toType(String propertyName) throws QueryException
Given a component path expression, get the type of the property Warning: When there are duplicated property names in the subclasses then this method may return the wrong results. To ensure correct results, this method should only be used when this is the concrete EntityPersister (since the concrete EntityPersister cannot have duplicated property names).- 指定者:
toType在接口中PropertyMapping- 抛出:
QueryException
-
getPropertyColumnNames
public String[] getPropertyColumnNames(String propertyName)
Get the column names for the given property path Warning: When there are duplicated property names in the subclasses then this method may return the wrong results. To ensure correct results, this method should only be used when this is the concrete EntityPersister (since the concrete EntityPersister cannot have duplicated property names).- 指定者:
getPropertyColumnNames在接口中OuterJoinLoadable
-
getSubclassPropertyTableNumber
public int getSubclassPropertyTableNumber(String propertyPath)
Warning: When there are duplicated property names in the subclasses of the class, this method may return the wrong table number for the duplicated subclass property (note that SingleTableEntityPersister defines an overloaded form which takes the entity name.- 指定者:
getSubclassPropertyTableNumber在接口中Queryable- 参数:
propertyPath- The name of the property.- 返回:
- The number of the table to which the property is mapped.
-
getSubclassPropertyDeclarer
public Queryable.Declarer getSubclassPropertyDeclarer(String propertyPath)
从接口复制的说明:QueryableDetermine whether the given property is declared by our mapped class, our super class, or one of our subclasses... Note: the method is called 'subclass property...' simply for consistency sake (e.g.Queryable.getSubclassPropertyTableNumber(java.lang.String)- 指定者:
getSubclassPropertyDeclarer在接口中Queryable- 参数:
propertyPath- The property name.- 返回:
- The property declarer
-
getTypeDiscriminatorMetadata
public DiscriminatorMetadata getTypeDiscriminatorMetadata()
从接口复制的说明:QueryableRetrieve the information needed to properly deal with this entity's discriminator in a query.- 指定者:
getTypeDiscriminatorMetadata在接口中Queryable- 返回:
- The entity discriminator metadata
-
toColumns
public String[] toColumns(String name, int i)
从接口复制的说明:OuterJoinLoadableGiven the number of a property of a subclass, and a table alias, return the aliased column names.- 指定者:
toColumns在接口中OuterJoinLoadable
-
getPropertySubclassNames
protected String[] getPropertySubclassNames()
-
getPropertyColumnNames
public String[] getPropertyColumnNames(int i)
从接口复制的说明:LoadableGet the result set column names mapped for this property (properties of this class, only).- 指定者:
getPropertyColumnNames在接口中Loadable
-
getPropertyColumnWriters
public String[] getPropertyColumnWriters(int i)
-
getPropertyColumnSpan
public int getPropertyColumnSpan(int i)
-
hasFormulaProperties
public boolean hasFormulaProperties()
-
getFetchMode
public FetchMode getFetchMode(int i)
从接口复制的说明:OuterJoinLoadableMay this (subclass closure) property be fetched using an SQL outerjoin?- 指定者:
getFetchMode在接口中OuterJoinLoadable
-
getCascadeStyle
public CascadeStyle getCascadeStyle(int i)
从接口复制的说明:OuterJoinLoadableGet the cascade style of this (subclass closure) property- 指定者:
getCascadeStyle在接口中OuterJoinLoadable
-
getSubclassPropertyType
public Type getSubclassPropertyType(int i)
从接口复制的说明:OuterJoinLoadableGet the type of the numbered property of the class or a subclass.- 指定者:
getSubclassPropertyType在接口中OuterJoinLoadable
-
getSubclassPropertyName
public String getSubclassPropertyName(int i)
从接口复制的说明:OuterJoinLoadableGet the name of the numbered property of the class or a subclass.- 指定者:
getSubclassPropertyName在接口中OuterJoinLoadable
-
countSubclassProperties
public int countSubclassProperties()
从接口复制的说明:OuterJoinLoadableHow many properties are there, for this class and all subclasses?- 指定者:
countSubclassProperties在接口中OuterJoinLoadable
-
getSubclassPropertyColumnNames
public String[] getSubclassPropertyColumnNames(int i)
从接口复制的说明:OuterJoinLoadableReturn the column names used to persist the numbered property of the class or a subclass.
-
isDefinedOnSubclass
public boolean isDefinedOnSubclass(int i)
从接口复制的说明:OuterJoinLoadableIs this property defined on a subclass of the mapped class.- 指定者:
isDefinedOnSubclass在接口中OuterJoinLoadable
-
getSubclassPropertyFormulaTemplateClosure
public String[][] getSubclassPropertyFormulaTemplateClosure()
-
getSubclassPropertyTypeClosure
protected Type[] getSubclassPropertyTypeClosure()
-
getSubclassPropertyColumnNameClosure
protected String[][] getSubclassPropertyColumnNameClosure()
-
getSubclassPropertyColumnReaderClosure
public String[][] getSubclassPropertyColumnReaderClosure()
-
getSubclassPropertyColumnReaderTemplateClosure
public String[][] getSubclassPropertyColumnReaderTemplateClosure()
-
getSubclassPropertyNameClosure
protected String[] getSubclassPropertyNameClosure()
-
resolveAttributeIndexes
public int[] resolveAttributeIndexes(String[] attributeNames)
从接口复制的说明:EntityPersisterConverts an array of attribute names to a set of indexes, according to the entity metamodel- 指定者:
resolveAttributeIndexes在接口中EntityPersister- 参数:
attributeNames- Array of names to be resolved- 返回:
- A set of unique indexes of the attribute names found in the metamodel
-
getSubclassPropertySubclassNameClosure
protected String[] getSubclassPropertySubclassNameClosure()
-
getSubclassColumnClosure
protected String[] getSubclassColumnClosure()
-
getSubclassColumnAliasClosure
protected String[] getSubclassColumnAliasClosure()
-
getSubclassColumnReaderTemplateClosure
public String[] getSubclassColumnReaderTemplateClosure()
-
getSubclassFormulaClosure
protected String[] getSubclassFormulaClosure()
-
getSubclassFormulaTemplateClosure
protected String[] getSubclassFormulaTemplateClosure()
-
getSubclassFormulaAliasClosure
protected String[] getSubclassFormulaAliasClosure()
-
getSubclassPropertyColumnAliases
public String[] getSubclassPropertyColumnAliases(String propertyName, String suffix)
从接口复制的说明:SQLLoadableReturn the column alias names used to persist/query the named property of the class or a subclass (optional operation).- 指定者:
getSubclassPropertyColumnAliases在接口中SQLLoadable
-
getSubclassPropertyColumnNames
public String[] getSubclassPropertyColumnNames(String propertyName)
从接口复制的说明:SQLLoadableReturn the column names used to persist/query the named property of the class or a subclass (optional operation).- 指定者:
getSubclassPropertyColumnNames在接口中SQLLoadable
-
initSubclassPropertyAliasesMap
protected void initSubclassPropertyAliasesMap(PersistentClass model) throws MappingException
Must be called by subclasses, at the end of their constructors- 抛出:
MappingException
-
loadByUniqueKey
public Object loadByUniqueKey(String propertyName, Object uniqueKey, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:UniqueKeyLoadableLoad an instance of the persistent class, by a unique key other than the primary key.- 指定者:
loadByUniqueKey在接口中UniqueKeyLoadable- 抛出:
HibernateException
-
getPropertyIndex
public int getPropertyIndex(String propertyName)
从接口复制的说明:UniqueKeyLoadableGet the property number of the unique key property- 指定者:
getPropertyIndex在接口中UniqueKeyLoadable
-
createUniqueKeyLoaders
protected void createUniqueKeyLoaders() throws MappingException- 抛出:
MappingException
-
hasWhere
protected boolean hasWhere()
-
initPropertyPaths
protected void initPropertyPaths(Mapping mapping) throws MappingException
- 抛出:
MappingException
-
createEntityLoader
protected UniqueEntityLoader createEntityLoader(LockMode lockMode, LoadQueryInfluencers loadQueryInfluencers) throws MappingException
- 抛出:
MappingException
-
createEntityLoader
protected UniqueEntityLoader createEntityLoader(LockOptions lockOptions, LoadQueryInfluencers loadQueryInfluencers) throws MappingException
- 抛出:
MappingException
-
createEntityLoader
protected UniqueEntityLoader createEntityLoader(LockMode lockMode) throws MappingException
Used internally to create static loaders. These are the default set of loaders used to handle get()/load() processing. lock() handling is done by the LockingStrategy instances (seegetLocker(org.hibernate.LockMode))- 参数:
lockMode- The lock mode to apply to the thing being loaded.- 返回:
- The UniqueEntityLoader.
- 抛出:
MappingException
-
check
protected boolean check(int rows, Serializable id, int tableNumber, Expectation expectation, PreparedStatement statement) throws HibernateException
-
generateUpdateString
public String generateUpdateString(boolean[] includeProperty, int j, boolean useRowId)
-
generateUpdateString
public String generateUpdateString(boolean[] includeProperty, int j, Object[] oldFields, boolean useRowId)
Generate the SQL that updates a row by id (and version)
-
checkVersion
public final boolean checkVersion(boolean[] includeProperty)
-
generateInsertString
public String generateInsertString(boolean[] includeProperty, int j)
-
generateInsertString
public String generateInsertString(boolean identityInsert, boolean[] includeProperty)
-
generateInsertString
public String generateInsertString(boolean identityInsert, boolean[] includeProperty, int j)
Generate the SQL that inserts a row
-
generateIdentityInsertString
public String generateIdentityInsertString(boolean[] includeProperty)
Used to generate an insert statement against the root table in the case of identifier generation strategies where the insert statement executions actually generates the identifier value.- 参数:
includeProperty- indices of the properties to include in the insert statement.- 返回:
- The insert SQL statement string
-
generateDeleteString
public String generateDeleteString(int j)
Generate the SQL that deletes a row by id (and version)
-
dehydrate
public int dehydrate(Serializable id, Object[] fields, boolean[] includeProperty, boolean[][] includeColumns, int j, PreparedStatement st, SharedSessionContractImplementor session, boolean isUpdate) throws HibernateException, SQLException
-
dehydrate
public int dehydrate(Serializable id, Object[] fields, Object rowId, boolean[] includeProperty, boolean[][] includeColumns, int j, PreparedStatement ps, SharedSessionContractImplementor session, int index, boolean isUpdate) throws SQLException, HibernateException
Marshall the fields of a persistent instance to a prepared statement
-
hydrate
public Object[] hydrate(ResultSet rs, Serializable id, Object object, Loadable rootLoadable, String[][] suffixedPropertyColumns, boolean allProperties, SharedSessionContractImplementor session) throws SQLException, HibernateException
Unmarshal the fields of a persistent instance from a result set, without resolving associations or collections. Question: should this really be here, or should it be sent back to Loader?- 指定者:
hydrate在接口中Loadable- 抛出:
SQLExceptionHibernateException
-
useInsertSelectIdentity
public boolean useInsertSelectIdentity()
-
useGetGeneratedKeys
public boolean useGetGeneratedKeys()
-
insert
public Serializable insert(Object[] fields, boolean[] notNull, String sql, Object object, SharedSessionContractImplementor session) throws HibernateException
Perform an SQL INSERT, and then retrieve a generated identifier. This form is used for PostInsertIdentifierGenerator-style ids (IDENTITY, select, etc).
-
getIdentitySelectString
public String getIdentitySelectString()
从接口复制的说明:PostInsertIdentityPersisterGet the database-specific SQL command to retrieve the last generated IDENTITY value.- 指定者:
getIdentitySelectString在接口中PostInsertIdentityPersister- 返回:
- The SQL command string
-
getSelectByUniqueKeyString
public String getSelectByUniqueKeyString(String propertyName)
从接口复制的说明:PostInsertIdentityPersisterGet a SQL select string that performs a select based on a unique key determined by the given property name).- 指定者:
getSelectByUniqueKeyString在接口中PostInsertIdentityPersister- 参数:
propertyName- The name of the property which maps to the column(s) to use in the select statement restriction.- 返回:
- The SQL select string
-
insert
public void insert(Serializable id, Object[] fields, boolean[] notNull, int j, String sql, Object object, SharedSessionContractImplementor session) throws HibernateException
Perform an SQL INSERT. This for is used for all non-root tables as well as the root table in cases where the identifier value is known before the insert occurs.
-
updateOrInsert
public void updateOrInsert(Serializable id, Object[] fields, Object[] oldFields, Object rowId, boolean[] includeProperty, int j, Object oldVersion, Object object, String sql, SharedSessionContractImplementor session) throws HibernateException
Perform an SQL UPDATE or SQL INSERT
-
update
public boolean update(Serializable id, Object[] fields, Object[] oldFields, Object rowId, boolean[] includeProperty, int j, Object oldVersion, Object object, String sql, SharedSessionContractImplementor session) throws HibernateException
-
delete
public void delete(Serializable id, Object version, int j, Object object, String sql, SharedSessionContractImplementor session, Object[] loadedState) throws HibernateException
Perform an SQL DELETE
-
update
public void update(Serializable id, Object[] fields, int[] dirtyFields, boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object object, Object rowId, SharedSessionContractImplementor session) throws HibernateException
Update an object- 指定者:
update在接口中EntityPersister- 抛出:
HibernateException
-
insert
public Serializable insert(Object[] fields, Object object, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:EntityPersisterPersist an instance, using a natively generated identifier (optional operation)- 指定者:
insert在接口中EntityPersister- 抛出:
HibernateException
-
insert
public void insert(Serializable id, Object[] fields, Object object, SharedSessionContractImplementor session)
从接口复制的说明:EntityPersisterPersist an instance- 指定者:
insert在接口中EntityPersister
-
delete
public void delete(Serializable id, Object version, Object object, SharedSessionContractImplementor session) throws HibernateException
Delete an object- 指定者:
delete在接口中EntityPersister- 抛出:
HibernateException
-
logStaticSQL
protected void logStaticSQL()
-
filterFragment
public String filterFragment(String alias, Map enabledFilters) throws MappingException
从接口复制的说明:JoinableGet the where clause filter, given a query alias and considering enabled session filters- 指定者:
filterFragment在接口中Joinable- 抛出:
MappingException
-
filterFragment
public String filterFragment(String alias, Map enabledFilters, Set<String> treatAsDeclarations)
从接口复制的说明:JoinableGet the where clause filter, given a query alias and considering enabled session filters- 指定者:
filterFragment在接口中Joinable
-
generateFilterConditionAlias
public String generateFilterConditionAlias(String rootAlias)
从接口复制的说明:QueryableThe alias used for any filter conditions (mapped where-fragments or enabled-filters). This may or may not be different from the root alias depending upon the inheritance mapping strategy.- 指定者:
generateFilterConditionAlias在接口中Queryable- 参数:
rootAlias- The root alias- 返回:
- The alias used for "filter conditions" within the where clause.
-
oneToManyFilterFragment
public String oneToManyFilterFragment(String alias) throws MappingException
- 指定者:
oneToManyFilterFragment在接口中Joinable- 抛出:
MappingException
-
oneToManyFilterFragment
public String oneToManyFilterFragment(String alias, Set<String> treatAsDeclarations)
- 指定者:
oneToManyFilterFragment在接口中Joinable
-
fromJoinFragment
public String fromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)
从接口复制的说明:JoinableGet the from clause part of any joins (optional operation)- 指定者:
fromJoinFragment在接口中Joinable
-
fromJoinFragment
public String fromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)
从接口复制的说明:JoinableGet the from clause part of any joins (optional operation)- 指定者:
fromJoinFragment在接口中Joinable
-
fromJoinFragment
public String fromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations, Set<String> referencedTables)
从接口复制的说明:JoinableGet the from clause part of any joins (optional operation)- 指定者:
fromJoinFragment在接口中Joinable
-
whereJoinFragment
public String whereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)
从接口复制的说明:JoinableGet the where clause part of any joins (optional operation)- 指定者:
whereJoinFragment在接口中Joinable
-
whereJoinFragment
public String whereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)
从接口复制的说明:JoinableGet the where clause part of any joins (optional operation)- 指定者:
whereJoinFragment在接口中Joinable
-
isSubclassTableLazy
protected boolean isSubclassTableLazy(int j)
-
createJoin
protected JoinFragment createJoin(String name, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)
-
createJoin
protected JoinFragment createJoin(String name, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations, Set<String> referencedTables)
-
determineSubclassTableJoinType
protected JoinType determineSubclassTableJoinType(int subclassTableNumber, boolean canInnerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)
-
determineSubclassTableJoinType
protected JoinType determineSubclassTableJoinType(int subclassTableNumber, boolean canInnerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations, Set<String> referencedTables)
-
isSubclassTableIndicatedByTreatAsDeclarations
protected boolean isSubclassTableIndicatedByTreatAsDeclarations(int subclassTableNumber, Set<String> treatAsDeclarations)
-
createJoin
protected JoinFragment createJoin(int[] tableNumbers, String drivingAlias)
-
createSelect
protected SelectFragment createSelect(int[] subclassColumnNumbers, int[] subclassFormulaNumbers)
-
renderSelect
protected String renderSelect(int[] tableNumbers, int[] columnNumbers, int[] formulaNumbers)
-
postConstruct
protected void postConstruct(Mapping mapping) throws MappingException
Post-construct is a callback for AbstractEntityPersister subclasses to call after they are all done with their constructor processing. It allows AbstractEntityPersister to extend its construction after all subclass-specific details have been handled.- 参数:
mapping- The mapping- 抛出:
MappingException- Indicates a problem accessing the Mapping
-
postInstantiate
public final void postInstantiate() throws MappingException从接口复制的说明:EntityPersisterFinish the initialization of this object.EntityPersister.generateEntityDefinition()must be called for all entity persisters before calling this method. Called only once perSessionFactorylifecycle, after all entity persisters have been instantiated.- 指定者:
postInstantiate在接口中EntityPersister- 抛出:
MappingException- Indicates an issue in the metadata.
-
doPostInstantiate
protected void doPostInstantiate()
-
getLoaders
@Deprecated protected Map getLoaders()
已过时。Because there are better patterns for this"Needed" by subclasses to override the createLoader strategy
-
createLoaders
protected void createLoaders()
-
getLoaderByLockMode
protected final UniqueEntityLoader getLoaderByLockMode(LockMode lockMode)
-
createQueryLoader
protected void createQueryLoader()
-
load
public Object load(Serializable id, Object optionalObject, LockMode lockMode, SharedSessionContractImplementor session)
Load an instance using either the forUpdateLoader or the outer joining loader, depending upon the value of the lock parameter- 指定者:
load在接口中EntityPersister
-
load
public Object load(Serializable id, Object optionalObject, LockOptions lockOptions, SharedSessionContractImplementor session) throws HibernateException
Load an instance using either the forUpdateLoader or the outer joining loader, depending upon the value of the lock parameter- 指定者:
load在接口中EntityPersister- 抛出:
HibernateException
-
load
public Object load(Serializable id, Object optionalObject, LockOptions lockOptions, SharedSessionContractImplementor session, Boolean readOnly) throws HibernateException
- 指定者:
load在接口中EntityPersister- 抛出:
HibernateException
-
initializeEnhancedEntityUsedAsProxy
public Object initializeEnhancedEntityUsedAsProxy(Object entity, String nameOfAttributeBeingAccessed, SharedSessionContractImplementor session)
从接口复制的说明:EntityPersisterCalled fromEnhancementAsProxyLazinessInterceptorto trigger load of the entity's non-lazy state as well as the named attribute we are accessing if it is still uninitialized after fetching non-lazy state
-
multiLoad
public List multiLoad(Serializable[] ids, SharedSessionContractImplementor session, MultiLoadOptions loadOptions)
从接口复制的说明:EntityPersisterPerforms a load of multiple entities (of this type) by identifier simultaneously.- 指定者:
multiLoad在接口中EntityPersister- 参数:
ids- The identifiers to loadsession- The originating SessionloadOptions- The options for loading- 返回:
- The loaded, matching entities
-
registerAffectingFetchProfile
public void registerAffectingFetchProfile(String fetchProfileName)
从接口复制的说明:LoadableRegister the name of a fetch profile determined to have an affect on the underlying loadable in regards to the fact that the underlying load SQL needs to be adjust when the given fetch profile is enabled.- 指定者:
registerAffectingFetchProfile在接口中Loadable- 参数:
fetchProfileName- The name of the profile affecting this.
-
getAppropriateLoader
protected UniqueEntityLoader getAppropriateLoader(LockOptions lockOptions, SharedSessionContractImplementor session)
-
isAllNull
public final boolean isAllNull(Object[] array, int tableNumber)
-
isSubclassPropertyNullable
public boolean isSubclassPropertyNullable(int i)
从接口复制的说明:OuterJoinLoadableIs the numbered property of the class of subclass nullable?- 指定者:
isSubclassPropertyNullable在接口中OuterJoinLoadable
-
getPropertiesToUpdate
public final boolean[] getPropertiesToUpdate(int[] dirtyProperties, boolean hasDirtyCollection)Transform the array of property indexes to an array of booleans, true when the property is dirty
-
getPropertiesToInsert
public boolean[] getPropertiesToInsert(Object[] fields)
Transform the array of property indexes to an array of booleans, true when the property is insertable and non-null
-
findDirty
public int[] findDirty(Object[] currentState, Object[] previousState, Object entity, SharedSessionContractImplementor session) throws HibernateException
Locate the property-indices of all properties considered to be dirty.- 指定者:
findDirty在接口中EntityPersister- 参数:
currentState- The current state of the entity (the state to be checked).previousState- The previous state of the entity (the state to be checked against).entity- The entity for which we are checking state dirtiness.session- The session in which the check is occurring.- 返回:
- null or the indices of the dirty properties
- 抛出:
HibernateException
-
findModified
public int[] findModified(Object[] old, Object[] current, Object entity, SharedSessionContractImplementor session) throws HibernateException
Locate the property-indices of all properties considered to be dirty.- 指定者:
findModified在接口中EntityPersister- 参数:
old- The old state of the entity.current- The current state of the entity.entity- The entity for which we are checking state modification.session- The session in which the check is occurring.- 返回:
- null or the indices of the modified properties
- 抛出:
HibernateException
-
getPropertyUpdateability
public boolean[] getPropertyUpdateability(Object entity)
Which properties appear in the SQL update? (Initialized, updateable ones!)
-
getFactory
public SessionFactoryImplementor getFactory()
从接口复制的说明:EntityPersisterReturn the SessionFactory to which this persister "belongs".- 指定者:
getFactory在接口中EntityPersister- 返回:
- The owning SessionFactory.
-
getEntityMetamodel
public EntityMetamodel getEntityMetamodel()
从接口复制的说明:EntityPersisterRetrieve the underlying entity metamodel instance...- 指定者:
getEntityMetamodel在接口中EntityPersister- 返回:
- The metamodel
-
canReadFromCache
public boolean canReadFromCache()
- 指定者:
canReadFromCache在接口中EntityPersister
-
canWriteToCache
public boolean canWriteToCache()
- 指定者:
canWriteToCache在接口中EntityPersister
-
hasCache
public boolean hasCache()
从接口复制的说明:EntityPersisterDoes this class have a cache.- 指定者:
hasCache在接口中EntityPersister
-
getCacheAccessStrategy
public EntityDataAccess getCacheAccessStrategy()
从接口复制的说明:EntityPersisterGet the cache (optional operation)- 指定者:
getCacheAccessStrategy在接口中EntityPersister
-
getCacheEntryStructure
public CacheEntryStructure getCacheEntryStructure()
从接口复制的说明:EntityPersisterGet the cache structure- 指定者:
getCacheEntryStructure在接口中EntityPersister
-
buildCacheEntry
public CacheEntry buildCacheEntry(Object entity, Object[] state, Object version, SharedSessionContractImplementor session)
- 指定者:
buildCacheEntry在接口中EntityPersister
-
hasNaturalIdCache
public boolean hasNaturalIdCache()
从接口复制的说明:EntityPersisterDoes this class have a natural id cache- 指定者:
hasNaturalIdCache在接口中EntityPersister
-
getNaturalIdCacheAccessStrategy
public NaturalIdDataAccess getNaturalIdCacheAccessStrategy()
从接口复制的说明:EntityPersisterGet the NaturalId cache (optional operation)
-
getVersionComparator
public Comparator getVersionComparator()
-
getEntityName
public final String getEntityName()
从接口复制的说明:EntityPersisterThe entity name which this persister maps.- 指定者:
getEntityName在接口中ClassMetadata- 指定者:
getEntityName在接口中EntityPersister- 返回:
- The name of the entity which this persister maps.
-
getEntityType
public EntityType getEntityType()
- 指定者:
getEntityType在接口中OuterJoinLoadable
-
isPolymorphic
public boolean isPolymorphic()
-
isInherited
public boolean isInherited()
从接口复制的说明:EntityPersisterDetermine whether the entity is inherited one or more other entities. In other words, is this entity a subclass of other entities.- 指定者:
isInherited在接口中ClassMetadata- 指定者:
isInherited在接口中EntityPersister- 返回:
- True if other entities extend this entity; false otherwise.
-
hasCascades
public boolean hasCascades()
从接口复制的说明:EntityPersisterDetermine whether this entity has any non-none cascading.- 指定者:
hasCascades在接口中EntityPersister- 返回:
- True if the entity has any properties with a cascade other than NONE; false otherwise (aka, no cascading).
-
hasIdentifierProperty
public boolean hasIdentifierProperty()
从接口复制的说明:EntityPersisterDetermine whether the entity has a particular property holding the identifier value.- 指定者:
hasIdentifierProperty在接口中ClassMetadata- 指定者:
hasIdentifierProperty在接口中EntityPersister- 返回:
- True if the entity has a specific property holding identifier value.
-
getVersionType
public VersionType getVersionType()
从接口复制的说明:EntityPersisterIfEntityPersister.isVersioned(), then what is the type of the property holding the locking value.- 指定者:
getVersionType在接口中EntityPersister- 返回:
- The type of the version property; or null, if not versioned.
-
getVersionProperty
public int getVersionProperty()
从接口复制的说明:EntityPersisterIfEntityPersister.isVersioned(), then what is the index of the property holding the locking value.- 指定者:
getVersionProperty在接口中ClassMetadata- 指定者:
getVersionProperty在接口中EntityPersister- 返回:
- The type of the version property; or -66, if not versioned.
-
isVersioned
public boolean isVersioned()
从接口复制的说明:EntityPersisterDetermine whether optimistic locking by column is enabled for this entity.- 指定者:
isVersioned在接口中ClassMetadata- 指定者:
isVersioned在接口中EntityPersister- 返回:
- True if optimistic locking by column (i.e.,
or ) is enabled; false otherwise.
-
isIdentifierAssignedByInsert
public boolean isIdentifierAssignedByInsert()
从接口复制的说明:EntityPersisterAre identifiers of this entity assigned known before the insert execution? Or, are they generated (in the database) by the insert execution.- 指定者:
isIdentifierAssignedByInsert在接口中EntityPersister- 返回:
- True if identifiers for this entity are generated by the insert execution.
-
hasLazyProperties
public boolean hasLazyProperties()
从接口复制的说明:EntityPersisterDetermine whether this entity defines any lazy properties (ala bytecode instrumentation).- 指定者:
hasLazyProperties在接口中EntityPersister- 返回:
- True if the entity has properties mapped as lazy; false otherwise.
-
afterReassociate
public void afterReassociate(Object entity, SharedSessionContractImplementor session)
从接口复制的说明:EntityPersisterCalled just after the entity has been reassociated with the session- 指定者:
afterReassociate在接口中EntityPersister
-
isTransient
public Boolean isTransient(Object entity, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:EntityPersisterIs this a new transient instance?- 指定者:
isTransient在接口中EntityPersister- 抛出:
HibernateException
-
hasCollections
public boolean hasCollections()
从接口复制的说明:EntityPersisterDetermine whether this entity contains references to persistent collections.- 指定者:
hasCollections在接口中EntityPersister- 返回:
- True if the entity does contain persistent collections; false otherwise.
-
hasMutableProperties
public boolean hasMutableProperties()
从接口复制的说明:EntityPersisterDetermine whether any properties of this entity are considered mutable.- 指定者:
hasMutableProperties在接口中EntityPersister- 返回:
- True if any properties of the entity are mutable; false otherwise (meaning none are).
-
isMutable
public boolean isMutable()
从接口复制的说明:EntityPersisterDetermine whether instances of this entity are considered mutable.- 指定者:
isMutable在接口中ClassMetadata- 指定者:
isMutable在接口中EntityPersister- 返回:
- True if the entity is considered mutable; false otherwise.
-
isModifiableEntity
public final boolean isModifiableEntity(EntityEntry entry)
-
isAbstract
public boolean isAbstract()
从接口复制的说明:QueryableIs this an abstract class?- 指定者:
isAbstract在接口中Loadable- 指定者:
isAbstract在接口中Queryable
-
hasSubclasses
public boolean hasSubclasses()
从接口复制的说明:LoadableDoes this persistent class have subclasses?- 指定者:
hasSubclasses在接口中ClassMetadata- 指定者:
hasSubclasses在接口中Loadable
-
hasProxy
public boolean hasProxy()
从接口复制的说明:EntityPersisterDetermine whether this entity supports dynamic proxies.- 指定者:
hasProxy在接口中ClassMetadata- 指定者:
hasProxy在接口中EntityPersister- 返回:
- True if the entity has dynamic proxy support; false otherwise.
-
getIdentifierGenerator
public IdentifierGenerator getIdentifierGenerator() throws HibernateException
从接口复制的说明:EntityPersisterDetermine which identifier generation strategy is used for this entity.- 指定者:
getIdentifierGenerator在接口中EntityPersister- 返回:
- The identifier generation strategy.
- 抛出:
HibernateException
-
getRootEntityName
public String getRootEntityName()
从接口复制的说明:EntityPersisterReturns an object that identifies the space in which identifiers of this entity hierarchy are unique. Might be a table name, a JNDI URL, etc.- 指定者:
getRootEntityName在接口中EntityPersister- 返回:
- The root entity name.
-
getClassMetadata
public ClassMetadata getClassMetadata()
从接口复制的说明:EntityPersisterGet the user-visible metadata for the class (optional operation)- 指定者:
getClassMetadata在接口中EntityPersister
-
getMappedSuperclass
public String getMappedSuperclass()
从接口复制的说明:QueryableGet the class that this class is mapped as a subclass of - not necessarily the direct superclass- 指定者:
getMappedSuperclass在接口中Queryable
-
isExplicitPolymorphism
public boolean isExplicitPolymorphism()
从接口复制的说明:QueryableIs this class explicit polymorphism only?- 指定者:
isExplicitPolymorphism在接口中Queryable
-
useDynamicUpdate
protected boolean useDynamicUpdate()
-
useDynamicInsert
protected boolean useDynamicInsert()
-
hasEmbeddedCompositeIdentifier
public boolean hasEmbeddedCompositeIdentifier()
-
canExtractIdOutOfEntity
public boolean canExtractIdOutOfEntity()
从接口复制的说明:EntityPersisterDetermine whether detached instances of this entity carry their own identifier value. The other option is the deprecated feature where users could supply the id during session calls.- 指定者:
canExtractIdOutOfEntity在接口中EntityPersister- 返回:
- True if either (1)
EntityPersister.hasIdentifierProperty()or (2) the identifier is an embedded composite identifier; false otherwise.
-
getKeyColumnNames
public String[] getKeyColumnNames()
从接口复制的说明:JoinableThe columns to join on- 指定者:
getKeyColumnNames在接口中Joinable
-
getName
public String getName()
从接口复制的说明:JoinableAn identifying name; a class name or collection role name.
-
isCollection
public boolean isCollection()
从接口复制的说明:JoinableIs this instance actually a CollectionPersister?- 指定者:
isCollection在接口中Joinable
-
consumesEntityAlias
public boolean consumesEntityAlias()
从接口复制的说明:JoinableVery, very, very ugly...- 指定者:
consumesEntityAlias在接口中Joinable- 返回:
- Does this persister "consume" entity column aliases in the result set?
-
consumesCollectionAlias
public boolean consumesCollectionAlias()
从接口复制的说明:JoinableVery, very, very ugly...- 指定者:
consumesCollectionAlias在接口中Joinable- 返回:
- Does this persister "consume" collection column aliases in the result set?
-
getPropertyType
public Type getPropertyType(String propertyName) throws MappingException
Get the type of a particular property by name. Warning: When there are duplicated property names in the subclasses then this method may return the wrong results. To ensure correct results, this method should only be used when this is the concrete EntityPersister (since the concrete EntityPersister cannot have duplicated property names).- 指定者:
getPropertyType在接口中ClassMetadata- 指定者:
getPropertyType在接口中EntityPersister- 参数:
propertyName- The name of the property for which to retrieve the type.- 返回:
- The type.
- 抛出:
MappingException- Typically indicates an unknown property name.
-
getType
public Type getType()
从接口复制的说明:PropertyMappingGet the type of the thing containing the properties- 指定者:
getType在接口中PropertyMapping- 指定者:
getType在接口中SQLLoadable
-
isSelectBeforeUpdateRequired
public boolean isSelectBeforeUpdateRequired()
从接口复制的说明:EntityPersisterIs select snapshot before update enabled?- 指定者:
isSelectBeforeUpdateRequired在接口中EntityPersister
-
optimisticLockStyle
protected final OptimisticLockStyle optimisticLockStyle()
-
createProxy
public Object createProxy(Serializable id, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:EntityPersisterCreate a new proxy instance- 指定者:
createProxy在接口中EntityPersister- 抛出:
HibernateException
-
selectFragment
public final String selectFragment(Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns)
从接口复制的说明:JoinableAll columns to select, when loading.- 指定者:
selectFragment在接口中Joinable
-
isInstrumented
public boolean isInstrumented()
从接口复制的说明:EntityPersisterHas the class actually been bytecode instrumented?- 指定者:
isInstrumented在接口中EntityPersister
-
hasInsertGeneratedProperties
public boolean hasInsertGeneratedProperties()
从接口复制的说明:EntityPersisterDoes this entity define any properties as being database generated on insert?- 指定者:
hasInsertGeneratedProperties在接口中EntityPersister- 返回:
- True if this entity contains at least one property defined as generated (including version property, but not identifier).
-
hasUpdateGeneratedProperties
public boolean hasUpdateGeneratedProperties()
从接口复制的说明:EntityPersisterDoes this entity define any properties as being database generated on update?- 指定者:
hasUpdateGeneratedProperties在接口中EntityPersister- 返回:
- True if this entity contains at least one property defined as generated (including version property, but not identifier).
-
isVersionPropertyGenerated
public boolean isVersionPropertyGenerated()
从接口复制的说明:EntityPersisterDoes this entity contain a version property that is defined to be database generated?- 指定者:
isVersionPropertyGenerated在接口中EntityPersister- 返回:
- true if this entity contains a version property and that property has been marked as generated.
-
isVersionPropertyInsertable
public boolean isVersionPropertyInsertable()
从接口复制的说明:QueryableIs the version property included in insert statements?- 指定者:
isVersionPropertyInsertable在接口中Queryable
-
afterInitialize
public void afterInitialize(Object entity, SharedSessionContractImplementor session)
从接口复制的说明:EntityPersisterCalled just after the entities properties have been initialized- 指定者:
afterInitialize在接口中EntityPersister
-
getPropertyNames
public String[] getPropertyNames()
从接口复制的说明:EntityPersisterGet the names of the class properties - doesn't have to be the names of the actual Java properties (used for XML generation only)- 指定者:
getPropertyNames在接口中ClassMetadata- 指定者:
getPropertyNames在接口中EntityPersister
-
getPropertyTypes
public Type[] getPropertyTypes()
从接口复制的说明:EntityPersisterGet the Hibernate types of the class properties- 指定者:
getPropertyTypes在接口中ClassMetadata- 指定者:
getPropertyTypes在接口中EntityPersister
-
getPropertyLaziness
public boolean[] getPropertyLaziness()
从接口复制的说明:ClassMetadataGet the "laziness" of the properties of this class- 指定者:
getPropertyLaziness在接口中ClassMetadata- 指定者:
getPropertyLaziness在接口中EntityPersister
-
getPropertyUpdateability
public boolean[] getPropertyUpdateability()
从接口复制的说明:EntityPersisterGet the "updateability" of the properties of this class (does the property appear in an SQL UPDATE)- 指定者:
getPropertyUpdateability在接口中EntityPersister
-
getPropertyCheckability
public boolean[] getPropertyCheckability()
从接口复制的说明:EntityPersisterGet the "checkability" of the properties of this class (is the property dirty checked, does the cache need to be updated)- 指定者:
getPropertyCheckability在接口中EntityPersister
-
getNonLazyPropertyUpdateability
public boolean[] getNonLazyPropertyUpdateability()
-
getPropertyInsertability
public boolean[] getPropertyInsertability()
从接口复制的说明:EntityPersisterGet the "insertability" of the properties of this class (does the property appear in an SQL INSERT)- 指定者:
getPropertyInsertability在接口中EntityPersister
-
getPropertyInsertGenerationInclusions
@Deprecated public ValueInclusion[] getPropertyInsertGenerationInclusions()
已过时。no simple, direct replacement从接口复制的说明:EntityPersisterWhich of the properties of this class are database generated values on insert?
-
getPropertyUpdateGenerationInclusions
@Deprecated public ValueInclusion[] getPropertyUpdateGenerationInclusions()
已过时。no simple, direct replacement从接口复制的说明:EntityPersisterWhich of the properties of this class are database generated values on update?
-
getPropertyNullability
public boolean[] getPropertyNullability()
从接口复制的说明:EntityPersisterGet the nullability of the properties of this class- 指定者:
getPropertyNullability在接口中ClassMetadata- 指定者:
getPropertyNullability在接口中EntityPersister
-
getPropertyVersionability
public boolean[] getPropertyVersionability()
从接口复制的说明:EntityPersisterGet the "versionability" of the properties of this class (is the property optimistic-locked)- 指定者:
getPropertyVersionability在接口中EntityPersister
-
getPropertyCascadeStyles
public CascadeStyle[] getPropertyCascadeStyles()
从接口复制的说明:EntityPersisterGet the cascade styles of the properties (optional operation)- 指定者:
getPropertyCascadeStyles在接口中EntityPersister
-
getMappedClass
public final Class getMappedClass()
从接口复制的说明:EntityPersisterThe persistent class, or null- 指定者:
getMappedClass在接口中ClassMetadata- 指定者:
getMappedClass在接口中EntityPersister
-
implementsLifecycle
public boolean implementsLifecycle()
从接口复制的说明:EntityPersisterDoes the class implement theLifecycleinterface.- 指定者:
implementsLifecycle在接口中ClassMetadata- 指定者:
implementsLifecycle在接口中EntityPersister
-
getConcreteProxyClass
public Class getConcreteProxyClass()
从接口复制的说明:EntityPersisterGet the proxy interface that instances of this concrete class will be cast to (optional operation).- 指定者:
getConcreteProxyClass在接口中EntityPersister
-
setPropertyValues
public void setPropertyValues(Object object, Object[] values)
从接口复制的说明:EntityPersisterSet the given values to the mapped properties of the given object- 指定者:
setPropertyValues在接口中ClassMetadata- 指定者:
setPropertyValues在接口中EntityPersister
-
setPropertyValue
public void setPropertyValue(Object object, int i, Object value)
从接口复制的说明:EntityPersisterSet the value of a particular property- 指定者:
setPropertyValue在接口中EntityPersister
-
getPropertyValues
public Object[] getPropertyValues(Object object)
从接口复制的说明:EntityPersisterReturn the (loaded) values of the mapped properties of the object (not including backrefs)- 指定者:
getPropertyValues在接口中ClassMetadata- 指定者:
getPropertyValues在接口中EntityPersister- 参数:
object- The entity from which to extract the property values.- 返回:
- The property values.
-
getPropertyValue
public Object getPropertyValue(Object object, int i)
从接口复制的说明:EntityPersisterGet the value of a particular property- 指定者:
getPropertyValue在接口中EntityPersister
-
getPropertyValue
public Object getPropertyValue(Object object, String propertyName)
从接口复制的说明:EntityPersisterGet the value of a particular property- 指定者:
getPropertyValue在接口中ClassMetadata- 指定者:
getPropertyValue在接口中EntityPersister
-
getIdentifier
public Serializable getIdentifier(Object object)
从接口复制的说明:EntityPersisterGet the identifier of an instance (throw an exception if no identifier property)- 指定者:
getIdentifier在接口中ClassMetadata- 指定者:
getIdentifier在接口中EntityPersister
-
getIdentifier
public Serializable getIdentifier(Object entity, SharedSessionContractImplementor session)
从接口复制的说明:EntityPersisterGet the identifier of an instance (throw an exception if no identifier property)- 指定者:
getIdentifier在接口中ClassMetadata- 指定者:
getIdentifier在接口中EntityPersister- 参数:
entity- The entity for which to get the identifiersession- The session from which the request originated- 返回:
- The identifier
-
setIdentifier
public void setIdentifier(Object entity, Serializable id, SharedSessionContractImplementor session)
从接口复制的说明:EntityPersisterInject the identifier value into the given entity.- 指定者:
setIdentifier在接口中ClassMetadata- 指定者:
setIdentifier在接口中EntityPersister- 参数:
entity- The entity to inject with the identifier value.id- The value to be injected as the identifier.session- The session from which is requests originates
-
getVersion
public Object getVersion(Object object)
从接口复制的说明:EntityPersisterGet the version number (or timestamp) from the object's version property (or return null if not versioned)- 指定者:
getVersion在接口中ClassMetadata- 指定者:
getVersion在接口中EntityPersister
-
instantiate
public Object instantiate(Serializable id, SharedSessionContractImplementor session)
从接口复制的说明:EntityPersisterCreate a class instance initialized with the given identifier- 指定者:
instantiate在接口中ClassMetadata- 指定者:
instantiate在接口中EntityPersister- 参数:
id- The identifier value to use (may be null to represent no value)session- The session from which the request originated.- 返回:
- The instantiated entity.
-
isInstance
public boolean isInstance(Object object)
从接口复制的说明:EntityPersisterIs the given object an instance of this entity?- 指定者:
isInstance在接口中EntityPersister
-
hasUninitializedLazyProperties
public boolean hasUninitializedLazyProperties(Object object)
从接口复制的说明:EntityPersisterDoes the given instance have any uninitialized lazy properties?
-
resetIdentifier
public void resetIdentifier(Object entity, Serializable currentId, Object currentVersion, SharedSessionContractImplementor session)
从接口复制的说明:EntityPersisterSet the identifier and version of the given instance back to its "unsaved" value.- 指定者:
resetIdentifier在接口中EntityPersister- 参数:
entity- The entity instancecurrentId- The currently assigned identifier value.currentVersion- The currently assigned version value.session- The session from which the request originated.
-
getSubclassEntityPersister
public EntityPersister getSubclassEntityPersister(Object instance, SessionFactoryImplementor factory)
从接口复制的说明:EntityPersisterA request has already identified the entity-name of this persister as the mapping for the given instance. However, we still need to account for possible subclassing and potentially re-route to the more appropriate persister. For example, a request names Animal as the entity-name which gets resolved to this persister. But the actual instance is really an instance of Cat which is a subclass of Animal. So, here the Animal persister is being asked to return the persister specific to Cat. It is also possible that the instance is actually an Animal instance in the above example in which case we would return this from this method.- 指定者:
getSubclassEntityPersister在接口中EntityPersister- 参数:
instance- The entity instancefactory- Reference to the SessionFactory- 返回:
- The appropriate persister
-
isMultiTable
public boolean isMultiTable()
从接口复制的说明:QueryableIs the inheritance hierarchy described by this persister contained across multiple tables?- 指定者:
isMultiTable在接口中Queryable- 返回:
- True if the inheritance hierarchy is spread across multiple tables; false otherwise.
-
getPropertySpan
public int getPropertySpan()
-
getPropertyValuesToInsert
public Object[] getPropertyValuesToInsert(Object object, Map mergeMap, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:EntityPersisterReturn the values of the insertable properties of the object (including backrefs)- 指定者:
getPropertyValuesToInsert在接口中ClassMetadata- 指定者:
getPropertyValuesToInsert在接口中EntityPersister- 抛出:
HibernateException
-
processInsertGeneratedProperties
public void processInsertGeneratedProperties(Serializable id, Object entity, Object[] state, SharedSessionContractImplementor session)
从接口复制的说明:EntityPersisterPerform a select to retrieve the values of any generated properties back from the database, injecting these generated values into the given entity as well as writing this state to thePersistenceContext. Note, that because we update the PersistenceContext here, callers need to take care that they have already written the initial snapshot to the PersistenceContext before calling this method.- 指定者:
processInsertGeneratedProperties在接口中EntityPersister- 参数:
id- The entity's id value.entity- The entity for which to get the state.session- The session
-
processUpdateGeneratedProperties
public void processUpdateGeneratedProperties(Serializable id, Object entity, Object[] state, SharedSessionContractImplementor session)
从接口复制的说明:EntityPersisterPerform a select to retrieve the values of any generated properties back from the database, injecting these generated values into the given entity as well as writing this state to thePersistenceContext. Note, that because we update the PersistenceContext here, callers need to take care that they have already written the initial snapshot to the PersistenceContext before calling this method.- 指定者:
processUpdateGeneratedProperties在接口中EntityPersister- 参数:
id- The entity's id value.entity- The entity for which to get the state.session- The session
-
getIdentifierPropertyName
public String getIdentifierPropertyName()
从接口复制的说明:EntityPersisterGet the name of the identifier property (or return null) - need not return the name of an actual Java property- 指定者:
getIdentifierPropertyName在接口中ClassMetadata- 指定者:
getIdentifierPropertyName在接口中EntityPersister
-
getIdentifierType
public Type getIdentifierType()
从接口复制的说明:EntityPersisterGet the identifier type- 指定者:
getIdentifierType在接口中ClassMetadata- 指定者:
getIdentifierType在接口中EntityPersister
-
hasSubselectLoadableCollections
public boolean hasSubselectLoadableCollections()
从接口复制的说明:EntityPersisterDetermine whether this entity contains references to persistent collections which are fetchable by subselect?- 指定者:
hasSubselectLoadableCollections在接口中EntityPersister- 返回:
- True if the entity contains collections fetchable by subselect; false otherwise.
-
getNaturalIdentifierProperties
public int[] getNaturalIdentifierProperties()
从接口复制的说明:EntityPersisterIf the entity defines a natural id (EntityPersister.hasNaturalIdentifier()), which properties make up the natural id.- 指定者:
getNaturalIdentifierProperties在接口中ClassMetadata- 指定者:
getNaturalIdentifierProperties在接口中EntityPersister- 返回:
- The indices of the properties making of the natural id; or null, if no natural id is defined.
-
getNaturalIdentifierSnapshot
public Object[] getNaturalIdentifierSnapshot(Serializable id, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:EntityPersisterRetrieve the current state of the natural-id properties from the database.- 指定者:
getNaturalIdentifierSnapshot在接口中EntityPersister- 参数:
id- The identifier of the entity for which to retrieve the natural-id values.session- The session from which the request originated.- 返回:
- The natural-id snapshot.
- 抛出:
HibernateException
-
loadEntityIdByNaturalId
public Serializable loadEntityIdByNaturalId(Object[] naturalIdValues, LockOptions lockOptions, SharedSessionContractImplementor session)
从接口复制的说明:EntityPersisterLoad the id for the entity based on the natural id.- 指定者:
loadEntityIdByNaturalId在接口中EntityPersister
-
isNaturalIdNonNullable
public boolean isNaturalIdNonNullable()
-
concretePropertySelectFragmentSansLeadingComma
protected String concretePropertySelectFragmentSansLeadingComma(String alias, boolean[] include)
-
hasNaturalIdentifier
public boolean hasNaturalIdentifier()
从接口复制的说明:EntityPersisterDetermine whether this entity defines a natural identifier.- 指定者:
hasNaturalIdentifier在接口中ClassMetadata- 指定者:
hasNaturalIdentifier在接口中EntityPersister- 返回:
- True if the entity defines a natural id; false otherwise.
-
setPropertyValue
public void setPropertyValue(Object object, String propertyName, Object value)
从接口复制的说明:ClassMetadataSet the value of a particular (named) property- 指定者:
setPropertyValue在接口中ClassMetadata
-
getEntityMode
public EntityMode getEntityMode()
- 指定者:
getEntityMode在接口中EntityPersister
-
getEntityTuplizer
public EntityTuplizer getEntityTuplizer()
- 指定者:
getEntityTuplizer在接口中EntityPersister
-
getInstrumentationMetadata
public BytecodeEnhancementMetadata getInstrumentationMetadata()
- 指定者:
getInstrumentationMetadata在接口中EntityPersister
-
getBytecodeEnhancementMetadata
public BytecodeEnhancementMetadata getBytecodeEnhancementMetadata()
-
getTableAliasForColumn
public String getTableAliasForColumn(String columnName, String rootAlias)
从接口复制的说明:LoadableGiven a column name and the root table alias in use for the entity hierarchy, determine the proper table alias for the table in that hierarchy that contains said column. NOTE : Generally speaking the column is not validated to exist. Most implementations simply return the root alias; the exception isJoinedSubclassEntityPersister- 指定者:
getTableAliasForColumn在接口中Loadable- 参数:
columnName- The column namerootAlias- The hierarchy root alias- 返回:
- The proper table alias for qualifying the given column.
-
determineTableNumberForColumn
public int determineTableNumberForColumn(String columnName)
-
determineTableName
protected String determineTableName(Table table, JdbcEnvironment jdbcEnvironment)
-
getEntityEntryFactory
public EntityEntryFactory getEntityEntryFactory()
从接口复制的说明:EntityPersisterGet the EntityEntryFactory indicated for the entity mapped by this persister.- 指定者:
getEntityEntryFactory在接口中EntityPersister- 返回:
- The proper EntityEntryFactory.
-
generateEntityDefinition
public void generateEntityDefinition()
从接口复制的说明:EntityPersisterGenerate the entity definition for this object. This must be done for all entity persisters before callingEntityPersister.postInstantiate().- 指定者:
generateEntityDefinition在接口中EntityPersister
-
getEntityPersister
public EntityPersister getEntityPersister()
- 指定者:
getEntityPersister在接口中EntityDefinition
-
getEntityKeyDefinition
public EntityIdentifierDefinition getEntityKeyDefinition()
- 指定者:
getEntityKeyDefinition在接口中EntityDefinition
-
getAttributes
public Iterable<AttributeDefinition> getAttributes()
- 指定者:
getAttributes在接口中AttributeSource
-
getPolymorphicJoinColumns
public String[][] getPolymorphicJoinColumns(String lhsTableAlias, String propertyPath)
-
canOmitSuperclassTableJoin
public boolean canOmitSuperclassTableJoin()
If true, persister can omit superclass tables during joining if they are not needed in the query.- 返回:
- true if the persister can do it
-
createInsert
protected Insert createInsert()
-
createUpdate
protected Update createUpdate()
-
createDelete
protected Delete createDelete()
-
-