Package org.hibernate.mapping
Interface Value
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
KeyValue
- All Known Implementing Classes:
Any,Any.KeyValue,Any.MetaValue,Array,Bag,BasicValue,Collection,Component,DependantBasicValue,DependantValue,ExportableColumn.ValueImpl,IdentifierBag,IdentifierCollection,IndexedCollection,List,ManyToOne,Map,OneToMany,OneToOne,PrimitiveArray,Set,SimpleValue,ToOne
public interface Value extends Serializable
A value is anything that is persisted by value, instead of by reference. It is essentially a HibernateType, together with zero or more columns. Values are wrapped by things with higher level semantics, for example properties, collections, classes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description Objectaccept(ValueVisitor visitor)Valuecopy()voidcreateForeignKey()voidcreateUniqueKey()boolean[]getColumnInsertability()Iterator<Selectable>getColumnIterator()Deprecated.moving away from the use ofIteratoras a return typeList<Column>getColumns()If the mapping involves only columns, return them.intgetColumnSpan()The number of columns and formulas in the mapping.boolean[]getColumnUpdateability()default List<Column>getConstraintColumns()Same asgetColumns()except it returns the PK for the non-owning side of a one-to-one association.FetchModegetFetchMode()List<Selectable>getSelectables()The mapping to columns and formulas.ServiceRegistrygetServiceRegistry()TablegetTable()TypegetType()default List<Selectable>getVirtualSelectables()Same asgetSelectables()except it returns the PK for the non-owning side of a one-to-one association.booleanhasAnyInsertableColumns()booleanhasAnyUpdatableColumns()booleanhasFormula()booleanisAlternateUniqueKey()booleanisNullable()booleanisSame(Value other)booleanisSimpleValue()booleanisValid(Mapping mapping)voidsetTypeUsingReflection(String className, String propertyName)
-
-
-
Method Detail
-
getColumnSpan
int getColumnSpan()
The number of columns and formulas in the mapping.
-
getColumnIterator
@Deprecated(since="6.0") Iterator<Selectable> getColumnIterator()
Deprecated.moving away from the use ofIteratoras a return type
-
getSelectables
List<Selectable> getSelectables()
The mapping to columns and formulas.
-
getColumns
List<Column> getColumns()
If the mapping involves only columns, return them.- Throws:
AssertionFailure- if the mapping involves formulas
-
getVirtualSelectables
default List<Selectable> getVirtualSelectables()
Same asgetSelectables()except it returns the PK for the non-owning side of a one-to-one association.
-
getConstraintColumns
default List<Column> getConstraintColumns()
Same asgetColumns()except it returns the PK for the non-owning side of a one-to-one association.- Throws:
AssertionFailure- if the mapping involves formulas
-
getType
Type getType() throws MappingException
- Throws:
MappingException
-
getFetchMode
FetchMode getFetchMode()
-
getTable
Table getTable()
-
hasFormula
boolean hasFormula()
-
isAlternateUniqueKey
boolean isAlternateUniqueKey()
-
isNullable
boolean isNullable()
-
createForeignKey
void createForeignKey()
-
createUniqueKey
void createUniqueKey()
-
isSimpleValue
boolean isSimpleValue()
-
isValid
boolean isValid(Mapping mapping) throws MappingException
- Throws:
MappingException
-
setTypeUsingReflection
void setTypeUsingReflection(String className, String propertyName) throws MappingException
- Throws:
MappingException
-
accept
Object accept(ValueVisitor visitor)
-
isSame
boolean isSame(Value other)
-
getColumnInsertability
boolean[] getColumnInsertability()
-
hasAnyInsertableColumns
boolean hasAnyInsertableColumns()
-
getColumnUpdateability
boolean[] getColumnUpdateability()
-
hasAnyUpdatableColumns
boolean hasAnyUpdatableColumns()
-
getServiceRegistry
ServiceRegistry getServiceRegistry()
-
copy
Value copy()
-
-