Top Description Inners Fields Constructors Methods
org.hibernate.mapping

public Class Component

extends SimpleValue
implements MetaAttributable
Class Inheritance
All Implemented Interfaces
org.hibernate.mapping.MetaAttributable
Imports
java.io.Serializable, java.util.ArrayList, .HashMap, .Iterator, .Objects, .Map, org.hibernate.EntityMode, .MappingException, org.hibernate.boot.model.relational.Database, .SqlStringGenerationContext, org.hibernate.boot.registry.classloading.spi.ClassLoaderService, .ClassLoadingException, org.hibernate.boot.spi.MetadataBuildingContext, .MetadataImplementor, org.hibernate.dialect.Dialect, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.id.CompositeNestedGeneratedValueGenerator, .IdentifierGenerator, org.hibernate.id.factory.IdentifierGeneratorFactory, org.hibernate.internal.util.collections.JoinedIterator, org.hibernate.property.access.spi.Setter, org.hibernate.tuple.component.ComponentMetamodel, org.hibernate.type.Type, .TypeFactory

The mapping for a component, composite element, composite identifier, etc.
Authors
Gavin King, Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class

Field Summary

Modifier and TypeField and Description
private IdentifierGenerator
builtIdentifierGenerator

Deprecated as a consequence of IdentifierGenerator being deprecated.
private String
private boolean
private boolean
private boolean
private Map<K, V>
private PersistentClass
private String
private ArrayList<Property>
private String
private Map<EntityMode, String>
private volatile Type
Inherited from org.hibernate.mapping.SimpleValue:
DEFAULT_ID_GEN_STRATEGY

Constructor Summary

AccessConstructor and Description
public
public
public
public
public
public
public
public
public
public
Component(MetadataBuildingContext metadata, Table table, PersistentClass owner)

Deprecated as a consequence of Table being deprecated.

Method Summary

Modifier and TypeMethod and Description
public Object
public void
public void
public void
addTuplizer(EntityMode entityMode, String implClassName)

private IdentifierGenerator
buildIdentifierGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, String defaultCatalog, String defaultSchema, RootClass rootClass)

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

Overrides org.hibernate.mapping.SimpleValue.createIdentifierGenerator.

Implements org.hibernate.mapping.KeyValue.createIdentifierGenerator.

Deprecated as a consequence of IdentifierGenerator being deprecated.
public boolean[]
public Iterator<Selectable>
public int
public boolean[]
public Class<T>
public String
public MetaAttribute
public Map<K, V>
public PersistentClass
public String
public Property

Returns:

Property
getProperty
(int
index of the Property to return
index
)

Returns the Property at the specified position in this Component.

public Property
getProperty(String propertyName)

public Iterator<E>
public int
public String
public String
public Map<K, V>
public Type
public boolean
private Setter
injector(Property property, Class<T> attributeDeclarer)

public boolean
public boolean
public boolean
public boolean
public boolean
private Class<T>
public void
setComponentClassName(String componentClass)

public void
setDynamic(boolean dynamic)

public void
setEmbedded(boolean embedded)

public void
setKey(boolean isKey)

public void
public void
public void
setParentProperty(String parentProperty)

public void
setRoleName(String roleName)

public void
public String
toString()

Overrides org.hibernate.mapping.SimpleValue.toString.

Returns a string representation of the object.
Inherited from org.hibernate.mapping.SimpleValue:
addColumnaddFormulacopyTypeFromcreateForeignKeycreateForeignKeyOfEntitycreateIdentifierGeneratorgetConstraintColumnsgetFetchModegetForeignKeyDefinitiongetForeignKeyNamegetIdentifierGeneratorgetIdentifierGeneratorPropertiesgetIdentifierGeneratorStrategygetMetadatagetNullValuegetServiceRegistrygetTablegetTypeNamegetTypeParametershasFormulaisAlternateUniqueKeyisCascadeDeleteEnabledisIdentityColumnisLobisNationalizedisNullableisSameisSameisSimpleValueisTypeSpecifiedisUpdateableisValidisVersionmakeLobmakeNationalizedmakeVersionsetAlternateUniqueKeysetCascadeDeleteEnabledsetForeignKeyDefinitionsetForeignKeyNamesetIdentifierGeneratorPropertiessetIdentifierGeneratorPropertiessetIdentifierGeneratorStrategysetJpaAttributeConverterDescriptorsetNullValuesetTablesetTypeNamesetTypeParameterssetTypeParameters

Field Detail

builtIdentifierGeneratorback to summary
private IdentifierGenerator builtIdentifierGenerator

Deprecated

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

componentClassNameback to summary
private String componentClassName
dynamicback to summary
private boolean dynamic
embeddedback to summary
private boolean embedded
isKeyback to summary
private boolean isKey
metaAttributesback to summary
private Map<K, V> metaAttributes
ownerback to summary
private PersistentClass owner
parentPropertyback to summary
private String parentProperty
propertiesback to summary
private ArrayList<Property> properties
roleNameback to summary
private String roleName
tuplizerImplsback to summary
private Map<EntityMode, String> tuplizerImpls
typeback to summary
private volatile Type type

Hides org.hibernate.mapping.SimpleValue.type.

Constructor Detail

Componentback to summary
public Component(MetadataImplementor metadata, PersistentClass owner) throws MappingException
Annotations
@Deprecated
Componentback to summary
public Component(MetadataImplementor metadata, Component component) throws MappingException
Annotations
@Deprecated
Componentback to summary
public Component(MetadataImplementor metadata, Join join) throws MappingException
Annotations
@Deprecated
Componentback to summary
public Component(MetadataImplementor metadata, Collection collection) throws MappingException
Annotations
@Deprecated
Componentback to summary
public Component(MetadataImplementor metadata, Table table, PersistentClass owner) throws MappingException
Annotations
@Deprecated
Componentback to summary
public Component(MetadataBuildingContext metadata, PersistentClass owner) throws MappingException
Componentback to summary
public Component(MetadataBuildingContext metadata, Component component) throws MappingException
Componentback to summary
public Component(MetadataBuildingContext metadata, Join join) throws MappingException
Componentback to summary
public Component(MetadataBuildingContext metadata, Collection collection) throws MappingException
Componentback to summary
public Component(MetadataBuildingContext metadata, Table table, PersistentClass owner) throws MappingException

Deprecated

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

Method Detail

acceptback to summary
public Object accept(ValueVisitor visitor)

Overrides org.hibernate.mapping.SimpleValue.accept.

Implements org.hibernate.mapping.Value.accept.

Annotations
@Override
addColumnback to summary
public void addColumn(Column column)

Overrides org.hibernate.mapping.SimpleValue.addColumn.

Annotations
@Override
addPropertyback to summary
public void addProperty(Property p)
addTuplizerback to summary
public void addTuplizer(EntityMode entityMode, String implClassName)
buildIdentifierGeneratorback to summary
private IdentifierGenerator buildIdentifierGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, String defaultCatalog, String defaultSchema, RootClass rootClass) throws MappingException

Deprecated

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

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

Overrides org.hibernate.mapping.SimpleValue.createIdentifierGenerator.

Implements org.hibernate.mapping.KeyValue.createIdentifierGenerator.

Deprecated

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

Annotations
@Override
getColumnInsertabilityback to summary
public boolean[] getColumnInsertability()

Overrides org.hibernate.mapping.SimpleValue.getColumnInsertability.

Implements org.hibernate.mapping.Value.getColumnInsertability.

Annotations
@Override
getColumnIteratorback to summary
public Iterator<Selectable> getColumnIterator()

Overrides org.hibernate.mapping.SimpleValue.getColumnIterator.

Implements org.hibernate.mapping.Value.getColumnIterator.

Annotations
@Override
@SuppressWarnings:unchecked
getColumnSpanback to summary
public int getColumnSpan()

Overrides org.hibernate.mapping.SimpleValue.getColumnSpan.

Implements org.hibernate.mapping.Value.getColumnSpan.

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

Overrides org.hibernate.mapping.SimpleValue.getColumnUpdateability.

Implements org.hibernate.mapping.Value.getColumnUpdateability.

Annotations
@Override
getComponentClassback to summary
public Class<T> getComponentClass() throws MappingException
getComponentClassNameback to summary
public String getComponentClassName()
getMetaAttributeback to summary
public MetaAttribute getMetaAttribute(String attributeName)

Implements org.hibernate.mapping.MetaAttributable.getMetaAttribute.

Annotations
@Override
getMetaAttributesback to summary
public Map<K, V> getMetaAttributes()

Implements org.hibernate.mapping.MetaAttributable.getMetaAttributes.

Annotations
@Override
getOwnerback to summary
public PersistentClass getOwner()
getParentPropertyback to summary
public String getParentProperty()
getPropertyback to summary
public Property getProperty(int index)

Returns the Property at the specified position in this Component.

Parameters
index:int

index of the Property to return

Returns:Property

Property

Exceptions
IndexOutOfBoundsException:
- if the index is out of range(index < 0 || index >= getPropertySpan())
getPropertyback to summary
public Property getProperty(String propertyName) throws MappingException
getPropertyIteratorback to summary
public Iterator<E> getPropertyIterator()
getPropertySpanback to summary
public int getPropertySpan()
getRoleNameback to summary
public String getRoleName()
getTuplizerImplClassNameback to summary
public String getTuplizerImplClassName(EntityMode mode)
getTuplizerMapback to summary
public Map<K, V> getTuplizerMap()
Annotations
@SuppressWarnings:UnusedDeclaration
getTypeback to summary
public Type getType() throws MappingException

Overrides org.hibernate.mapping.SimpleValue.getType.

Implements org.hibernate.mapping.Value.getType.

Annotations
@Override
hasPojoRepresentationback to summary
public boolean hasPojoRepresentation()
injectorback to summary
private Setter injector(Property property, Class<T> attributeDeclarer)
isDynamicback to summary
public boolean isDynamic()
isEmbeddedback to summary
public boolean isEmbedded()
isKeyback to summary
public boolean isKey()
isSameback to summary
public boolean isSame(SimpleValue other)

Overrides org.hibernate.mapping.SimpleValue.isSame.

Annotations
@Override
isSameback to summary
public boolean isSame(Component other)
resolveComponentClassback to summary
private Class<T> resolveComponentClass()
setComponentClassNameback to summary
public void setComponentClassName(String componentClass)
setDynamicback to summary
public void setDynamic(boolean dynamic)
setEmbeddedback to summary
public void setEmbedded(boolean embedded)
setKeyback to summary
public void setKey(boolean isKey)
setMetaAttributesback to summary
public void setMetaAttributes(Map<K, V> metas)

Implements org.hibernate.mapping.MetaAttributable.setMetaAttributes.

Annotations
@Override
setOwnerback to summary
public void setOwner(PersistentClass owner)
setParentPropertyback to summary
public void setParentProperty(String parentProperty)
setRoleNameback to summary
public void setRoleName(String roleName)
setTypeUsingReflectionback to summary
public void setTypeUsingReflection(String className, String propertyName) throws MappingException

Overrides org.hibernate.mapping.SimpleValue.setTypeUsingReflection.

Implements org.hibernate.mapping.Value.setTypeUsingReflection.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.hibernate.mapping.SimpleValue.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

public Class Component.StandardGenerationContextLocator

extends Object
implements GenerationContextLocator
Class Inheritance
  • java.lang.Object
  • org.hibernate.mapping.Component.StandardGenerationContextLocator
All Implemented Interfaces
org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationContextLocator

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Serializable
locateGenerationContext(SharedSessionContractImplementor
The current session
session
,
Object
The entity for which we are generating id
incomingObject
)

Implements org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationContextLocator.locateGenerationContext.

Given the incoming object, determine the context for injecting back its generated id sub-values.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

entityNameback to summary
private final String entityName

Constructor Detail

StandardGenerationContextLocatorback to summary
public StandardGenerationContextLocator(String entityName)

Method Detail

locateGenerationContextback to summary
public Serializable locateGenerationContext(SharedSessionContractImplementor session, Object incomingObject)

Implements org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationContextLocator.locateGenerationContext.

Doc from org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationContextLocator.locateGenerationContext.

Given the incoming object, determine the context for injecting back its generated id sub-values.

Parameters
session:SharedSessionContractImplementor

The current session

incomingObject:Object

The entity for which we are generating id

Returns:Serializable

The injection context

Annotations
@Override
org.hibernate.mapping back to summary

public Class Component.ValueGenerationPlan

extends Object
implements GenerationPlan
Class Inheritance
All Implemented Interfaces
org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationPlan, org.hibernate.boot.model.relational.ExportableProducer

Field Summary

Modifier and TypeField and Description
private final Setter
private final IdentifierGenerator
subGenerator

Deprecated as a consequence of IdentifierGenerator being deprecated.

Constructor Summary

AccessConstructor and Description
public
ValueGenerationPlan(IdentifierGenerator subGenerator, Setter injector)

Deprecated as a consequence of IdentifierGenerator being deprecated.

Method Summary

Modifier and TypeMethod and Description
public void
execute(SharedSessionContractImplementor
The current session
session
,
Object
The entity for which we are generating id
incomingObject
,
Object
The context into which the generated value can be injected
injectionContext
)

Implements org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationPlan.execute.

Execute the value generation.
public void
initialize(SqlStringGenerationContext
A context to help generate SQL strings
context
)

Overrides default org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationPlan.initialize.

Initializes this instance, in particular pre-generates SQL as necessary.
public void
registerExportables(Database
The database instance
database
)

Implements org.hibernate.boot.model.relational.ExportableProducer.registerExportables.

Register the contained exportable things to the Database
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

injectorback to summary
private final Setter injector
subGeneratorback to summary
private final IdentifierGenerator subGenerator

Deprecated

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

Constructor Detail

ValueGenerationPlanback to summary
public ValueGenerationPlan(IdentifierGenerator subGenerator, Setter injector)

Deprecated

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

Method Detail

executeback to summary
public void execute(SharedSessionContractImplementor session, Object incomingObject, Object injectionContext)

Implements org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationPlan.execute.

Doc from org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationPlan.execute.

Execute the value generation.

Parameters
session:SharedSessionContractImplementor

The current session

incomingObject:Object

The entity for which we are generating id

injectionContext:Object

The context into which the generated value can be injected

Annotations
@Override
initializeback to summary
public void initialize(SqlStringGenerationContext context)

Overrides default org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationPlan.initialize.

Doc from org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationPlan.initialize.

Initializes this instance, in particular pre-generates SQL as necessary.

This method is called after registerExportables(Database), before first use.

Parameters
context:SqlStringGenerationContext

A context to help generate SQL strings

Annotations
@Override
registerExportablesback to summary
public void registerExportables(Database database)

Implements org.hibernate.boot.model.relational.ExportableProducer.registerExportables.

Doc from org.hibernate.boot.model.relational.ExportableProducer.registerExportables.

Register the contained exportable things to the Database

Parameters
database:Database

The database instance

Annotations
@Override