Package org.hibernate.mapping
Class SimpleValue
- java.lang.Object
- org.hibernate.mapping.SimpleValue
- All Implemented Interfaces:
Serializable,KeyValue,Value
- Direct Known Subclasses:
Any,Any.KeyValue,Any.MetaValue,BasicValue,Component,DependantValue,ToOne
public abstract classSimpleValueextendsObjectimplementsKeyValue
A mapping model object that represents any value that maps to columns.- See Also:
- Serialized Form
Field Summary
Fields Modifier and Type Field Description staticStringDEFAULT_ID_GEN_STRATEGY
Constructor Summary
Constructors Modifier Constructor Description SimpleValue(MetadataBuildingContext buildingContext)SimpleValue(MetadataBuildingContext buildingContext,Table table)protectedSimpleValue(SimpleValue original)
Method Summary
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,copy,getConstraintColumns,getExtraCreateTableInfo,getSelectableType,getType,getVirtualSelectables
Field Detail
DEFAULT_ID_GEN_STRATEGY
public static final String DEFAULT_ID_GEN_STRATEGY
- See Also:
- Constant Field Values
Constructor Detail
SimpleValue
public SimpleValue(MetadataBuildingContext buildingContext)
SimpleValue
public SimpleValue(MetadataBuildingContext buildingContext,Table table)
SimpleValue
protected SimpleValue(SimpleValue original)
Method Detail
getBuildingContext
public MetadataBuildingContext getBuildingContext()
- Specified by:
getBuildingContextin interfaceValue
getMetadata
public MetadataImplementor getMetadata()
getServiceRegistry
public ServiceRegistry getServiceRegistry()
- Specified by:
getServiceRegistryin interfaceValue
getTypeConfiguration
public TypeConfiguration getTypeConfiguration()
setOnDeleteAction
public void setOnDeleteAction(OnDeleteAction onDeleteAction)
getOnDeleteAction
public OnDeleteAction getOnDeleteAction()
isCascadeDeleteEnabled
@Deprecated(since="6.2")public boolean isCascadeDeleteEnabled()
Deprecated.- Specified by:
isCascadeDeleteEnabledin interfaceKeyValue
setCascadeDeleteEnabled
@Deprecated(since="6.2")public void setCascadeDeleteEnabled(boolean cascadeDeleteEnabled)
Deprecated.
addColumn
public void addColumn(Column column)
addColumn
public void addColumn(Column column, boolean isInsertable, boolean isUpdatable)
addFormula
public void addFormula(Formula formula)
justAddColumn
protected void justAddColumn(Column column)
justAddColumn
protected void justAddColumn(Column column, boolean insertable, boolean updatable)
justAddFormula
protected void justAddFormula(Formula formula)
sortColumns
public void sortColumns(int[] originalOrder)
hasFormula
public boolean hasFormula()
- Specified by:
hasFormulain interfaceValue
getColumnSpan
public int getColumnSpan()
Description copied from interface:ValueThe number of columns and formulas in the mapping.- Specified by:
getColumnSpanin interfaceValue
getColumn
protected Selectable getColumn(int position)
getSelectables
public List<Selectable> getSelectables()
Description copied from interface:ValueThe mapping to columns and formulas.- Specified by:
getSelectablesin interfaceValue
getColumns
public List<Column> getColumns()
Description copied from interface:ValueIf the mapping involves only columns, return them.- Specified by:
getColumnsin interfaceValue
getConstraintColumnIterator
@Deprecated(forRemoval=true,since="6.3")public Iterator<Selectable> getConstraintColumnIterator()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetSelectables()instead
getTypeName
public String getTypeName()
setTypeName
public void setTypeName(String typeName)
makeVersion
public void makeVersion()
isVersion
public boolean isVersion()
makeNationalized
public void makeNationalized()
isNationalized
public boolean isNationalized()
makeLob
public void makeLob()
isLob
public boolean isLob()
setTable
public void setTable(Table table)
createForeignKey
public void createForeignKey() throwsMappingException
- Specified by:
createForeignKeyin interfaceValue- Throws:
MappingException
createForeignKey
public void createForeignKey(PersistentClass referencedEntity,AnnotatedJoinColumns joinColumns) throwsMappingException
- Throws:
MappingException
createForeignKeyOfEntity
public ForeignKey createForeignKeyOfEntity(String entityName)
- Specified by:
createForeignKeyOfEntityin interfaceKeyValue
createUniqueKey
public void createUniqueKey(MetadataBuildingContext context)
- Specified by:
createUniqueKeyin interfaceValue
setCustomIdGeneratorCreator
@Internalpublic void setCustomIdGeneratorCreator(IdentifierGeneratorCreator customIdGeneratorCreator)
getCustomIdGeneratorCreator
@Internalpublic IdentifierGeneratorCreator getCustomIdGeneratorCreator()
createGenerator
public Generator createGenerator(IdentifierGeneratorFactory identifierGeneratorFactory,Dialect dialect,RootClass rootClass) throwsMappingException
- Specified by:
createGeneratorin interfaceKeyValue- Throws:
MappingException
isUpdateable
public boolean isUpdateable()
- Specified by:
isUpdateablein interfaceKeyValue
getFetchMode
public FetchMode getFetchMode()
- Specified by:
getFetchModein interfaceValue
getIdentifierGeneratorStrategy
public String getIdentifierGeneratorStrategy()
Returns the identifierGeneratorStrategy.- Returns:
- String
setIdentifierGeneratorStrategy
public void setIdentifierGeneratorStrategy(String identifierGeneratorStrategy)
Sets the identifierGeneratorStrategy.- Parameters:
identifierGeneratorStrategy- The identifierGeneratorStrategy to set
setIdentifierGeneratorParameters
public void setIdentifierGeneratorParameters(Map<String,Object> identifierGeneratorParameters)
getIdentifierGeneratorProperties
@Deprecated@Removepublic @RemoveProperties getIdentifierGeneratorProperties()
Deprecated.
setIdentifierGeneratorProperties
@Deprecated@Removepublic void setIdentifierGeneratorProperties(Properties identifierGeneratorProperties)
Deprecated.
setIdentifierGeneratorProperties
@Deprecated@Removepublic void setIdentifierGeneratorProperties(Map<String,Object> identifierGeneratorProperties)
Deprecated.
getNullValue
public String getNullValue()
- Specified by:
getNullValuein interfaceKeyValue
setNullValue
public void setNullValue(String nullValue)
Sets the nullValue.- Parameters:
nullValue- The nullValue to set
getForeignKeyName
public String getForeignKeyName()
setForeignKeyName
public void setForeignKeyName(String foreignKeyName)
isForeignKeyEnabled
public boolean isForeignKeyEnabled()
disableForeignKey
public void disableForeignKey()
isConstrained
public boolean isConstrained()
getForeignKeyDefinition
public String getForeignKeyDefinition()
setForeignKeyDefinition
public void setForeignKeyDefinition(String foreignKeyDefinition)
isAlternateUniqueKey
public boolean isAlternateUniqueKey()
- Specified by:
isAlternateUniqueKeyin interfaceValue
setAlternateUniqueKey
public void setAlternateUniqueKey(boolean unique)
isNullable
public boolean isNullable()
- Specified by:
isNullablein interfaceValue
isSimpleValue
public boolean isSimpleValue()
- Specified by:
isSimpleValuein interfaceValue
isValid
public boolean isValid(Mapping mapping) throwsMappingException
- Specified by:
isValidin interfaceValue- Throws:
MappingException
setAttributeConverterDescriptor
protected void setAttributeConverterDescriptor(ConverterDescriptor descriptor)
getAttributeConverterDescriptor
protected ConverterDescriptor getAttributeConverterDescriptor()
setTypeUsingReflection
public void setTypeUsingReflection(String className,String propertyName) throwsMappingException
- Specified by:
setTypeUsingReflectionin interfaceValue- Throws:
MappingException
isTypeSpecified
public boolean isTypeSpecified()
setTypeParameters
public void setTypeParameters(Properties parameterMap)
getTypeParameters
public Properties getTypeParameters()
copyTypeFrom
public void copyTypeFrom(SimpleValue sourceValue)
isSame
public boolean isSame(SimpleValue other)
accept
public Object accept(ValueVisitor visitor)
getColumnInsertability
public boolean[] getColumnInsertability()
- Specified by:
getColumnInsertabilityin interfaceValue
hasAnyInsertableColumns
public boolean hasAnyInsertableColumns()
- Specified by:
hasAnyInsertableColumnsin interfaceValue
getColumnUpdateability
public boolean[] getColumnUpdateability()
- Specified by:
getColumnUpdateabilityin interfaceValue
hasAnyUpdatableColumns
public boolean hasAnyUpdatableColumns()
- Specified by:
hasAnyUpdatableColumnsin interfaceValue
isColumnInsertable
public boolean isColumnInsertable(int index)
- Specified by:
isColumnInsertablein interfaceValue
isColumnUpdateable
public boolean isColumnUpdateable(int index)
- Specified by:
isColumnUpdateablein interfaceValue
isPartitionKey
public boolean isPartitionKey()
setPartitionKey
public void setPartitionKey(boolean partitionColumn)
getJpaAttributeConverterDescriptor
public ConverterDescriptor getJpaAttributeConverterDescriptor()
setJpaAttributeConverterDescriptor
public void setJpaAttributeConverterDescriptor(ConverterDescriptor descriptor)
createParameterImpl
protected void createParameterImpl()
makeParameterImpl
public DynamicParameterizedType.ParameterType makeParameterImpl()