Top Description Methods
org.hibernate.mapping

public Interface Value

extends Serializable
Known Direct Subinterfaces
org.hibernate.mapping.KeyValue
Known Direct Implementers
org.hibernate.id.ExportableColumn.ValueImpl, org.hibernate.mapping.Collection, org.hibernate.mapping.OneToMany
Imports
java.io.Serializable, java.util.Iterator, .List, .Set, org.hibernate.FetchMode, .Incubating, .Internal, .MappingException, org.hibernate.boot.spi.MetadataBuildingContext, org.hibernate.engine.spi.Mapping, org.hibernate.metamodel.mapping.JdbcMapping, org.hibernate.service.ServiceRegistry, org.hibernate.type.CompositeType, .EntityType, .MetaType, .Type

A mapping model object which represents something that's persisted "by value", instead of "by reference", that is, anything with no primary key.

A Value is essentially a Hibernate Type, together with zero or more columns. In the mapping model, a Value always comes wrapped in something with higher-level semantics, for example, a property, a collection, or a class.

Author
Gavin King

Method Summary

Modifier and TypeMethod and Description
public Object
public default void
checkColumnDuplication(Set<String>
set containing the names of the columns to check
distinctColumns
,
String
the owner of this value, used just for error reporting
owner
)

Checks if this value contains any duplicate column.

public Value
copy()

public void
public void
public default MetadataBuildingContext
public boolean[]
public List<Column>
getColumns()

If the mapping involves only columns, return them.

public int
getColumnSpan()

The number of columns and formulas in the mapping.

public boolean[]
public default List<Column>
getConstraintColumns()

Same as getColumns() except it returns the PK for the non-owning side of a one-to-one association.

public default String
public FetchMode
private Type
getIdType(EntityType entityType)

public List<Selectable>
getSelectables()

The mapping to columns and formulas.

public default JdbcMapping
getSelectableType(Mapping factory, int index)

Deprecated as a consequence of Mapping being deprecated.
public ServiceRegistry
public Table
public Type
private JdbcMapping
getType(Mapping factory, Type elementType, int index)

Deprecated as a consequence of Mapping being deprecated.
public default List<Selectable>
getVirtualSelectables()

Same as getSelectables() except it returns the PK for the non-owning side of a one-to-one association.

public boolean
public boolean
public boolean
public boolean
public boolean
isColumnInsertable(int index)

public boolean
isColumnUpdateable(int index)

public boolean
public boolean
isSame(Value other)

public boolean
public boolean
isValid(Mapping mapping)

Deprecated as a consequence of Mapping being deprecated.
public void
setTypeUsingReflection(String className, String propertyName)

Method Detail

acceptback to summary
public Object accept(ValueVisitor visitor)
checkColumnDuplicationback to summary
public default void checkColumnDuplication(Set<String> distinctColumns, String owner)

Checks if this value contains any duplicate column. A column is considered duplicate when its name is already contained in the distinctColumn set.

If a duplicate column is found, a MappingException is thrown.

Parameters
distinctColumns:Set<String>

set containing the names of the columns to check

owner:String

the owner of this value, used just for error reporting

Annotations
@Internal
copyback to summary
public Value copy()
createForeignKeyback to summary
public void createForeignKey()
createUniqueKeyback to summary
public void createUniqueKey()
getBuildingContextback to summary
public default MetadataBuildingContext getBuildingContext()
Annotations
@Incubating
getColumnInsertabilityback to summary
public boolean[] getColumnInsertability()
getColumnsback to summary
public List<Column> getColumns()

If the mapping involves only columns, return them.

Exceptions
AssertionFailure:
if the mapping involves formulas
getColumnSpanback to summary
public int getColumnSpan()

The number of columns and formulas in the mapping.

getColumnUpdateabilityback to summary
public boolean[] getColumnUpdateability()
getConstraintColumnsback to summary
public default List<Column> getConstraintColumns()

Same as getColumns() except it returns the PK for the non-owning side of a one-to-one association.

Exceptions
AssertionFailure:
if the mapping involves formulas
getExtraCreateTableInfoback to summary
public default String getExtraCreateTableInfo()
Annotations
@Incubating
getFetchModeback to summary
public FetchMode getFetchMode()
getIdTypeback to summary
private Type getIdType(EntityType entityType)
getSelectablesback to summary
public List<Selectable> getSelectables()

The mapping to columns and formulas.

getSelectableTypeback to summary
public default JdbcMapping getSelectableType(Mapping factory, int index) throws MappingException

Deprecated

as a consequence of Mapping being deprecated. See corresponding docs for further information.

Annotations
@Incubating
getServiceRegistryback to summary
public ServiceRegistry getServiceRegistry()
getTableback to summary
public Table getTable()
getTypeback to summary
public Type getType() throws MappingException
getTypeback to summary
private JdbcMapping getType(Mapping factory, Type elementType, int index)

Deprecated

as a consequence of Mapping being deprecated. See corresponding docs for further information.

getVirtualSelectablesback to summary
public default List<Selectable> getVirtualSelectables()

Same as getSelectables() except it returns the PK for the non-owning side of a one-to-one association.

hasAnyInsertableColumnsback to summary
public boolean hasAnyInsertableColumns()
hasAnyUpdatableColumnsback to summary
public boolean hasAnyUpdatableColumns()
hasFormulaback to summary
public boolean hasFormula()
isAlternateUniqueKeyback to summary
public boolean isAlternateUniqueKey()
isColumnInsertableback to summary
public boolean isColumnInsertable(int index)
isColumnUpdateableback to summary
public boolean isColumnUpdateable(int index)
isNullableback to summary
public boolean isNullable()
isSameback to summary
public boolean isSame(Value other)
isSimpleValueback to summary
public boolean isSimpleValue()
isValidback to summary
public boolean isValid(Mapping mapping) throws MappingException

Deprecated

as a consequence of Mapping being deprecated. See corresponding docs for further information.

setTypeUsingReflectionback to summary
public void setTypeUsingReflection(String className, String propertyName) throws MappingException