FileDocCategorySizeDatePackage
ClassMetadata.javaAPI DocHibernate 3.2.55159Sat Jul 16 17:20:48 BST 2005org.hibernate.metadata

ClassMetadata

public interface ClassMetadata
Exposes entity class metadata to the application
see
org.hibernate.SessionFactory#getClassMetadata(Class)
author
Gavin King

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringgetEntityName()
The name of the entity

public java.io.SerializablegetIdentifier(java.lang.Object entity, org.hibernate.EntityMode entityMode)
Get the identifier of an instance (throw an exception if no identifier property)

public java.lang.StringgetIdentifierPropertyName()
Get the name of the identifier property (or return null)

public org.hibernate.type.TypegetIdentifierType()
Get the identifier Hibernate type

public java.lang.ClassgetMappedClass(org.hibernate.EntityMode entityMode)
The persistent class, or null

public int[]getNaturalIdentifierProperties()
Which properties hold the natural id?

public boolean[]getPropertyLaziness()
Get the "laziness" of the properties of this class

public java.lang.String[]getPropertyNames()
Get the names of the class' persistent properties

public boolean[]getPropertyNullability()
Get the nullability of the class' persistent properties

public org.hibernate.type.TypegetPropertyType(java.lang.String propertyName)
Get the type of a particular (named) property

public org.hibernate.type.Type[]getPropertyTypes()
Get the Hibernate types of the class properties

public java.lang.ObjectgetPropertyValue(java.lang.Object object, java.lang.String propertyName, org.hibernate.EntityMode entityMode)
Get the value of a particular (named) property

public java.lang.Object[]getPropertyValues(java.lang.Object entity, org.hibernate.EntityMode entityMode)
Extract the property values from the given entity.

param
entity The entity from which to extract the property values.
param
entityMode The entity-mode of the given entity
return
The property values.
throws
HibernateException

public java.lang.Object[]getPropertyValuesToInsert(java.lang.Object entity, java.util.Map mergeMap, org.hibernate.engine.SessionImplementor session)
Return the values of the mapped properties of the object

public java.lang.ObjectgetVersion(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 intgetVersionProperty()
Get the index of the version property

public booleanhasIdentifierProperty()
Does this class have an identifier property?

public booleanhasNaturalIdentifier()
Does this entity declare a natural id?

public booleanhasProxy()
Does this class support dynamic proxies?

public booleanhasSubclasses()
Does this entity have mapped subclasses?

public booleanimplementsLifecycle(org.hibernate.EntityMode entityMode)
Does the class implement the Lifecycle interface?

public booleanimplementsValidatable(org.hibernate.EntityMode entityMode)
Does the class implement the Validatable interface?

public java.lang.Objectinstantiate(java.io.Serializable id, org.hibernate.EntityMode entityMode)
Create a class instance initialized with the given identifier

public booleanisInherited()
Does this entity extend a mapped superclass?

public booleanisMutable()
Are instances of this class mutable?

public booleanisVersioned()
Are instances of this class versioned by a timestamp or version number column?

public voidsetIdentifier(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 voidsetPropertyValue(java.lang.Object object, java.lang.String propertyName, java.lang.Object value, org.hibernate.EntityMode entityMode)
Set the value of a particular (named) property

public voidsetPropertyValues(java.lang.Object object, java.lang.Object[] values, org.hibernate.EntityMode entityMode)
Set the given values to the mapped properties of the given object