Package org.hibernate.mapping
Class Any
- java.lang.Object
- org.hibernate.mapping.SimpleValue
- org.hibernate.mapping.Any
- All Implemented Interfaces:
Serializable,KeyValue,Value
public classAnyextendsSimpleValue
A mapping model object representing apolymorphic association to one of several tables.- See Also:
- Serialized Form
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAny.KeyValuestatic classAny.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() throwsMappingException
- Throws:
MappingException
addColumn
public void addColumn(Column column)
- Overrides:
addColumnin classSimpleValue
addColumn
public void addColumn(Column column, boolean isInsertable, boolean isUpdatable)
- Overrides:
addColumnin classSimpleValue
addFormula
public void addFormula(Formula formula)
- Overrides:
addFormulain 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) throwsMappingException
- Specified by:
setTypeUsingReflectionin interfaceValue- Overrides:
setTypeUsingReflectionin classSimpleValue- Throws:
MappingException
accept
public Object accept(ValueVisitor visitor)
- Specified by:
acceptin interfaceValue- Overrides:
acceptin classSimpleValue
isSame
public boolean isSame(SimpleValue other)
- Overrides:
isSamein classSimpleValue
isSame
public boolean isSame(Any other)
isValid
public boolean isValid(Mapping mapping) throwsMappingException
- Specified by:
isValidin interfaceValue- Overrides:
isValidin classSimpleValue- Throws:
MappingException
setDiscriminator
public void setDiscriminator(BasicValue discriminatorDescriptor)
setDiscriminatorValueMappings
public void setDiscriminatorValueMappings(Map<Object,Class<?>> discriminatorValueMappings)
setKey
public void setKey(BasicValue keyDescriptor)