Package org.hibernate.mapping
Class Component
- java.lang.Object
-
- org.hibernate.mapping.SimpleValue
-
- org.hibernate.mapping.Component
-
- All Implemented Interfaces:
Serializable
,KeyValue
,MetaAttributable
,Value
public class Component extends SimpleValue implements MetaAttributable
The mapping for a component, composite element, composite identifier, etc.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Component.StandardGenerationContextLocator
static class
Component.ValueGenerationPlan
-
Field Summary
-
Fields inherited from class org.hibernate.mapping.SimpleValue
DEFAULT_ID_GEN_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description Component(MetadataBuildingContext metadata, Collection collection)
Component(MetadataBuildingContext metadata, Component component)
Component(MetadataBuildingContext metadata, Join join)
Component(MetadataBuildingContext metadata, PersistentClass owner)
Component(MetadataBuildingContext metadata, Table table, PersistentClass owner)
Component(MetadataImplementor metadata, Collection collection)
Deprecated.UserComponent(MetadataBuildingContext, Collection)
instead.Component(MetadataImplementor metadata, Component component)
Deprecated.UserComponent(MetadataBuildingContext, Component)
instead.Component(MetadataImplementor metadata, Join join)
Deprecated.UserComponent(MetadataBuildingContext, Join)
instead.Component(MetadataImplementor metadata, PersistentClass owner)
Deprecated.UserComponent(MetadataBuildingContext, PersistentClass)
instead.Component(MetadataImplementor metadata, Table table, PersistentClass owner)
Deprecated.
-
Method Summary
-
Methods inherited from class org.hibernate.mapping.SimpleValue
addColumn, addFormula, copyTypeFrom, createForeignKey, createForeignKeyOfEntity, createIdentifierGenerator, getConstraintColumns, getFetchMode, getForeignKeyDefinition, getForeignKeyName, getIdentifierGenerator, getIdentifierGeneratorProperties, getIdentifierGeneratorStrategy, getMetadata, getNullValue, getServiceRegistry, getTable, getTypeName, getTypeParameters, hasFormula, isAlternateUniqueKey, isCascadeDeleteEnabled, isIdentityColumn, isLob, isNationalized, isNullable, isSame, isSame, isSimpleValue, isTypeSpecified, isUpdateable, isValid, isVersion, makeLob, makeNationalized, makeVersion, setAlternateUniqueKey, setCascadeDeleteEnabled, setForeignKeyDefinition, setForeignKeyName, setIdentifierGeneratorProperties, setIdentifierGeneratorProperties, setIdentifierGeneratorStrategy, setJpaAttributeConverterDescriptor, setNullValue, setTable, setTypeName, setTypeParameters, setTypeParameters
-
-
-
-
Constructor Detail
-
Component
@Deprecated public Component(MetadataImplementor metadata, PersistentClass owner) throws MappingException
Deprecated.UserComponent(MetadataBuildingContext, PersistentClass)
instead.- Throws:
MappingException
-
Component
@Deprecated public Component(MetadataImplementor metadata, Component component) throws MappingException
Deprecated.UserComponent(MetadataBuildingContext, Component)
instead.- Throws:
MappingException
-
Component
@Deprecated public Component(MetadataImplementor metadata, Join join) throws MappingException
Deprecated.UserComponent(MetadataBuildingContext, Join)
instead.- Throws:
MappingException
-
Component
@Deprecated public Component(MetadataImplementor metadata, Collection collection) throws MappingException
Deprecated.UserComponent(MetadataBuildingContext, Collection)
instead.- Throws:
MappingException
-
Component
@Deprecated public Component(MetadataImplementor metadata, Table table, PersistentClass owner) throws MappingException
Deprecated.- Throws:
MappingException
-
Component
public Component(MetadataBuildingContext metadata, PersistentClass owner) throws MappingException
- Throws:
MappingException
-
Component
public Component(MetadataBuildingContext metadata, Component component) throws MappingException
- Throws:
MappingException
-
Component
public Component(MetadataBuildingContext metadata, Join join) throws MappingException
- Throws:
MappingException
-
Component
public Component(MetadataBuildingContext metadata, Collection collection) throws MappingException
- Throws:
MappingException
-
Component
public Component(MetadataBuildingContext metadata, Table table, PersistentClass owner) throws MappingException
- Throws:
MappingException
-
-
Method Detail
-
getPropertySpan
public int getPropertySpan()
-
getPropertyIterator
public Iterator getPropertyIterator()
-
addProperty
public void addProperty(Property p)
-
addColumn
public void addColumn(Column column)
- Overrides:
addColumn
in classSimpleValue
-
getColumnSpan
public int getColumnSpan()
- Specified by:
getColumnSpan
in interfaceValue
- Overrides:
getColumnSpan
in classSimpleValue
-
getColumnIterator
public Iterator<Selectable> getColumnIterator()
- Specified by:
getColumnIterator
in interfaceValue
- Overrides:
getColumnIterator
in classSimpleValue
-
isEmbedded
public boolean isEmbedded()
-
getComponentClassName
public String getComponentClassName()
-
getComponentClass
public Class getComponentClass() throws MappingException
- Throws:
MappingException
-
getOwner
public PersistentClass getOwner()
-
getParentProperty
public String getParentProperty()
-
setComponentClassName
public void setComponentClassName(String componentClass)
-
setEmbedded
public void setEmbedded(boolean embedded)
-
setOwner
public void setOwner(PersistentClass owner)
-
setParentProperty
public void setParentProperty(String parentProperty)
-
isDynamic
public boolean isDynamic()
-
setDynamic
public void setDynamic(boolean dynamic)
-
getType
public Type getType() throws MappingException
- Specified by:
getType
in interfaceValue
- Overrides:
getType
in classSimpleValue
- Throws:
MappingException
-
setTypeUsingReflection
public void setTypeUsingReflection(String className, String propertyName) throws MappingException
- Specified by:
setTypeUsingReflection
in interfaceValue
- Overrides:
setTypeUsingReflection
in classSimpleValue
- Throws:
MappingException
-
getMetaAttributes
public Map getMetaAttributes()
- Specified by:
getMetaAttributes
in interfaceMetaAttributable
-
getMetaAttribute
public MetaAttribute getMetaAttribute(String attributeName)
- Specified by:
getMetaAttribute
in interfaceMetaAttributable
-
setMetaAttributes
public void setMetaAttributes(Map metas)
- Specified by:
setMetaAttributes
in interfaceMetaAttributable
-
accept
public Object accept(ValueVisitor visitor)
- Specified by:
accept
in interfaceValue
- Overrides:
accept
in classSimpleValue
-
isSame
public boolean isSame(SimpleValue other)
- Overrides:
isSame
in classSimpleValue
-
isSame
public boolean isSame(Component other)
-
getColumnInsertability
public boolean[] getColumnInsertability()
- Specified by:
getColumnInsertability
in interfaceValue
- Overrides:
getColumnInsertability
in classSimpleValue
-
getColumnUpdateability
public boolean[] getColumnUpdateability()
- Specified by:
getColumnUpdateability
in interfaceValue
- Overrides:
getColumnUpdateability
in classSimpleValue
-
isKey
public boolean isKey()
-
setKey
public void setKey(boolean isKey)
-
hasPojoRepresentation
public boolean hasPojoRepresentation()
-
addTuplizer
public void addTuplizer(EntityMode entityMode, String implClassName)
-
getTuplizerImplClassName
public String getTuplizerImplClassName(EntityMode mode)
-
getTuplizerMap
public Map getTuplizerMap()
-
getProperty
public Property getProperty(int index)
- Parameters:
index
- index of theProperty
to return- Returns:
Property
- Throws:
IndexOutOfBoundsException
- - if the index is out of range(index < 0 || index >=getPropertySpan()
)
-
getProperty
public Property getProperty(String propertyName) throws MappingException
- Throws:
MappingException
-
getRoleName
public String getRoleName()
-
setRoleName
public void setRoleName(String roleName)
-
toString
public String toString()
- Overrides:
toString
in classSimpleValue
-
createIdentifierGenerator
public IdentifierGenerator createIdentifierGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, String defaultCatalog, String defaultSchema, RootClass rootClass) throws MappingException
- Specified by:
createIdentifierGenerator
in interfaceKeyValue
- Overrides:
createIdentifierGenerator
in classSimpleValue
- Throws:
MappingException
-
-