Z - the source typeX - the destination typepublic class EmbeddedMappingImpl<Z,X> extends AbstractParentMapping<Z,X> implements SingularMappingEx<Z,X>, JoinedMapping<Z,X,X>, EmbeddedMapping<Z,X>
| Constructor and Description |
|---|
EmbeddedMappingImpl(AbstractParentMapping<?,Z> parent,
EmbeddedAttribute<? super Z,X> attribute) |
| Modifier and Type | Method and Description |
|---|---|
Object |
extractKey(Object value)
Extracts key from the value.
|
boolean |
fillValue(EntityTypeImpl<?> type,
ManagedInstance<?> managedInstance,
Object instance)
Fills the sequence / table generated value.
|
void |
flush(Connection connection,
ManagedInstance<?> managedInstance,
boolean removals,
boolean force)
Flushes the associates.
|
AssociationMetadata |
getAssociationOverride(String path)
Returns the association override or
null |
EmbeddedAttribute<? super Z,X> |
getAttribute()
Returns the attribute of the mapping.
|
ColumnMetadata |
getAttributeOverride(String path)
Returns the attribute override or
null |
IdType |
getIdType() |
JoinableTable |
getJoinTable()
Returns the join table for the relation.
|
MappingType |
getMappingType()
Returns the type of the mapping.
|
RootMapping<?> |
getRoot() |
AbstractMapping<? super X,?,?>[] |
getSingularMappings()
Returns the sorted singular mappings of the embeddable
|
EmbeddableTypeImpl<X> |
getType()
Returns the entity or embeddable type of the mapping.
|
void |
initialize(ManagedInstance<?> instance)
Initializes the mapping.
|
boolean |
isAssociation()
Returns if the mapping is an association.
|
boolean |
isEager()
Returns if the association should be eagerly fetched.
|
boolean |
isId()
Returns if the mapping is part of an id attribute.
|
boolean |
isJoined()
Returns if the mapping is a joined mapping.
|
boolean |
isMap()
Returns if the mapping is a map collection.
|
String |
join(String parentAlias,
String alias,
javax.persistence.criteria.JoinType joinType)
Returns the join SQL for the mapping.
|
addAssociations, addBasicMappings, addJoinedMappings, addPluralMappings, addSingularMappings, createMappings, getChild, getChildren, getEagerMappings, getRootAttribute, getRootPath, inheritequals, get, getJavaMember, getJavaType, getLocator, getName, getParent, getPath, hashCode, isCollection, set, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetChild, getChildrenget, getJavaMember, getJavaType, getLocator, getName, getParent, getPath, isCollection, setpublic EmbeddedMappingImpl(AbstractParentMapping<?,Z> parent, EmbeddedAttribute<? super Z,X> attribute)
parent - the parent mappingattribute - the attributepublic Object extractKey(Object value)
extractKey in interface JoinedMapping<Z,X,X>value - the valuepublic boolean fillValue(EntityTypeImpl<?> type, ManagedInstance<?> managedInstance, Object instance)
The operation returns false if at least one entity needs to obtain identity from the database.
fillValue in interface SingularMappingEx<Z,X>type - the entity typemanagedInstance - the managed instanceinstance - the instance to fill ids.public void flush(Connection connection, ManagedInstance<?> managedInstance, boolean removals, boolean force) throws SQLException
flush in interface JoinedMapping<Z,X,X>connection - the connection to usemanagedInstance - the managed instanceremovals - true if the removals should be flushed and false for the additionsforce - true to force, effective only for insertions and for new entities.SQLException - thrown if there is an underlying SQL Exceptionpublic AssociationMetadata getAssociationOverride(String path)
nullpath - the current pathnullpublic EmbeddedAttribute<? super Z,X> getAttribute()
getAttribute in interface JoinedMapping<Z,X,X>getAttribute in interface SingularMappingEx<Z,X>getAttribute in class AbstractMapping<Z,X,X>public ColumnMetadata getAttributeOverride(String path)
nullpath - the current pathnullpublic IdType getIdType()
getIdType in interface SingularMapping<Z,X>public JoinableTable getJoinTable()
This is, for associations the JoinTable, for element collections the CollectionTable.
getJoinTable in interface JoinedMapping<Z,X,X>public MappingType getMappingType()
getMappingType in interface JoinedMapping<Z,X,X>public RootMapping<?> getRoot()
public AbstractMapping<? super X,?,?>[] getSingularMappings()
public EmbeddableTypeImpl<X> getType()
getType in interface JoinedMapping<Z,X,X>getType in class AbstractParentMapping<Z,X>public void initialize(ManagedInstance<?> instance)
initialize in interface JoinedMapping<Z,X,X>instance - the instancepublic boolean isAssociation()
isAssociation in interface JoinedMapping<Z,X,X>public boolean isEager()
isEager in interface JoinedMapping<Z,X,X>public boolean isId()
isId in interface SingularMapping<Z,X>isId in class AbstractParentMapping<Z,X>public boolean isJoined()
isJoined in interface JoinedMapping<Z,X,X>public boolean isMap()
isMap in interface JoinedMapping<Z,X,X>public String join(String parentAlias, String alias, javax.persistence.criteria.JoinType joinType)
join in interface JoinedMapping<Z,X,X>parentAlias - the parent table aliasalias - the primary table aliasjoinType - the join typeCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.