Package org.hibernate.metadata
Interface ClassMetadata
- All Known Subinterfaces:
DeprecatedEntityStuff
- All Known Implementing Classes:
AbstractEntityPersister
,JoinedSubclassEntityPersister
,SingleTableEntityPersister
,UnionSubclassEntityPersister
Deprecated.
Exposes entity class metadata to the application
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.The name of the entitydefault Object
getIdentifier
(Object object) Deprecated.default Object
getIdentifier
(Object entity, SessionImplementor session) Deprecated.getIdentifier
(Object entity, SharedSessionContractImplementor session) Deprecated.Get the identifier of an instance (throw an exception if no identifier property)Deprecated.Get the name of the identifier property (or return null)Deprecated.Get the identifier Hibernate typeClass<?>
Deprecated.The persistent class, or nullint[]
Deprecated.Which properties hold the natural id?boolean[]
Deprecated.Get the "laziness" of the properties of this classString[]
Deprecated.Get the names of the class' persistent propertiesboolean[]
Deprecated.Get the nullability of the class' persistent propertiesgetPropertyType
(String propertyName) Deprecated.Get the type of a particular (named) propertyType[]
Deprecated.Get the Hibernate types of the class propertiesgetPropertyValue
(Object object, String propertyName) Deprecated.Get the value of a particular (named) propertyObject[]
getPropertyValues
(Object entity) Deprecated.Extract the property values from the given entity.default Object[]
getPropertyValuesToInsert
(Object entity, Map<Object, Object> mergeMap, SessionImplementor session) Deprecated.Use the form accepting SharedSessionContractImplementor insteadObject[]
getPropertyValuesToInsert
(Object entity, Map<Object, Object> mergeMap, SharedSessionContractImplementor session) Deprecated.Return the values of the mapped properties of the objectgetVersion
(Object object) Deprecated.Get the version number (or timestamp) from the object's version property (or return null if not versioned)int
Deprecated.Get the index of the version propertyboolean
Deprecated.Does this class have an identifier property?boolean
Deprecated.Does this entity declare a natural id?boolean
hasProxy()
Deprecated.Does this class support dynamic proxies?boolean
Deprecated.Does this entity have mapped subclasses?boolean
Deprecated.Does the class implement theLifecycle
interface?default Object
instantiate
(Object id, SessionImplementor session) Deprecated.Use the form accepting SharedSessionContractImplementor insteadinstantiate
(Object id, SharedSessionContractImplementor session) Deprecated.Create a class instance initialized with the given identifierboolean
Deprecated.Does this entity extend a mapped superclass?boolean
Deprecated.Are instances of this class mutable?boolean
Deprecated.Are instances of this class versioned by a timestamp or version number column?default void
setIdentifier
(Object entity, Object id, SessionImplementor session) Deprecated.void
setIdentifier
(Object entity, Object id, SharedSessionContractImplementor session) Deprecated.Inject the identifier value into the given entity.void
setPropertyValue
(Object object, String propertyName, Object value) Deprecated.Set the value of a particular (named) propertyvoid
setPropertyValues
(Object object, Object[] values) Deprecated.Set the given values to the mapped properties of the given object
-
Method Details
-
getEntityName
String getEntityName()Deprecated.The name of the entity -
getIdentifierPropertyName
String getIdentifierPropertyName()Deprecated.Get the name of the identifier property (or return null) -
getPropertyNames
String[] getPropertyNames()Deprecated.Get the names of the class' persistent properties -
getIdentifierType
Type getIdentifierType()Deprecated.Get the identifier Hibernate type -
getPropertyTypes
Type[] getPropertyTypes()Deprecated.Get the Hibernate types of the class properties -
getPropertyType
Deprecated.Get the type of a particular (named) property- Throws:
HibernateException
-
hasProxy
boolean hasProxy()Deprecated.Does this class support dynamic proxies? -
isMutable
boolean isMutable()Deprecated.Are instances of this class mutable? -
isVersioned
boolean isVersioned()Deprecated.Are instances of this class versioned by a timestamp or version number column? -
getVersionProperty
int getVersionProperty()Deprecated.Get the index of the version property -
getPropertyNullability
boolean[] getPropertyNullability()Deprecated.Get the nullability of the class' persistent properties -
getPropertyLaziness
boolean[] getPropertyLaziness()Deprecated.Get the "laziness" of the properties of this class -
hasIdentifierProperty
boolean hasIdentifierProperty()Deprecated.Does this class have an identifier property? -
hasNaturalIdentifier
boolean hasNaturalIdentifier()Deprecated.Does this entity declare a natural id? -
getNaturalIdentifierProperties
int[] getNaturalIdentifierProperties()Deprecated.Which properties hold the natural id? -
hasSubclasses
boolean hasSubclasses()Deprecated.Does this entity have mapped subclasses? -
isInherited
boolean isInherited()Deprecated.Does this entity extend a mapped superclass? -
getPropertyValuesToInsert
@Deprecated(since="5.3") default Object[] getPropertyValuesToInsert(Object entity, Map<Object, Object> mergeMap, SessionImplementor session) throws HibernateExceptionDeprecated.Use the form accepting SharedSessionContractImplementor insteadReturn the values of the mapped properties of the object- Throws:
HibernateException
-
getMappedClass
Class<?> getMappedClass()Deprecated.The persistent class, or null -
instantiate
Deprecated.Use the form accepting SharedSessionContractImplementor insteadCreate a class instance initialized with the given identifier- Parameters:
id
- The identifier value to use (may be null to represent no value)session
- The session from which the request originated.- Returns:
- The instantiated entity.
-
getPropertyValue
Deprecated.Get the value of a particular (named) property- Throws:
HibernateException
-
getPropertyValues
Deprecated.Extract the property values from the given entity.- Parameters:
entity
- The entity from which to extract the property values.- Returns:
- The property values.
- Throws:
HibernateException
-
setPropertyValue
Deprecated.Set the value of a particular (named) property- Throws:
HibernateException
-
setPropertyValues
Deprecated.Set the given values to the mapped properties of the given object- Throws:
HibernateException
-
getIdentifier
Deprecated.Get the identifier of an instance (throw an exception if no identifier property)- Throws:
HibernateException
-
getIdentifier
Deprecated.Get the identifier of an instance (throw an exception if no identifier property)- Parameters:
entity
- The entity for which to get the identifiersession
- The session from which the request originated- Returns:
- The identifier
-
setIdentifier
Deprecated.Inject the identifier value into the given entity.- Parameters:
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
-
implementsLifecycle
boolean implementsLifecycle()Deprecated.Does the class implement theLifecycle
interface? -
getVersion
Deprecated.Get the version number (or timestamp) from the object's version property (or return null if not versioned)- Throws:
HibernateException
-
MappingMetamodel