Java Doc for EntityPersister.java in  » Database-ORM » hibernate » org » hibernate » persister » entity » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » hibernate » org.hibernate.persister.entity 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.hibernate.persister.entity.EntityPersister

EntityPersister
public interface EntityPersister extends OptimisticCacheSource(Code)
Implementors define mapping and persistence logic for a particular strategy of entity mapping. An instance of entity persisters corresponds to a given mapped entity.

Implementors must be threadsafe (preferrably immutable) and must provide a constructor matching the signature of: org.hibernate.mapping.PersistentClass , org.hibernate.engine.SessionFactoryImplementor
author:
   Gavin King



Field Summary
final public static  StringENTITY_ID
    


Method Summary
public  voidafterInitialize(Object entity, boolean lazyPropertiesAreUnfetched, SessionImplementor session)
    
public  voidafterReassociate(Object entity, SessionImplementor session)
    
public  booleancanExtractIdOutOfEntity()
     Determine whether detahced instances of this entity carry their own identifier value.
public  ObjectcreateProxy(Serializable id, SessionImplementor session)
    
public  voiddelete(Serializable id, Object version, Object object, SessionImplementor session)
    
public  int[]findDirty(Object[] currentState, Object[] previousState, Object owner, SessionImplementor session)
     Compare the two snapshots to determine if they represent dirty state.
public  int[]findModified(Object[] old, Object[] current, Object object, SessionImplementor session)
     Compare the two snapshots to determine if they represent modified state.
public  ObjectforceVersionIncrement(Serializable id, Object currentVersion, SessionImplementor session)
    
public  CacheConcurrencyStrategygetCache()
    
public  CacheEntryStructuregetCacheEntryStructure()
    
public  ClassMetadatagetClassMetadata()
    
public  ClassgetConcreteProxyClass(EntityMode entityMode)
     Get the proxy interface that instances of this concrete class will be cast to (optional operation).
public  ObjectgetCurrentVersion(Serializable id, SessionImplementor session)
     Get the current version of the object, or return null if there is no row for the given identifier.
public  Object[]getDatabaseSnapshot(Serializable id, SessionImplementor session)
    
public  EntityMetamodelgetEntityMetamodel()
     Retrieve the underlying entity metamodel instance...
public  StringgetEntityName()
     The entity name which this persister maps.
public  SessionFactoryImplementorgetFactory()
     Return the SessionFactory to which this persister "belongs".
public  SerializablegetIdentifier(Object object, EntityMode entityMode)
    
public  IdentifierGeneratorgetIdentifierGenerator()
     Determine which identifier generation strategy is used for this entity.
public  StringgetIdentifierPropertyName()
    
public  TypegetIdentifierType()
    
public  ClassgetMappedClass(EntityMode entityMode)
    
public  int[]getNaturalIdentifierProperties()
     If the entity defines a natural id ( EntityPersister.hasNaturalIdentifier() ), which properties make up the natural id.
public  Object[]getNaturalIdentifierSnapshot(Serializable id, SessionImplementor session)
     Retrieve the current state of the natural-id properties from the database.
Parameters:
  id - The identifier of the entity for which to retrieve the naturak-id values.
Parameters:
  session - The session from which the request originated.
public  CascadeStyle[]getPropertyCascadeStyles()
    
public  boolean[]getPropertyCheckability()
    
public  ValueInclusion[]getPropertyInsertGenerationInclusions()
    
public  boolean[]getPropertyInsertability()
    
public  boolean[]getPropertyLaziness()
    
public  String[]getPropertyNames()
    
public  boolean[]getPropertyNullability()
    
public  Serializable[]getPropertySpaces()
     Returns an array of objects that identify spaces in which properties of this entity are persisted, for instances of this class only.
public  TypegetPropertyType(String propertyName)
     Get the type of a particular property by name.
Parameters:
  propertyName - The name of the property for which to retrievethe typpe.
public  Type[]getPropertyTypes()
    
public  ValueInclusion[]getPropertyUpdateGenerationInclusions()
    
public  boolean[]getPropertyUpdateability()
    
public  ObjectgetPropertyValue(Object object, int i, EntityMode entityMode)
    
public  ObjectgetPropertyValue(Object object, String propertyName, EntityMode entityMode)
    
public  Object[]getPropertyValues(Object object, EntityMode entityMode)
    
public  Object[]getPropertyValuesToInsert(Object object, Map mergeMap, SessionImplementor session)
    
public  boolean[]getPropertyVersionability()
    
public  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.
public  StringgetRootEntityName()
     Returns an object that identifies the space in which identifiers of this entity hierarchy are unique.
public  EntityPersistergetSubclassEntityPersister(Object instance, SessionFactoryImplementor factory, EntityMode entityMode)
    
public  ObjectgetVersion(Object object, EntityMode entityMode)
    
public  intgetVersionProperty()
     If EntityPersister.isVersioned() , then what is the index of the property holding the locking value.
public  VersionTypegetVersionType()
     If EntityPersister.isVersioned() , then what is the type of the property holding the locking value.
public  EntityModeguessEntityMode(Object object)
    
public  booleanhasCache()
     Does this class have a cache.
public  booleanhasCascades()
     Determine whether this entity has any non-none cascading.
public  booleanhasCollections()
     Determine whether this entity contains references to persistent collections.
public  booleanhasIdentifierProperty()
     Determine whether the entity has a particular property holding the identifier value.
public  booleanhasInsertGeneratedProperties()
    
public  booleanhasLazyProperties()
     Determine whether this entity defines any lazy properties (ala bytecode instrumentation).
public  booleanhasMutableProperties()
     Determine whether any properties of this entity are considered mutable.
public  booleanhasNaturalIdentifier()
     Determine whether this entity defines a natural identifier.
public  booleanhasProxy()
     Determine whether this entity supports dynamic proxies.
public  booleanhasSubselectLoadableCollections()
    
public  booleanhasUninitializedLazyProperties(Object object, EntityMode entityMode)
    
public  booleanhasUpdateGeneratedProperties()
    
public  booleanimplementsLifecycle(EntityMode entityMode)
     Does the class implement the Lifecycle interface.
public  booleanimplementsValidatable(EntityMode entityMode)
     Does the class implement the Validatable interface.
public  voidinsert(Serializable id, Object[] fields, Object object, SessionImplementor session)
    
public  Serializableinsert(Object[] fields, Object object, SessionImplementor session)
    
public  Objectinstantiate(Serializable id, EntityMode entityMode)
    
public  booleanisBatchLoadable()
    
public  booleanisCacheInvalidationRequired()
    
public  booleanisIdentifierAssignedByInsert()
     Are identifiers of this entity assigned known before the insert execution? Or, are they generated (in the database) by the insert execution.
public  booleanisInherited()
     Determine whether the entity is inherited one or more other entities.
public  booleanisInstance(Object object, EntityMode entityMode)
    
public  booleanisInstrumented(EntityMode entityMode)
    
public  booleanisLazyPropertiesCacheable()
    
public  booleanisMutable()
     Determine whether instances of this entity are considered mutable.
public  booleanisSelectBeforeUpdateRequired()
    
public  booleanisSubclassEntityName(String entityName)
     Determine whether the given name represents a subclass entity (or this entity itself) of the entity mapped by this persister.
Parameters:
  entityName - The entity name to be checked.
public  BooleanisTransient(Object object, SessionImplementor session)
    
public  booleanisVersionPropertyGenerated()
    
public  booleanisVersioned()
     Determine whether optimistic locking by column is enabled for this entity.
public  Objectload(Serializable id, Object optionalObject, LockMode lockMode, SessionImplementor session)
     Load an instance of the persistent class.
public  voidlock(Serializable id, Object version, Object object, LockMode lockMode, SessionImplementor session)
    
public  voidpostInstantiate()
     Finish the initialization of this object.
public  voidprocessInsertGeneratedProperties(Serializable id, Object entity, Object[] state, 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 org.hibernate.engine.PersistenceContext .
public  voidprocessUpdateGeneratedProperties(Serializable id, Object entity, Object[] state, 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 org.hibernate.engine.PersistenceContext .
public  voidresetIdentifier(Object entity, Serializable currentId, Object currentVersion, EntityMode entityMode)
    
public  voidsetIdentifier(Object object, Serializable id, EntityMode entityMode)
    
public  voidsetPropertyValue(Object object, int i, Object value, EntityMode entityMode)
    
public  voidsetPropertyValues(Object object, Object[] values, EntityMode entityMode)
    
public  voidupdate(Serializable id, Object[] fields, int[] dirtyFields, boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object object, Object rowId, SessionImplementor session)
    

Field Detail
ENTITY_ID
final public static String ENTITY_ID(Code)
The property name of the "special" identifier property in HQL





Method Detail
afterInitialize
public void afterInitialize(Object entity, boolean lazyPropertiesAreUnfetched, SessionImplementor session)(Code)
Called just after the entities properties have been initialized



afterReassociate
public void afterReassociate(Object entity, SessionImplementor session)(Code)
Called just after the entity has been reassociated with the session



canExtractIdOutOfEntity
public boolean canExtractIdOutOfEntity()(Code)
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. True if either (1) EntityPersister.hasIdentifierProperty() or(2) the identifier is an embedded composite identifier; false otherwise.




createProxy
public Object createProxy(Serializable id, SessionImplementor session) throws HibernateException(Code)
Create a new proxy instance



delete
public void delete(Serializable id, Object version, Object object, SessionImplementor session) throws HibernateException(Code)
Delete a persistent instance



findDirty
public int[] findDirty(Object[] currentState, Object[] previousState, Object owner, SessionImplementor session)(Code)
Compare the two snapshots to determine if they represent dirty state.
Parameters:
  currentState - The current snapshot
Parameters:
  previousState - The baseline snapshot
Parameters:
  owner - The entity containing the state
Parameters:
  session - The originating session The indices of all dirty properties, or null if no propertieswere dirty.



findModified
public int[] findModified(Object[] old, Object[] current, Object object, SessionImplementor session)(Code)
Compare the two snapshots to determine if they represent modified state.
Parameters:
  old - The baseline snapshot
Parameters:
  current - The current snapshot
Parameters:
  object - The entity containing the state
Parameters:
  session - The originating session The indices of all modified properties, or null if no propertieswere modified.



forceVersionIncrement
public Object forceVersionIncrement(Serializable id, Object currentVersion, SessionImplementor session) throws HibernateException(Code)



getCache
public CacheConcurrencyStrategy getCache()(Code)
Get the cache (optional operation)



getCacheEntryStructure
public CacheEntryStructure getCacheEntryStructure()(Code)
Get the cache structure



getClassMetadata
public ClassMetadata getClassMetadata()(Code)
Get the user-visible metadata for the class (optional operation)



getConcreteProxyClass
public Class getConcreteProxyClass(EntityMode entityMode)(Code)
Get the proxy interface that instances of this concrete class will be cast to (optional operation).



getCurrentVersion
public Object getCurrentVersion(Serializable id, SessionImplementor session) throws HibernateException(Code)
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.



getDatabaseSnapshot
public Object[] getDatabaseSnapshot(Serializable id, SessionImplementor session) throws HibernateException(Code)
Get the current database state of the object, in a "hydrated" form, without resolving identifiers null if there is no row in the database



getEntityMetamodel
public EntityMetamodel getEntityMetamodel()(Code)
Retrieve the underlying entity metamodel instance... The metamodel



getEntityName
public String getEntityName()(Code)
The entity name which this persister maps. The name of the entity which this persister maps.



getFactory
public SessionFactoryImplementor getFactory()(Code)
Return the SessionFactory to which this persister "belongs". The owning SessionFactory.



getIdentifier
public Serializable getIdentifier(Object object, EntityMode entityMode) throws HibernateException(Code)
Get the identifier of an instance (throw an exception if no identifier property)



getIdentifierGenerator
public IdentifierGenerator getIdentifierGenerator()(Code)
Determine which identifier generation strategy is used for this entity. The identifier generation strategy.



getIdentifierPropertyName
public String getIdentifierPropertyName()(Code)
Get the name of the identifier property (or return null) - need not return the name of an actual Java property



getIdentifierType
public Type getIdentifierType()(Code)
Get the identifier type



getMappedClass
public Class getMappedClass(EntityMode entityMode)(Code)
The persistent class, or null



getNaturalIdentifierProperties
public int[] getNaturalIdentifierProperties()(Code)
If the entity defines a natural id ( EntityPersister.hasNaturalIdentifier() ), which properties make up the natural id. The indices of the properties making of the natural id; ornull, if no natural id is defined.



getNaturalIdentifierSnapshot
public Object[] getNaturalIdentifierSnapshot(Serializable id, SessionImplementor session)(Code)
Retrieve the current state of the natural-id properties from the database.
Parameters:
  id - The identifier of the entity for which to retrieve the naturak-id values.
Parameters:
  session - The session from which the request originated. The natural-id snapshot.



getPropertyCascadeStyles
public CascadeStyle[] getPropertyCascadeStyles()(Code)
Get the cascade styles of the propertes (optional operation)



getPropertyCheckability
public boolean[] getPropertyCheckability()(Code)
Get the "checkability" of the properties of this class (is the property dirty checked, does the cache need to be updated)



getPropertyInsertGenerationInclusions
public ValueInclusion[] getPropertyInsertGenerationInclusions()(Code)
Which of the properties of this class are database generated values on insert?



getPropertyInsertability
public boolean[] getPropertyInsertability()(Code)
Get the "insertability" of the properties of this class (does the property appear in an SQL INSERT)



getPropertyLaziness
public boolean[] getPropertyLaziness()(Code)



getPropertyNames
public String[] getPropertyNames()(Code)
Get the names of the class properties - doesn't have to be the names of the actual Java properties (used for XML generation only)



getPropertyNullability
public boolean[] getPropertyNullability()(Code)
Get the nullability of the properties of this class



getPropertySpaces
public Serializable[] getPropertySpaces()(Code)
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). The property spaces.




getPropertyType
public Type getPropertyType(String propertyName) throws MappingException(Code)
Get the type of a particular property by name.
Parameters:
  propertyName - The name of the property for which to retrievethe typpe. The type.
throws:
  org.hibernate.MappingException - Typically indicates an unknownproperty name.



getPropertyTypes
public Type[] getPropertyTypes()(Code)
Get the Hibernate types of the class properties



getPropertyUpdateGenerationInclusions
public ValueInclusion[] getPropertyUpdateGenerationInclusions()(Code)
Which of the properties of this class are database generated values on update?



getPropertyUpdateability
public boolean[] getPropertyUpdateability()(Code)
Get the "updateability" of the properties of this class (does the property appear in an SQL UPDATE)



getPropertyValue
public Object getPropertyValue(Object object, int i, EntityMode entityMode) throws HibernateException(Code)
Get the value of a particular property



getPropertyValue
public Object getPropertyValue(Object object, String propertyName, EntityMode entityMode) throws HibernateException(Code)
Get the value of a particular property



getPropertyValues
public Object[] getPropertyValues(Object object, EntityMode entityMode) throws HibernateException(Code)
Return the (loaded) values of the mapped properties of the object (not including backrefs)



getPropertyValuesToInsert
public Object[] getPropertyValuesToInsert(Object object, Map mergeMap, SessionImplementor session) throws HibernateException(Code)
Return the values of the insertable properties of the object (including backrefs)



getPropertyVersionability
public boolean[] getPropertyVersionability()(Code)
Get the "versionability" of the properties of this class (is the property optimistic-locked)



getQuerySpaces
public Serializable[] getQuerySpaces()(Code)
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 EntityPersister.getPropertySpaces() , except that here we include subclass entity spaces. The query spaces.




getRootEntityName
public String getRootEntityName()(Code)
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. The root entity name.



getSubclassEntityPersister
public EntityPersister getSubclassEntityPersister(Object instance, SessionFactoryImplementor factory, EntityMode entityMode)(Code)
Get the persister for an instance of this class or a subclass



getVersion
public Object getVersion(Object object, EntityMode entityMode) throws HibernateException(Code)
Get the version number (or timestamp) from the object's version property (or return null if not versioned)



getVersionProperty
public int getVersionProperty()(Code)
If EntityPersister.isVersioned() , then what is the index of the property holding the locking value. The type of the version property; or -66, if not versioned.



getVersionType
public VersionType getVersionType()(Code)
If EntityPersister.isVersioned() , then what is the type of the property holding the locking value. The type of the version property; or null, if not versioned.



guessEntityMode
public EntityMode guessEntityMode(Object object)(Code)
Try to discover the entity mode from the entity instance



hasCache
public boolean hasCache()(Code)
Does this class have a cache.



hasCascades
public boolean hasCascades()(Code)
Determine whether this entity has any non-none cascading. True if the entity has any properties with a cscade other than NONE;false otherwise (aka, no cascading).



hasCollections
public boolean hasCollections()(Code)
Determine whether this entity contains references to persistent collections. True if the entity does contain persistent collections; false otherwise.



hasIdentifierProperty
public boolean hasIdentifierProperty()(Code)
Determine whether the entity has a particular property holding the identifier value. True if the entity has a specific property holding identifier value.



hasInsertGeneratedProperties
public boolean hasInsertGeneratedProperties()(Code)
Does this entity define any properties as being database generated on insert? True if this entity contains at least one property definedas generated (including version property, but not identifier).



hasLazyProperties
public boolean hasLazyProperties()(Code)
Determine whether this entity defines any lazy properties (ala bytecode instrumentation). True if the entity has properties mapped as lazy; false otherwise.



hasMutableProperties
public boolean hasMutableProperties()(Code)
Determine whether any properties of this entity are considered mutable. True if any properties of the entity are mutable; false otherwise (meaning none are).



hasNaturalIdentifier
public boolean hasNaturalIdentifier()(Code)
Determine whether this entity defines a natural identifier. True if the entity defines a natural id; false otherwise.



hasProxy
public boolean hasProxy()(Code)
Determine whether this entity supports dynamic proxies. True if the entity has dynamic proxy support; false otherwise.



hasSubselectLoadableCollections
public boolean hasSubselectLoadableCollections()(Code)
Determine whether this entity contains references to persistent collections which are fetchable by subselect? True if the entity contains collections fetchable by subselect; false otherwise.



hasUninitializedLazyProperties
public boolean hasUninitializedLazyProperties(Object object, EntityMode entityMode)(Code)
Does the given instance have any uninitialized lazy properties?



hasUpdateGeneratedProperties
public boolean hasUpdateGeneratedProperties()(Code)
Does this entity define any properties as being database generated on update? True if this entity contains at least one property definedas generated (including version property, but not identifier).



implementsLifecycle
public boolean implementsLifecycle(EntityMode entityMode)(Code)
Does the class implement the Lifecycle interface.



implementsValidatable
public boolean implementsValidatable(EntityMode entityMode)(Code)
Does the class implement the Validatable interface.



insert
public void insert(Serializable id, Object[] fields, Object object, SessionImplementor session) throws HibernateException(Code)
Persist an instance



insert
public Serializable insert(Object[] fields, Object object, SessionImplementor session) throws HibernateException(Code)
Persist an instance, using a natively generated identifier (optional operation)



instantiate
public Object instantiate(Serializable id, EntityMode entityMode) throws HibernateException(Code)
Create a class instance initialized with the given identifier



isBatchLoadable
public boolean isBatchLoadable()(Code)
Is batch loading enabled?



isCacheInvalidationRequired
public boolean isCacheInvalidationRequired()(Code)
Should we always invalidate the cache instead of recaching updated state



isIdentifierAssignedByInsert
public boolean isIdentifierAssignedByInsert()(Code)
Are identifiers of this entity assigned known before the insert execution? Or, are they generated (in the database) by the insert execution. True if identifiers for this entity are generated by the insertexecution.



isInherited
public boolean isInherited()(Code)
Determine whether the entity is inherited one or more other entities. In other words, is this entity a subclass of other entities. True if other entities extend this entity; false otherwise.



isInstance
public boolean isInstance(Object object, EntityMode entityMode)(Code)
Is the given object an instance of this entity?



isInstrumented
public boolean isInstrumented(EntityMode entityMode)(Code)
Has the class actually been bytecode instrumented?



isLazyPropertiesCacheable
public boolean isLazyPropertiesCacheable()(Code)
Should lazy properties of this entity be cached?



isMutable
public boolean isMutable()(Code)
Determine whether instances of this entity are considered mutable. True if the entity is considered mutable; false otherwise.



isSelectBeforeUpdateRequired
public boolean isSelectBeforeUpdateRequired()(Code)
Is select snapshot before update enabled?



isSubclassEntityName
public boolean isSubclassEntityName(String entityName)(Code)
Determine whether the given name represents a subclass entity (or this entity itself) of the entity mapped by this persister.
Parameters:
  entityName - The entity name to be checked. True if the given entity name represents either the entitymapped by this persister or one of its subclass entities; falseotherwise.



isTransient
public Boolean isTransient(Object object, SessionImplementor session) throws HibernateException(Code)
Is this a new transient instance?



isVersionPropertyGenerated
public boolean isVersionPropertyGenerated()(Code)
Does this entity contain a version property that is defined to be database generated? true if this entity contains a version property and thatproperty has been marked as generated.



isVersioned
public boolean isVersioned()(Code)
Determine whether optimistic locking by column is enabled for this entity. True if optimistic locking by column (i.e., or) is enabled; false otherwise.



load
public Object load(Serializable id, Object optionalObject, LockMode lockMode, SessionImplementor session) throws HibernateException(Code)
Load an instance of the persistent class.



lock
public void lock(Serializable id, Object version, Object object, LockMode lockMode, SessionImplementor session) throws HibernateException(Code)
Do a version check (optional operation)



postInstantiate
public void postInstantiate() throws MappingException(Code)
Finish the initialization of this object.

Called only once per org.hibernate.SessionFactory lifecycle, after all entity persisters have been instantiated.
throws:
  org.hibernate.MappingException - Indicates an issue in the metdata.




processInsertGeneratedProperties
public void processInsertGeneratedProperties(Serializable id, Object entity, Object[] state, SessionImplementor session)(Code)
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 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.
Parameters:
  id - The entity's id value.
Parameters:
  entity - The entity for which to get the state.
Parameters:
  state -
Parameters:
  session - The session




processUpdateGeneratedProperties
public void processUpdateGeneratedProperties(Serializable id, Object entity, Object[] state, SessionImplementor session)(Code)
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 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.
Parameters:
  id - The entity's id value.
Parameters:
  entity - The entity for which to get the state.
Parameters:
  state -
Parameters:
  session - The session




resetIdentifier
public void resetIdentifier(Object entity, Serializable currentId, Object currentVersion, EntityMode entityMode)(Code)
Set the identifier and version of the given instance back to its "unsaved" value, returning the id
Parameters:
  currentId - TODO
Parameters:
  currentVersion - TODO



setIdentifier
public void setIdentifier(Object object, Serializable id, EntityMode entityMode) throws HibernateException(Code)
Set the identifier of an instance (or do nothing if no identifier property)



setPropertyValue
public void setPropertyValue(Object object, int i, Object value, EntityMode entityMode) throws HibernateException(Code)
Set the value of a particular property



setPropertyValues
public void setPropertyValues(Object object, Object[] values, EntityMode entityMode) throws HibernateException(Code)
Set the given values to the mapped properties of the given object



update
public void update(Serializable id, Object[] fields, int[] dirtyFields, boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object object, Object rowId, SessionImplementor session) throws HibernateException(Code)
Update a persistent instance



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.