| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ClassMetadata
Exposes entity class metadata to the application
SessionFactory.getClassMetadata(Class)| Method Summary | |
|---|---|
|  String | getEntityName()The name of the entity | 
|  Serializable | getIdentifier(Object object,
              EntityMode entityMode)Deprecated. Use getIdentifier(Object,SessionImplementor)instead | 
|  Serializable | getIdentifier(Object entity,
              SessionImplementor session)Get the identifier of an instance (throw an exception if no identifier property) | 
|  String | getIdentifierPropertyName()Get the name of the identifier property (or return null) | 
|  Type | getIdentifierType()Get the identifier Hibernate type | 
|  Class | getMappedClass(EntityMode entityMode)The persistent class, or null | 
|  int[] | getNaturalIdentifierProperties()Which properties hold the natural id? | 
|  boolean[] | getPropertyLaziness()Get the "laziness" of the properties of this class | 
|  String[] | getPropertyNames()Get the names of the class' persistent properties | 
|  boolean[] | getPropertyNullability()Get the nullability of the class' persistent properties | 
|  Type | getPropertyType(String propertyName)Get the type of a particular (named) property | 
|  Type[] | getPropertyTypes()Get the Hibernate types of the class properties | 
|  Object | getPropertyValue(Object object,
                 String propertyName,
                 EntityMode entityMode)Get the value of a particular (named) property | 
|  Object[] | getPropertyValues(Object entity,
                  EntityMode entityMode)Extract the property values from the given entity. | 
|  Object[] | getPropertyValuesToInsert(Object entity,
                          Map mergeMap,
                          SessionImplementor session)Return the values of the mapped properties of the object | 
|  Object | getVersion(Object object,
           EntityMode entityMode)Get the version number (or timestamp) from the object's version property (or return null if not versioned) | 
|  int | getVersionProperty()Get the index of the version property | 
|  boolean | hasIdentifierProperty()Does this class have an identifier property? | 
|  boolean | hasNaturalIdentifier()Does this entity declare a natural id? | 
|  boolean | hasProxy()Does this class support dynamic proxies? | 
|  boolean | hasSubclasses()Does this entity have mapped subclasses? | 
|  boolean | implementsLifecycle(EntityMode entityMode)Does the class implement the Lifecycle interface? | 
|  boolean | implementsValidatable(EntityMode entityMode)Does the class implement the Validatable interface? | 
|  Object | instantiate(Serializable id,
            EntityMode entityMode)Deprecated. Use instantiate(Serializable, SessionImplementor)instead | 
|  Object | instantiate(Serializable id,
            SessionImplementor session)Create a class instance initialized with the given identifier | 
|  boolean | isInherited()Does this entity extend a mapped superclass? | 
|  boolean | isMutable()Are instances of this class mutable? | 
|  boolean | isVersioned()Are instances of this class versioned by a timestamp or version number column? | 
|  void | setIdentifier(Object entity,
              Serializable id,
              EntityMode entityMode)Deprecated. Use setIdentifier(Object, Serializable, SessionImplementor)instead. | 
|  void | setIdentifier(Object entity,
              Serializable id,
              SessionImplementor session)Inject the identifier value into the given entity. | 
|  void | setPropertyValue(Object object,
                 String propertyName,
                 Object value,
                 EntityMode entityMode)Set the value of a particular (named) property | 
|  void | setPropertyValues(Object object,
                  Object[] values,
                  EntityMode entityMode)Set the given values to the mapped properties of the given object | 
| Method Detail | 
|---|
String getEntityName()
String getIdentifierPropertyName()
String[] getPropertyNames()
Type getIdentifierType()
Type[] getPropertyTypes()
Type getPropertyType(String propertyName)
                     throws HibernateException
HibernateExceptionboolean hasProxy()
boolean isMutable()
boolean isVersioned()
int getVersionProperty()
boolean[] getPropertyNullability()
boolean[] getPropertyLaziness()
boolean hasIdentifierProperty()
boolean hasNaturalIdentifier()
int[] getNaturalIdentifierProperties()
boolean hasSubclasses()
boolean isInherited()
Object[] getPropertyValuesToInsert(Object entity,
                                   Map mergeMap,
                                   SessionImplementor session)
                                   throws HibernateException
HibernateExceptionClass getMappedClass(EntityMode entityMode)
Object instantiate(Serializable id,
                   EntityMode entityMode)
                   throws HibernateException
instantiate(Serializable, SessionImplementor) instead
HibernateException
Object instantiate(Serializable id,
                   SessionImplementor session)
id - The identifier value to use (may be null to represent no value)session - The session from which the request originated.
Object getPropertyValue(Object object,
                        String propertyName,
                        EntityMode entityMode)
                        throws HibernateException
HibernateException
Object[] getPropertyValues(Object entity,
                           EntityMode entityMode)
                           throws HibernateException
entity - The entity from which to extract the property values.entityMode - The entity-mode of the given entity
HibernateException
void setPropertyValue(Object object,
                      String propertyName,
                      Object value,
                      EntityMode entityMode)
                      throws HibernateException
HibernateException
void setPropertyValues(Object object,
                       Object[] values,
                       EntityMode entityMode)
                       throws HibernateException
HibernateException
Serializable getIdentifier(Object object,
                           EntityMode entityMode)
                           throws HibernateException
getIdentifier(Object,SessionImplementor) instead
HibernateException
Serializable getIdentifier(Object entity,
                           SessionImplementor session)
entity - The entity for which to get the identifiersession - The session from which the request originated
void setIdentifier(Object entity,
                   Serializable id,
                   EntityMode entityMode)
                   throws HibernateException
setIdentifier(Object, Serializable, SessionImplementor) instead.
entity - The entity to inject with the identifier value.id - The value to be injected as the identifier.entityMode - The entity mode
HibernateException
void setIdentifier(Object entity,
                   Serializable id,
                   SessionImplementor session)
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 originatesboolean implementsLifecycle(EntityMode entityMode)
boolean implementsValidatable(EntityMode entityMode)
Object getVersion(Object object,
                  EntityMode entityMode)
                  throws HibernateException
HibernateException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||