Package org.hibernate.mapping
Class Any
- java.lang.Object
-
- org.hibernate.mapping.SimpleValue
-
- org.hibernate.mapping.Any
-
- All Implemented Interfaces:
Serializable
,KeyValue
,Value
public class Any extends SimpleValue
A mapping model object representing a polymorphic association to one of several tables.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Any.KeyValue
static class
Any.MetaValue
-
Field Summary
-
Fields inherited from class org.hibernate.mapping.SimpleValue
DEFAULT_ID_GEN_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description Any(MetadataBuildingContext buildingContext, Table table)
Any(MetadataBuildingContext buildingContext, Table table, boolean annotations)
Any(Any original)
-
Method Summary
-
Methods inherited from class org.hibernate.mapping.SimpleValue
copyTypeFrom, createForeignKey, createForeignKey, createForeignKeyOfEntity, createGenerator, createParameterImpl, createUniqueKey, disableForeignKey, getAttributeConverterDescriptor, getBuildingContext, getColumn, getColumnInsertability, getColumns, getColumnSpan, getColumnUpdateability, getConstraintColumnIterator, getCustomIdGeneratorCreator, getFetchMode, getForeignKeyDefinition, getForeignKeyName, getIdentifierGeneratorParameters, getIdentifierGeneratorProperties, getIdentifierGeneratorStrategy, getJpaAttributeConverterDescriptor, getMetadata, getNullValue, getOnDeleteAction, getSelectables, getServiceRegistry, getTable, getTypeConfiguration, getTypeName, getTypeParameters, hasAnyInsertableColumns, hasAnyUpdatableColumns, hasFormula, isAlternateUniqueKey, isCascadeDeleteEnabled, isColumnInsertable, isColumnUpdateable, isConstrained, isForeignKeyEnabled, isLob, isNationalized, isNullable, isPartitionKey, isSame, isSame, isSimpleValue, isTypeSpecified, isUpdateable, isVersion, justAddColumn, justAddColumn, justAddFormula, makeLob, makeNationalized, makeParameterImpl, makeVersion, setAlternateUniqueKey, setAttributeConverterDescriptor, setCascadeDeleteEnabled, setCustomIdGeneratorCreator, setForeignKeyDefinition, setForeignKeyName, setIdentifierGeneratorParameters, setIdentifierGeneratorProperties, setIdentifierGeneratorProperties, setIdentifierGeneratorStrategy, setJpaAttributeConverterDescriptor, setNullValue, setOnDeleteAction, setPartitionKey, setTable, setTypeName, setTypeParameters, setTypeParameters, sortColumns, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.mapping.KeyValue
createIdentifierGenerator, createIdentifierGenerator
-
Methods inherited from interface org.hibernate.mapping.Value
checkColumnDuplication, getConstraintColumns, getExtraCreateTableInfo, getSelectableType, getVirtualSelectables
-
-
-
-
Constructor Detail
-
Any
public Any(MetadataBuildingContext buildingContext, Table table)
-
Any
public Any(MetadataBuildingContext buildingContext, Table table, boolean annotations)
-
Any
public Any(Any original)
-
-
Method Detail
-
copy
public Any copy()
-
addSelectable
public void addSelectable(Selectable selectable)
-
getDiscriminatorDescriptor
public BasicValue getDiscriminatorDescriptor()
-
getKeyDescriptor
public BasicValue getKeyDescriptor()
-
getMetaMapping
public Any.MetaValue getMetaMapping()
-
getKeyMapping
public SimpleValue getKeyMapping()
-
getIdentifierType
public String getIdentifierType()
-
setIdentifierType
public void setIdentifierType(String identifierType)
-
getType
public AnyType getType() throws MappingException
- Throws:
MappingException
-
addColumn
public void addColumn(Column column)
- Overrides:
addColumn
in classSimpleValue
-
addColumn
public void addColumn(Column column, boolean isInsertable, boolean isUpdatable)
- Overrides:
addColumn
in classSimpleValue
-
addFormula
public void addFormula(Formula formula)
- Overrides:
addFormula
in classSimpleValue
-
getMetaType
public String getMetaType()
-
setMetaType
public void setMetaType(String type)
-
setMetaValues
public void setMetaValues(Map metaValueToEntityNameMap)
-
isLazy
public boolean isLazy()
-
setLazy
public void setLazy(boolean lazy)
-
setTypeUsingReflection
public void setTypeUsingReflection(String className, String propertyName) throws MappingException
- Specified by:
setTypeUsingReflection
in interfaceValue
- Overrides:
setTypeUsingReflection
in classSimpleValue
- Throws:
MappingException
-
accept
public Object accept(ValueVisitor visitor)
- Specified by:
accept
in interfaceValue
- Overrides:
accept
in classSimpleValue
-
isSame
public boolean isSame(SimpleValue other)
- Overrides:
isSame
in classSimpleValue
-
isSame
public boolean isSame(Any other)
-
isValid
public boolean isValid(Mapping mapping) throws MappingException
- Specified by:
isValid
in interfaceValue
- Overrides:
isValid
in classSimpleValue
- Throws:
MappingException
-
setDiscriminator
public void setDiscriminator(BasicValue discriminatorDescriptor)
-
setDiscriminatorValueMappings
public void setDiscriminatorValueMappings(Map<Object,Class<?>> discriminatorValueMappings)
-
setKey
public void setKey(BasicValue keyDescriptor)
-
-