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, .Map, org.hibernate.EntityMode, .MappingException, org.hibernate.cfg.Mappings, org.hibernate.dialect.Dialect, org.hibernate.engine.SessionImplementor, org.hibernate.id.CompositeNestedGeneratedValueGenerator, .IdentifierGenerator, .PersistentIdentifierGenerator, org.hibernate.id.factory.IdentifierGeneratorFactory, org.hibernate.property.Setter, org.hibernate.tuple.component.ComponentMetamodel, org.hibernate.type.ComponentType, .EmbeddedComponentType, .Type, org.hibernate.util.JoinedIterator, .ReflectHelper

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
private String
private boolean
private boolean
private boolean
private Map<K, V>
private String
private PersistentClass
private String
private ArrayList<E>
private String
private Map<K, V>
private Type
Inherited from org.hibernate.mapping.SimpleValue:
DEFAULT_ID_GEN_STRATEGY

Constructor Summary

AccessConstructor and Description
public
public
Component(Mappings mappings, Component component)

public
Component(Mappings mappings, Join join)

public
Component(Mappings mappings, Collection collection)

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)

private Type
public IdentifierGenerator
public boolean[]
public Iterator<E>
public int
public boolean[]
public Class<T>
public String
public MetaAttribute
public Map<K, V>
public String
public PersistentClass
public String
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
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
setNodeName(String nodeName)

public void
public void
setParentProperty(String parentProperty)

public void
setRoleName(String roleName)

public void
setTypeByReflection(String propertyClass, String propertyName)

public void
public String
toString()

Overrides org.hibernate.mapping.SimpleValue.toString.

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

Field Detail

builtIdentifierGeneratorback to summary
private IdentifierGenerator builtIdentifierGenerator
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
nodeNameback to summary
private String nodeName
ownerback to summary
private PersistentClass owner
parentPropertyback to summary
private String parentProperty
propertiesback to summary
private ArrayList<E> properties
roleNameback to summary
private String roleName
tuplizerImplsback to summary
private Map<K, V> tuplizerImpls
typeback to summary
private Type type

Constructor Detail

Componentback to summary
public Component(Mappings mappings, PersistentClass owner) throws MappingException
Componentback to summary
public Component(Mappings mappings, Component component) throws MappingException
Componentback to summary
public Component(Mappings mappings, Join join) throws MappingException
Componentback to summary
public Component(Mappings mappings, Collection collection) throws MappingException

Method Detail

acceptback to summary
public Object accept(ValueVisitor visitor)

Overrides org.hibernate.mapping.SimpleValue.accept.

Implements org.hibernate.mapping.Value.accept.

addColumnback to summary
public void addColumn(Column column)

Overrides org.hibernate.mapping.SimpleValue.addColumn.

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
buildTypeback to summary
private Type buildType()
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.

getColumnInsertabilityback to summary
public boolean[] getColumnInsertability()

Overrides org.hibernate.mapping.SimpleValue.getColumnInsertability.

Implements org.hibernate.mapping.Value.getColumnInsertability.

getColumnIteratorback to summary
public Iterator<E> getColumnIterator()

Overrides org.hibernate.mapping.SimpleValue.getColumnIterator.

Implements org.hibernate.mapping.Value.getColumnIterator.

getColumnSpanback to summary
public int getColumnSpan()

Overrides org.hibernate.mapping.SimpleValue.getColumnSpan.

Implements org.hibernate.mapping.Value.getColumnSpan.

getColumnUpdateabilityback to summary
public boolean[] getColumnUpdateability()

Overrides org.hibernate.mapping.SimpleValue.getColumnUpdateability.

Implements org.hibernate.mapping.Value.getColumnUpdateability.

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.

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

Implements org.hibernate.mapping.MetaAttributable.getMetaAttributes.

getNodeNameback to summary
public String getNodeName()
getOwnerback to summary
public PersistentClass getOwner()
getParentPropertyback to summary
public String getParentProperty()
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()
getTypeback to summary
public Type getType() throws MappingException

Overrides org.hibernate.mapping.SimpleValue.getType.

Implements org.hibernate.mapping.Value.getType.

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()
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.

setNodeNameback to summary
public void setNodeName(String nodeName)
setOwnerback to summary
public void setOwner(PersistentClass owner)
setParentPropertyback to summary
public void setParentProperty(String parentProperty)
setRoleNameback to summary
public void setRoleName(String roleName)
setTypeByReflectionback to summary
public void setTypeByReflection(String propertyClass, String propertyName)
setTypeUsingReflectionback to summary
public void setTypeUsingReflection(String className, String propertyName) throws MappingException

Overrides org.hibernate.mapping.SimpleValue.setTypeUsingReflection.

Implements org.hibernate.mapping.Value.setTypeUsingReflection.

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.

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(SessionImplementor
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(SessionImplementor 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:SessionImplementor

The current session

incomingObject:Object

The entity for which we are generating id

Returns:Serializable

The injection context

org.hibernate.mapping back to summary

public Class Component.ValueGenerationPlan

extends Object
implements GenerationPlan
Class Inheritance
All Implemented Interfaces
org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationPlan

Field Summary

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

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
public void
execute(SessionImplementor
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
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

injectorback to summary
private final Setter injector
propertyNameback to summary
private final String propertyName
subGeneratorback to summary
private final IdentifierGenerator subGenerator

Constructor Detail

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

Method Detail

executeback to summary
public void execute(SessionImplementor 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:SessionImplementor

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

registerPersistentGeneratorsback to summary
public void registerPersistentGenerators(Map<K, V> generatorMap)

Implements org.hibernate.id.CompositeNestedGeneratedValueGenerator.GenerationPlan.registerPersistentGenerators.

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

Register any sub generators which implement PersistentIdentifierGenerator by their generatorKey.

Parameters
generatorMap:Map<K, V>

The map of generators.