Methods Summary |
---|
public void | afterInitialize(java.lang.Object entity, boolean lazyPropertiesAreUnfetched, org.hibernate.engine.SessionImplementor session)Called just after the entities properties have been initialized
|
public void | afterReassociate(java.lang.Object entity, org.hibernate.engine.SessionImplementor session)Called just after the entity has been reassociated with the session
|
public boolean | canExtractIdOutOfEntity()Determine whether detahced instances of this entity carry their own
identifier value.
The other option is the deperecated feature where users could supply
the id during session calls.
|
public java.lang.Object | createProxy(java.io.Serializable id, org.hibernate.engine.SessionImplementor session)Create a new proxy instance
|
public void | delete(java.io.Serializable id, java.lang.Object version, java.lang.Object object, org.hibernate.engine.SessionImplementor session)Delete a persistent instance
|
public int[] | findDirty(java.lang.Object[] currentState, java.lang.Object[] previousState, java.lang.Object owner, org.hibernate.engine.SessionImplementor session)Compare the two snapshots to determine if they represent dirty state.
|
public int[] | findModified(java.lang.Object[] old, java.lang.Object[] current, java.lang.Object object, org.hibernate.engine.SessionImplementor session)Compare the two snapshots to determine if they represent modified state.
|
public java.lang.Object | forceVersionIncrement(java.io.Serializable id, java.lang.Object currentVersion, org.hibernate.engine.SessionImplementor session)
|
public org.hibernate.cache.CacheConcurrencyStrategy | getCache()Get the cache (optional operation)
|
public org.hibernate.cache.entry.CacheEntryStructure | getCacheEntryStructure()Get the cache structure
|
public org.hibernate.metadata.ClassMetadata | getClassMetadata()Get the user-visible metadata for the class (optional operation)
|
public java.lang.Class | getConcreteProxyClass(org.hibernate.EntityMode entityMode)Get the proxy interface that instances of this concrete class will be
cast to (optional operation).
|
public java.lang.Object | getCurrentVersion(java.io.Serializable id, org.hibernate.engine.SessionImplementor session)Get the current version of the object, or return null if there is no row for
the given identifier. In the case of unversioned data, return any object
if the row exists.
|
public java.lang.Object[] | getDatabaseSnapshot(java.io.Serializable id, org.hibernate.engine.SessionImplementor session)Get the current database state of the object, in a "hydrated" form, without
resolving identifiers
|
public org.hibernate.tuple.entity.EntityMetamodel | getEntityMetamodel()Retrieve the underlying entity metamodel instance...
|
public java.lang.String | getEntityName()The entity name which this persister maps.
|
public org.hibernate.engine.SessionFactoryImplementor | getFactory()Return the SessionFactory to which this persister "belongs".
|
public java.io.Serializable | getIdentifier(java.lang.Object object, org.hibernate.EntityMode entityMode)Get the identifier of an instance (throw an exception if no identifier property)
|
public org.hibernate.id.IdentifierGenerator | getIdentifierGenerator()Determine which identifier generation strategy is used for this entity.
|
public java.lang.String | getIdentifierPropertyName()Get the name of the identifier property (or return null) - need not return the
name of an actual Java property
|
public org.hibernate.type.Type | getIdentifierType()Get the identifier type
|
public java.lang.Class | getMappedClass(org.hibernate.EntityMode entityMode)The persistent class, or null
|
public int[] | getNaturalIdentifierProperties()If the entity defines a natural id ({@link #hasNaturalIdentifier()}), which
properties make up the natural id.
|
public java.lang.Object[] | getNaturalIdentifierSnapshot(java.io.Serializable id, org.hibernate.engine.SessionImplementor session)Retrieve the current state of the natural-id properties from the database.
|
public org.hibernate.engine.CascadeStyle[] | getPropertyCascadeStyles()Get the cascade styles of the propertes (optional operation)
|
public boolean[] | getPropertyCheckability()Get the "checkability" of the properties of this class
(is the property dirty checked, does the cache need
to be updated)
|
public org.hibernate.engine.ValueInclusion[] | getPropertyInsertGenerationInclusions()Which of the properties of this class are database generated values on insert?
|
public boolean[] | getPropertyInsertability()Get the "insertability" of the properties of this class
(does the property appear in an SQL INSERT)
|
public boolean[] | getPropertyLaziness()
|
public java.lang.String[] | 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)
|
public boolean[] | getPropertyNullability()Get the nullability of the properties of this class
|
public java.io.Serializable[] | getPropertySpaces()Returns an array of objects that identify spaces in which properties of
this entity are persisted, for instances of this class only.
For most implementations, this returns the complete set of table names
to which instances of the mapped entity are persisted (not accounting
for superclass entity mappings).
|
public org.hibernate.type.Type | getPropertyType(java.lang.String propertyName)Get the type of a particular property by name.
|
public org.hibernate.type.Type[] | getPropertyTypes()Get the Hibernate types of the class properties
|
public org.hibernate.engine.ValueInclusion[] | getPropertyUpdateGenerationInclusions()Which of the properties of this class are database generated values on update?
|
public boolean[] | getPropertyUpdateability()Get the "updateability" of the properties of this class
(does the property appear in an SQL UPDATE)
|
public java.lang.Object | getPropertyValue(java.lang.Object object, int i, org.hibernate.EntityMode entityMode)Get the value of a particular property
|
public java.lang.Object | getPropertyValue(java.lang.Object object, java.lang.String propertyName, org.hibernate.EntityMode entityMode)Get the value of a particular property
|
public java.lang.Object[] | getPropertyValues(java.lang.Object object, org.hibernate.EntityMode entityMode)Return the (loaded) values of the mapped properties of the object (not including backrefs)
|
public java.lang.Object[] | getPropertyValuesToInsert(java.lang.Object object, java.util.Map mergeMap, org.hibernate.engine.SessionImplementor session)Return the values of the insertable properties of the object (including backrefs)
|
public boolean[] | getPropertyVersionability()Get the "versionability" of the properties of this class
(is the property optimistic-locked)
|
public java.io.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.
Much like {@link #getPropertySpaces()}, except that here we include subclass
entity spaces.
|
public java.lang.String | getRootEntityName()Returns an object that identifies the space in which identifiers of
this entity hierarchy are unique. Might be a table name, a JNDI URL, etc.
|
public org.hibernate.persister.entity.EntityPersister | getSubclassEntityPersister(java.lang.Object instance, org.hibernate.engine.SessionFactoryImplementor factory, org.hibernate.EntityMode entityMode)Get the persister for an instance of this class or a subclass
|
public java.lang.Object | getVersion(java.lang.Object object, org.hibernate.EntityMode entityMode)Get the version number (or timestamp) from the object's version property (or return null if not versioned)
|
public int | getVersionProperty()If {@link #isVersioned()}, then what is the index of the property
holding the locking value.
|
public org.hibernate.type.VersionType | getVersionType()If {@link #isVersioned()}, then what is the type of the property
holding the locking value.
|
public org.hibernate.EntityMode | guessEntityMode(java.lang.Object object)Try to discover the entity mode from the entity instance
|
public boolean | hasCache()Does this class have a cache.
|
public boolean | hasCascades()Determine whether this entity has any non-none cascading.
|
public boolean | hasCollections()Determine whether this entity contains references to persistent collections.
|
public boolean | hasIdentifierProperty()Determine whether the entity has a particular property holding
the identifier value.
|
public boolean | hasInsertGeneratedProperties()Does this entity define any properties as being database generated on insert?
|
public boolean | hasLazyProperties()Determine whether this entity defines any lazy properties (ala
bytecode instrumentation).
|
public boolean | hasMutableProperties()Determine whether any properties of this entity are considered mutable.
|
public boolean | hasNaturalIdentifier()Determine whether this entity defines a natural identifier.
|
public boolean | hasProxy()Determine whether this entity supports dynamic proxies.
|
public boolean | hasSubselectLoadableCollections()Determine whether this entity contains references to persistent collections
which are fetchable by subselect?
|
public boolean | hasUninitializedLazyProperties(java.lang.Object object, org.hibernate.EntityMode entityMode)Does the given instance have any uninitialized lazy properties?
|
public boolean | hasUpdateGeneratedProperties()Does this entity define any properties as being database generated on update?
|
public boolean | implementsLifecycle(org.hibernate.EntityMode entityMode)Does the class implement the Lifecycle interface.
|
public boolean | implementsValidatable(org.hibernate.EntityMode entityMode)Does the class implement the Validatable interface.
|
public void | insert(java.io.Serializable id, java.lang.Object[] fields, java.lang.Object object, org.hibernate.engine.SessionImplementor session)Persist an instance
|
public java.io.Serializable | insert(java.lang.Object[] fields, java.lang.Object object, org.hibernate.engine.SessionImplementor session)Persist an instance, using a natively generated identifier (optional operation)
|
public java.lang.Object | instantiate(java.io.Serializable id, org.hibernate.EntityMode entityMode)Create a class instance initialized with the given identifier
|
public boolean | isBatchLoadable()Is batch loading enabled?
|
public boolean | isCacheInvalidationRequired()Should we always invalidate the cache instead of
recaching updated state
|
public boolean | isIdentifierAssignedByInsert()Are identifiers of this entity assigned known before the insert execution?
Or, are they generated (in the database) by the insert execution.
|
public boolean | isInherited()Determine whether the entity is inherited one or more other entities.
In other words, is this entity a subclass of other entities.
|
public boolean | isInstance(java.lang.Object object, org.hibernate.EntityMode entityMode)Is the given object an instance of this entity?
|
public boolean | isInstrumented(org.hibernate.EntityMode entityMode)Has the class actually been bytecode instrumented?
|
public boolean | isLazyPropertiesCacheable()Should lazy properties of this entity be cached?
|
public boolean | isMutable()Determine whether instances of this entity are considered mutable.
|
public boolean | isSelectBeforeUpdateRequired()Is select snapshot before update enabled?
|
public boolean | isSubclassEntityName(java.lang.String entityName)Determine whether the given name represents a subclass entity
(or this entity itself) of the entity mapped by this persister.
|
public java.lang.Boolean | isTransient(java.lang.Object object, org.hibernate.engine.SessionImplementor session)Is this a new transient instance?
|
public boolean | isVersionPropertyGenerated()Does this entity contain a version property that is defined
to be database generated?
|
public boolean | isVersioned()Determine whether optimistic locking by column is enabled for this
entity.
|
public java.lang.Object | load(java.io.Serializable id, java.lang.Object optionalObject, org.hibernate.LockMode lockMode, org.hibernate.engine.SessionImplementor session)Load an instance of the persistent class.
|
public void | lock(java.io.Serializable id, java.lang.Object version, java.lang.Object object, org.hibernate.LockMode lockMode, org.hibernate.engine.SessionImplementor session)Do a version check (optional operation)
|
public void | postInstantiate()Finish the initialization of this object.
Called only once per {@link org.hibernate.SessionFactory} lifecycle,
after all entity persisters have been instantiated.
|
public void | processInsertGeneratedProperties(java.io.Serializable id, java.lang.Object entity, java.lang.Object[] state, org.hibernate.engine.SessionImplementor 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 the
{@link org.hibernate.engine.PersistenceContext}.
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.
|
public void | processUpdateGeneratedProperties(java.io.Serializable id, java.lang.Object entity, java.lang.Object[] state, org.hibernate.engine.SessionImplementor 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 the
{@link org.hibernate.engine.PersistenceContext}.
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.
|
public void | resetIdentifier(java.lang.Object entity, java.io.Serializable currentId, java.lang.Object currentVersion, org.hibernate.EntityMode entityMode)Set the identifier and version of the given instance back
to its "unsaved" value, returning the id
|
public void | setIdentifier(java.lang.Object object, java.io.Serializable id, org.hibernate.EntityMode entityMode)Set the identifier of an instance (or do nothing if no identifier property)
|
public void | setPropertyValue(java.lang.Object object, int i, java.lang.Object value, org.hibernate.EntityMode entityMode)Set the value of a particular property
|
public void | setPropertyValues(java.lang.Object object, java.lang.Object[] values, org.hibernate.EntityMode entityMode)Set the given values to the mapped properties of the given object
|
public void | update(java.io.Serializable id, java.lang.Object[] fields, int[] dirtyFields, boolean hasDirtyCollection, java.lang.Object[] oldFields, java.lang.Object oldVersion, java.lang.Object object, java.lang.Object rowId, org.hibernate.engine.SessionImplementor session)Update a persistent instance
|