Top Description Inners Fields Constructors Methods
org.hibernate.mapping

public Class SimpleValue

extends Object
implements KeyValue
Class Inheritance
All Implemented Interfaces
org.hibernate.mapping.KeyValue, org.hibernate.mapping.Value, java.io.Serializable
Known Direct Subclasses
org.hibernate.mapping.ToOne, org.hibernate.mapping.Any, org.hibernate.mapping.Component, org.hibernate.mapping.DependantValue
Imports
java.io.Serializable, java.lang.annotation.Annotation, java.sql.Types, java.util.ArrayList, .Iterator, .List, .Locale, .Map, .Properties, .Objects, javax.persistence.AttributeConverter, org.hibernate.FetchMode, .MappingException, org.hibernate.annotations.common.reflection.XProperty, org.hibernate.boot.model.convert.internal.ClassBasedConverterDescriptor, org.hibernate.boot.model.convert.spi.ConverterDescriptor, .JpaAttributeConverterCreationContext, org.hibernate.boot.registry.classloading.spi.ClassLoaderService, .ClassLoadingException, org.hibernate.boot.spi.InFlightMetadataCollector, .MetadataBuildingContext, .MetadataImplementor, org.hibernate.cfg.AvailableSettings, org.hibernate.dialect.Dialect, org.hibernate.engine.config.spi.ConfigurationService, .StandardConverters, org.hibernate.engine.jdbc.spi.JdbcServices, org.hibernate.engine.spi.Mapping, org.hibernate.id.IdentifierGenerator, .IdentityGenerator, .PersistentIdentifierGenerator, org.hibernate.id.factory.IdentifierGeneratorFactory, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.util.ReflectHelper, org.hibernate.metamodel.model.convert.spi.JpaAttributeConverter, org.hibernate.resource.beans.spi.ManagedBeanRegistry, org.hibernate.service.ServiceRegistry, org.hibernate.type.BinaryType, .RowVersionType, .Type, org.hibernate.type.descriptor.JdbcTypeNameMapper, org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter, .AttributeConverterTypeAdapter, org.hibernate.type.descriptor.java.BasicJavaDescriptor, org.hibernate.type.descriptor.sql.LobTypeMappings, .NationalizedTypeMappings, .SqlTypeDescriptor, org.hibernate.usertype.DynamicParameterizedType

Any value that maps to columns.
Author
Gavin King

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private boolean
private ConverterDescriptor
private boolean
private final List<Selectable>
public static final String
private String
private String
private IdentifierGenerator
identifierGenerator

Deprecated as a consequence of IdentifierGenerator being deprecated.
private Properties
private String
private final List<Boolean>
private boolean
private boolean
private boolean
private static final CoreMessageLogger
private final MetadataImplementor
private String
private Table
table

Deprecated as a consequence of Table being deprecated.
private Type
private String
private Properties
private final List<Boolean>

Constructor Summary

AccessConstructor and Description
public
public
public
public
SimpleValue(MetadataBuildingContext buildingContext, Table table)

Deprecated as a consequence of Table being deprecated.

Method Summary

Modifier and TypeMethod and Description
public Object
public void
addColumn(Column column)

public void
addColumn(Column column, boolean isInsertable, boolean isUpdatable)

public void
private Type

Returns:

The built AttributeConverter -> Type adapter
buildAttributeConverterTypeAdapter
()

Build a Hibernate Type that incorporates the JPA AttributeConverter.

public void
public void
public void
public IdentifierGenerator
createIdentifierGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, RootClass rootClass)

Implements org.hibernate.mapping.KeyValue.createIdentifierGenerator.

Deprecated as a consequence of IdentifierGenerator being deprecated.
public IdentifierGenerator
createIdentifierGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, String defaultCatalog, String defaultSchema, RootClass rootClass)

Implements org.hibernate.mapping.KeyValue.createIdentifierGenerator.

Deprecated as a consequence of IdentifierGenerator being deprecated.
private void
private static boolean[]
public boolean[]
public Iterator<Selectable>
public int
public boolean[]
public List<E>
public FetchMode
public String
public String
public IdentifierGenerator
getIdentifierGenerator()

Deprecated as a consequence of IdentifierGenerator being deprecated.
Returns the cached identifierGenerator.
public Properties
public String

Returns:

String
getIdentifierGeneratorStrategy
()

Returns the identifierGeneratorStrategy.

public MetadataImplementor
public String
public ServiceRegistry
public Table
getTable()

Implements org.hibernate.mapping.Value.getTable.

Deprecated as a consequence of Table being deprecated.
public Type
public String
public Properties
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
protected static boolean
isSame(Value v1, Value v2)

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public void
public void
public void
public void
setAlternateUniqueKey(boolean unique)

public void
setCascadeDeleteEnabled(boolean cascadeDeleteEnabled)

public void
setForeignKeyDefinition(String foreignKeyDefinition)

public void
setForeignKeyName(String foreignKeyName)

public void
setIdentifierGeneratorProperties(Properties
The identifierGeneratorProperties to set
identifierGeneratorProperties
)

Sets the identifierGeneratorProperties.

public void
setIdentifierGeneratorProperties(Map<K, V>
The identifierGeneratorProperties to set
identifierGeneratorProperties
)

Sets the identifierGeneratorProperties.

public void
setIdentifierGeneratorStrategy(String
The identifierGeneratorStrategy to set
identifierGeneratorStrategy
)

Sets the identifierGeneratorStrategy.

public void
public void
setNullValue(String
The nullValue to set
nullValue
)

Sets the nullValue.

public void
setTable(Table table)

Deprecated as a consequence of Table being deprecated.
public void
setTypeName(String typeName)

public void
public void
public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

alternateUniqueKeyback to summary
private boolean alternateUniqueKey
attributeConverterDescriptorback to summary
private ConverterDescriptor attributeConverterDescriptor
cascadeDeleteEnabledback to summary
private boolean cascadeDeleteEnabled
columnsback to summary
private final List<Selectable> columns
DEFAULT_ID_GEN_STRATEGYback to summary
public static final String DEFAULT_ID_GEN_STRATEGY
foreignKeyDefinitionback to summary
private String foreignKeyDefinition
foreignKeyNameback to summary
private String foreignKeyName
identifierGeneratorback to summary
private IdentifierGenerator identifierGenerator

Deprecated

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

identifierGeneratorPropertiesback to summary
private Properties identifierGeneratorProperties
identifierGeneratorStrategyback to summary
private String identifierGeneratorStrategy
insertabilityback to summary
private final List<Boolean> insertability
isLobback to summary
private boolean isLob
isNationalizedback to summary
private boolean isNationalized
isVersionback to summary
private boolean isVersion
logback to summary
private static final CoreMessageLogger log
metadataback to summary
private final MetadataImplementor metadata
nullValueback to summary
private String nullValue
tableback to summary
private Table table

Deprecated

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

typeback to summary
private Type type
typeNameback to summary
private String typeName
typeParametersback to summary
private Properties typeParameters
updatabilityback to summary
private final List<Boolean> updatability

Constructor Detail

SimpleValueback to summary
public SimpleValue(MetadataImplementor metadata)
Annotations
@Deprecated
SimpleValueback to summary
public SimpleValue(MetadataImplementor metadata, Table table)
Annotations
@Deprecated
SimpleValueback to summary
public SimpleValue(MetadataBuildingContext buildingContext)
Annotations
@Deprecated
SimpleValueback to summary
public SimpleValue(MetadataBuildingContext buildingContext, Table table)

Deprecated

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

Method Detail

acceptback to summary
public Object accept(ValueVisitor visitor)

Implements org.hibernate.mapping.Value.accept.

addColumnback to summary
public void addColumn(Column column)
addColumnback to summary
public void addColumn(Column column, boolean isInsertable, boolean isUpdatable)
addFormulaback to summary
public void addFormula(Formula formula)
buildAttributeConverterTypeAdapterback to summary
private Type buildAttributeConverterTypeAdapter()

Build a Hibernate Type that incorporates the JPA AttributeConverter. AttributeConverter works totally in memory, meaning it converts between one Java representation (the entity attribute representation) and another (the value bound into JDBC statements or extracted from results). However, the Hibernate Type system operates at the lower level of actually dealing directly with those JDBC objects. So even though we have an AttributeConverter, we still need to "fill out" the rest of the BasicType data and bridge calls to bind/extract through the converter.

Essentially the idea here is that an intermediate Java type needs to be used. Let's use an example as a means to illustrate... Consider an AttributeConverter<Integer,String>. This tells Hibernate that the domain model defines this attribute as an Integer value (the 'entityAttributeJavaType'), but that we need to treat the value as a String (the 'databaseColumnJavaType') when dealing with JDBC (aka, the database type is a VARCHAR/CHAR):

Returns:Type

The built AttributeConverter -> Type adapter

Annotations
@SuppressWarnings:unchecked
copyTypeFromback to summary
public void copyTypeFrom(SimpleValue sourceValue)
createForeignKeyback to summary
public void createForeignKey() throws MappingException

Implements org.hibernate.mapping.Value.createForeignKey.

Annotations
@Override
createForeignKeyOfEntityback to summary
public void createForeignKeyOfEntity(String entityName)

Implements org.hibernate.mapping.KeyValue.createForeignKeyOfEntity.

Annotations
@Override
createIdentifierGeneratorback to summary
public IdentifierGenerator createIdentifierGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, RootClass rootClass) throws MappingException

Implements org.hibernate.mapping.KeyValue.createIdentifierGenerator.

Deprecated

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

Annotations
@Override
createIdentifierGeneratorback to summary
public IdentifierGenerator createIdentifierGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, String defaultCatalog, String defaultSchema, RootClass rootClass) throws MappingException

Implements org.hibernate.mapping.KeyValue.createIdentifierGenerator.

Deprecated

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

Annotations
@Override
createParameterImplback to summary
private void createParameterImpl()
extractBooleansFromListback to summary
private static boolean[] extractBooleansFromList(List<Boolean> list)
getColumnInsertabilityback to summary
public boolean[] getColumnInsertability()

Implements org.hibernate.mapping.Value.getColumnInsertability.

getColumnIteratorback to summary
public Iterator<Selectable> getColumnIterator()

Implements org.hibernate.mapping.Value.getColumnIterator.

Annotations
@Override
getColumnSpanback to summary
public int getColumnSpan()

Implements org.hibernate.mapping.Value.getColumnSpan.

Annotations
@Override
getColumnUpdateabilityback to summary
public boolean[] getColumnUpdateability()

Implements org.hibernate.mapping.Value.getColumnUpdateability.

getConstraintColumnsback to summary
public List<E> getConstraintColumns()
getFetchModeback to summary
public FetchMode getFetchMode()

Implements org.hibernate.mapping.Value.getFetchMode.

getForeignKeyDefinitionback to summary
public String getForeignKeyDefinition()
getForeignKeyNameback to summary
public String getForeignKeyName()
getIdentifierGeneratorback to summary
public IdentifierGenerator getIdentifierGenerator()

Deprecated

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

Returns the cached identifierGenerator.

Returns:IdentifierGenerator

IdentifierGenerator null if createIdentifierGenerator(IdentifierGeneratorFactory, Dialect, String, String, RootClass) was never completed.

getIdentifierGeneratorPropertiesback to summary
public Properties getIdentifierGeneratorProperties()
getIdentifierGeneratorStrategyback to summary
public String getIdentifierGeneratorStrategy()

Returns the identifierGeneratorStrategy.

Returns:String

String

getMetadataback to summary
public MetadataImplementor getMetadata()
getNullValueback to summary
public String getNullValue()

Implements org.hibernate.mapping.KeyValue.getNullValue.

getServiceRegistryback to summary
public ServiceRegistry getServiceRegistry()

Implements org.hibernate.mapping.Value.getServiceRegistry.

Annotations
@Override
getTableback to summary
public Table getTable()

Implements org.hibernate.mapping.Value.getTable.

Deprecated

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

getTypeback to summary
public Type getType() throws MappingException

Implements org.hibernate.mapping.Value.getType.

getTypeNameback to summary
public String getTypeName()
getTypeParametersback to summary
public Properties getTypeParameters()
hasFormulaback to summary
public boolean hasFormula()

Implements org.hibernate.mapping.Value.hasFormula.

Annotations
@Override
isAlternateUniqueKeyback to summary
public boolean isAlternateUniqueKey()

Implements org.hibernate.mapping.Value.isAlternateUniqueKey.

isCascadeDeleteEnabledback to summary
public boolean isCascadeDeleteEnabled()

Implements org.hibernate.mapping.KeyValue.isCascadeDeleteEnabled.

Annotations
@Override
isIdentityColumnback to summary
public boolean isIdentityColumn(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect)

Implements org.hibernate.mapping.KeyValue.isIdentityColumn.

isLobback to summary
public boolean isLob()
isNationalizedback to summary
public boolean isNationalized()
isNullableback to summary
public boolean isNullable()

Implements org.hibernate.mapping.Value.isNullable.

isSameback to summary
public boolean isSame(Value other)

Implements org.hibernate.mapping.Value.isSame.

Annotations
@Override
isSameback to summary
protected static boolean isSame(Value v1, Value v2)
isSameback to summary
public boolean isSame(SimpleValue other)
isSimpleValueback to summary
public boolean isSimpleValue()

Implements org.hibernate.mapping.Value.isSimpleValue.

isTypeSpecifiedback to summary
public boolean isTypeSpecified()
isUpdateableback to summary
public boolean isUpdateable()

Implements org.hibernate.mapping.KeyValue.isUpdateable.

isValidback to summary
public boolean isValid(Mapping mapping) throws MappingException

Implements org.hibernate.mapping.Value.isValid.

isVersionback to summary
public boolean isVersion()
makeLobback to summary
public void makeLob()
makeNationalizedback to summary
public void makeNationalized()
makeVersionback to summary
public void makeVersion()
setAlternateUniqueKeyback to summary
public void setAlternateUniqueKey(boolean unique)
setCascadeDeleteEnabledback to summary
public void setCascadeDeleteEnabled(boolean cascadeDeleteEnabled)
setForeignKeyDefinitionback to summary
public void setForeignKeyDefinition(String foreignKeyDefinition)
setForeignKeyNameback to summary
public void setForeignKeyName(String foreignKeyName)
setIdentifierGeneratorPropertiesback to summary
public void setIdentifierGeneratorProperties(Properties identifierGeneratorProperties)

Sets the identifierGeneratorProperties.

Parameters
identifierGeneratorProperties:Properties

The identifierGeneratorProperties to set

setIdentifierGeneratorPropertiesback to summary
public void setIdentifierGeneratorProperties(Map<K, V> identifierGeneratorProperties)

Sets the identifierGeneratorProperties.

Parameters
identifierGeneratorProperties:Map<K, V>

The identifierGeneratorProperties to set

setIdentifierGeneratorStrategyback to summary
public void setIdentifierGeneratorStrategy(String identifierGeneratorStrategy)

Sets the identifierGeneratorStrategy.

Parameters
identifierGeneratorStrategy:String

The identifierGeneratorStrategy to set

setJpaAttributeConverterDescriptorback to summary
public void setJpaAttributeConverterDescriptor(ConverterDescriptor descriptor)
setNullValueback to summary
public void setNullValue(String nullValue)

Sets the nullValue.

Parameters
nullValue:String

The nullValue to set

setTableback to summary
public void setTable(Table table)

Deprecated

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

setTypeNameback to summary
public void setTypeName(String typeName)
setTypeParametersback to summary
public void setTypeParameters(Properties parameterMap)
setTypeParametersback to summary
public void setTypeParameters(Map<String, String> parameters)
setTypeUsingReflectionback to summary
public void setTypeUsingReflection(String className, String propertyName) throws MappingException

Implements org.hibernate.mapping.Value.setTypeUsingReflection.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
org.hibernate.mapping back to summary

private final Class SimpleValue.ParameterTypeImpl

extends Object
implements ParameterType
Class Inheritance
All Implemented Interfaces
org.hibernate.usertype.DynamicParameterizedType.ParameterType

Field Summary

Modifier and TypeField and Description
private final Annotation[]
private final String
private final String[]
private final boolean
private final Class<T>
private final String
private final String

Constructor Summary

AccessConstructor and Description
private
ParameterTypeImpl(Class<T> returnedClass, Annotation[] annotationsMethod, String catalog, String schema, String table, boolean primaryKey, String[] columns)

Method Summary

Modifier and TypeMethod and Description
public Annotation[]
public String
public String[]
public Class<T>
public String
public String
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

annotationsMethodback to summary
private final Annotation[] annotationsMethod
catalogback to summary
private final String catalog
columnsback to summary
private final String[] columns
primaryKeyback to summary
private final boolean primaryKey
returnedClassback to summary
private final Class<T> returnedClass
schemaback to summary
private final String schema
tableback to summary
private final String table

Constructor Detail

ParameterTypeImplback to summary
private ParameterTypeImpl(Class<T> returnedClass, Annotation[] annotationsMethod, String catalog, String schema, String table, boolean primaryKey, String[] columns)

Method Detail

getAnnotationsMethodback to summary
public Annotation[] getAnnotationsMethod()

Implements org.hibernate.usertype.DynamicParameterizedType.ParameterType.getAnnotationsMethod.

Annotations
@Override
getCatalogback to summary
public String getCatalog()

Implements org.hibernate.usertype.DynamicParameterizedType.ParameterType.getCatalog.

Annotations
@Override
getColumnsback to summary
public String[] getColumns()

Implements org.hibernate.usertype.DynamicParameterizedType.ParameterType.getColumns.

Annotations
@Override
getReturnedClassback to summary
public Class<T> getReturnedClass()

Implements org.hibernate.usertype.DynamicParameterizedType.ParameterType.getReturnedClass.

Annotations
@Override
getSchemaback to summary
public String getSchema()

Implements org.hibernate.usertype.DynamicParameterizedType.ParameterType.getSchema.

Annotations
@Override
getTableback to summary
public String getTable()

Implements org.hibernate.usertype.DynamicParameterizedType.ParameterType.getTable.

Annotations
@Override
isPrimaryKeyback to summary
public boolean isPrimaryKey()

Implements org.hibernate.usertype.DynamicParameterizedType.ParameterType.isPrimaryKey.

Annotations
@Override