Example usage for Java org.hibernate.metadata ClassMetadata fields, constructors, methods, implement or subclass
The text is from its open source code.
String | getEntityName() The name of the entity |
Serializable | getIdentifier(Object entity, SessionImplementor session) Get the identifier of an instance (throw an exception if no identifier property) |
Serializable | getIdentifier(Object entity, SharedSessionContractImplementor session) Get the identifier of an instance (throw an exception if no identifier property) |
Serializable | getIdentifier(Object object) 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() 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) Get the value of a particular (named) property |
Object[] | getPropertyValues(Object entity) Extract the property values from the given entity. |
Object | getVersion(Object object) 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 | hasSubclasses() Does this entity have mapped subclasses? |
Object | instantiate(Serializable id, SessionImplementor session) Create a class instance initialized with the given identifier |
Object | instantiate(Serializable id, SharedSessionContractImplementor session) Create a class instance initialized with the given identifier |
boolean | isInherited() Does this entity extend a mapped superclass? |
void | setIdentifier(Object entity, Serializable id, SessionImplementor session) Inject the identifier value into the given entity. |
void | setIdentifier(Object entity, Serializable id, SharedSessionContractImplementor session) Inject the identifier value into the given entity. |
void | setPropertyValue(Object object, String propertyName, Object value) Set the value of a particular (named) property |