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 classComponent.StandardGenerationContextLocatorstatic classComponent.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:
addColumnin classSimpleValue
-
getColumnSpan
public int getColumnSpan()
- Specified by:
getColumnSpanin interfaceValue- Overrides:
getColumnSpanin classSimpleValue
-
getColumnIterator
public Iterator<Selectable> getColumnIterator()
- Specified by:
getColumnIteratorin interfaceValue- Overrides:
getColumnIteratorin 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:
getTypein interfaceValue- Overrides:
getTypein classSimpleValue- Throws:
MappingException
-
setTypeUsingReflection
public void setTypeUsingReflection(String className, String propertyName) throws MappingException
- Specified by:
setTypeUsingReflectionin interfaceValue- Overrides:
setTypeUsingReflectionin classSimpleValue- Throws:
MappingException
-
getMetaAttributes
public Map getMetaAttributes()
- Specified by:
getMetaAttributesin interfaceMetaAttributable
-
getMetaAttribute
public MetaAttribute getMetaAttribute(String attributeName)
- Specified by:
getMetaAttributein interfaceMetaAttributable
-
setMetaAttributes
public void setMetaAttributes(Map metas)
- Specified by:
setMetaAttributesin interfaceMetaAttributable
-
accept
public Object accept(ValueVisitor visitor)
- Specified by:
acceptin interfaceValue- Overrides:
acceptin classSimpleValue
-
isSame
public boolean isSame(SimpleValue other)
- Overrides:
isSamein classSimpleValue
-
isSame
public boolean isSame(Component other)
-
getColumnInsertability
public boolean[] getColumnInsertability()
- Specified by:
getColumnInsertabilityin interfaceValue- Overrides:
getColumnInsertabilityin classSimpleValue
-
getColumnUpdateability
public boolean[] getColumnUpdateability()
- Specified by:
getColumnUpdateabilityin interfaceValue- Overrides:
getColumnUpdateabilityin 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 thePropertyto 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:
toStringin classSimpleValue
-
createIdentifierGenerator
public IdentifierGenerator createIdentifierGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, String defaultCatalog, String defaultSchema, RootClass rootClass) throws MappingException
- Specified by:
createIdentifierGeneratorin interfaceKeyValue- Overrides:
createIdentifierGeneratorin classSimpleValue- Throws:
MappingException
-
-