org.hibernate.metadata.ClassMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of beangle-hibernate-core Show documentation
Show all versions of beangle-hibernate-core Show documentation
Hibernate Orm Core Shade,Support Scala Collection
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.metadata;
import java.util.Map;
import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.type.Type;
/**
* Exposes entity class metadata to the application
*
* @author Gavin King
*
* @deprecated Use Hibernate's mapping model {@link org.hibernate.metamodel.MappingMetamodel}
*/
@Deprecated(since = "6.0")
public interface ClassMetadata {
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// stuff that is persister-centric and/or EntityInfo-centric ~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* The name of the entity
*/
String getEntityName();
/**
* Get the name of the identifier property (or return null)
*/
String getIdentifierPropertyName();
/**
* Get the names of the class' persistent properties
*/
String[] getPropertyNames();
/**
* Get the identifier Hibernate type
*/
Type getIdentifierType();
/**
* Get the Hibernate types of the class properties
*/
Type[] getPropertyTypes();
/**
* Get the type of a particular (named) property
*/
Type getPropertyType(String propertyName) throws HibernateException;
/**
* Does this class support dynamic proxies?
*/
boolean hasProxy();
/**
* Are instances of this class mutable?
*/
boolean isMutable();
/**
* Are instances of this class versioned by a timestamp or version number column?
*/
boolean isVersioned();
/**
* Get the index of the version property
*/
int getVersionProperty();
/**
* Get the nullability of the class' persistent properties
*/
boolean[] getPropertyNullability();
/**
* Get the "laziness" of the properties of this class
*/
boolean[] getPropertyLaziness();
/**
* Does this class have an identifier property?
*/
boolean hasIdentifierProperty();
/**
* Does this entity declare a natural id?
*/
boolean hasNaturalIdentifier();
/**
* Which properties hold the natural id?
*/
int[] getNaturalIdentifierProperties();
/**
* Does this entity have mapped subclasses?
*/
boolean hasSubclasses();
/**
* Does this entity extend a mapped superclass?
*/
boolean isInherited();
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// stuff that is tuplizer-centric, but is passed a session ~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* Return the values of the mapped properties of the object
*
* @deprecated Use the form accepting SharedSessionContractImplementor instead
*/
@Deprecated(since = "5.3")
@SuppressWarnings({"UnusedDeclaration"})
default Object[] getPropertyValuesToInsert(Object entity, Map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy