PropertyHolder for composites (Embeddable/Embedded).
To facilitate code comments, I'll often refer to this example:
@Embeddable
@Convert( attributeName="city", ... )
class Address {
...
@Convert(...)
public String city;
}
@Entity
@Convert( attributeName="homeAddress.city", ... )
class Person {
...
@Embedded
@Convert( attributeName="city", ... )
public Address homeAddress;
}
As you can see, lots of ways to specify the conversion for embeddable attributes :(
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final Component | |
| private final String | |
| private final boolean | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | ComponentPropertyHolder(Component component, String path, PropertyData inferredData, PropertyHolder parent, MetadataBuildingContext context)
|
| Modifier and Type | Method and Description |
|---|---|
| public Join | addJoin(JoinTable joinTable, boolean noDelayInPkColumnCreation)
Implements org. |
| public Join | addJoin(JoinTable joinTable, Table table, boolean noDelayInPkColumnCreation)
Implements org. |
| public void | addProperty(Property property, AnnotatedColumns columns, XClass declaringClass)
Implements org. |
| public void | addProperty(Property prop, XClass declaringClass)
Implements org. |
| private String | |
| public String | |
| public String | |
| public String | |
| public KeyValue | |
| public Column[] | getOverriddenColumn(String propertyName)
Overrides org. Implements org. These rules are here to support both JPA 2 and legacy overriding rules. |
| public JoinColumn[] | getOverriddenJoinColumn(String propertyName)
Overrides org. Implements org. |
| public PersistentClass | |
| public Table | |
| public boolean | |
| public boolean | |
| public boolean | isOrWithinEmbeddedId()
Implements org. |
| public boolean | isWithinElementCollection()
Implements org. |
| protected AttributeConversionInfo | locateAttributeConversionInfo(XProperty property)
Implements abstract org. |
| protected AttributeConversionInfo | |
| protected String | normalizeCompositePath(String attributeName)
Implements abstract org. |
| protected String | normalizeCompositePathForLogging(String attributeName)
Implements abstract org. |
| private Map | processAttributeConversions(XProperty
The property that is the composite being described by this ComponentPropertyHolder embeddedXProperty)This is called from our constructor and handles (in order):
|
| private void | |
| private Map | |
| public void | setParentProperty(String parentProperty)
Overrides org. Implements org. |
| public void | startingProperty(XProperty
The property property)Implements org. |
| public String |
| attributeConversionInfoMap | back to summary |
|---|---|
| private final Map<String, AttributeConversionInfo> attributeConversionInfoMap | |
| component | back to summary |
|---|---|
| private final Component component | |
| embeddedAttributeName | back to summary |
|---|---|
| private final String embeddedAttributeName | |
| isOrWithinEmbeddedId | back to summary |
|---|---|
| private final boolean isOrWithinEmbeddedId | |
| isWithinElementCollection | back to summary |
|---|---|
| private final boolean isWithinElementCollection | |
| ComponentPropertyHolder | back to summary |
|---|---|
| public ComponentPropertyHolder(Component component, String path, PropertyData inferredData, PropertyHolder parent, MetadataBuildingContext context) | |
| addJoin | back to summary |
|---|---|
| public Join addJoin(JoinTable joinTable, boolean noDelayInPkColumnCreation) Implements org.
| |
| addJoin | back to summary |
|---|---|
| public Join addJoin(JoinTable joinTable, Table table, boolean noDelayInPkColumnCreation) Implements org.
| |
| addProperty | back to summary |
|---|---|
| public void addProperty(Property property, AnnotatedColumns columns, XClass declaringClass) Implements org.
| |
| addProperty | back to summary |
|---|---|
| public void addProperty(Property prop, XClass declaringClass) Implements org.
| |
| extractUserPropertyName | back to summary |
|---|---|
| private String extractUserPropertyName(String redundantString, String propertyName) | |
| getClassName | back to summary |
|---|---|
| public String getClassName() Implements org.
| |
| getEntityName | back to summary |
|---|---|
| public String getEntityName() Implements org.
| |
| getEntityOwnerClassName | back to summary |
|---|---|
| public String getEntityOwnerClassName() Implements org.
| |
| getIdentifier | back to summary |
|---|---|
| public KeyValue getIdentifier() Implements org.
| |
| getOverriddenColumn | back to summary |
|---|---|
| public Column[] getOverriddenColumn(String propertyName) Overrides org. Implements org. Doc from org. Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing These rules are here to support both JPA 2 and legacy overriding rules.
| |
| getOverriddenJoinColumn | back to summary |
|---|---|
| public JoinColumn[] getOverriddenJoinColumn(String propertyName) Overrides org. Implements org. Doc from org. Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing These rules are here to support both JPA 2 and legacy overriding rules.
| |
| getPersistentClass | back to summary |
|---|---|
| public PersistentClass getPersistentClass() Implements org.
| |
| getTable | back to summary |
|---|---|
| public Table getTable() Implements org.
| |
| isComponent | back to summary |
|---|---|
| public boolean isComponent() Implements org.
| |
| isEntity | back to summary |
|---|---|
| public boolean isEntity() Implements org.
| |
| isOrWithinEmbeddedId | back to summary |
|---|---|
| public boolean isOrWithinEmbeddedId() Implements org. Doc from org. Return true if this component is or is embedded in a @EmbeddedId
| |
| isWithinElementCollection | back to summary |
|---|---|
| public boolean isWithinElementCollection() Implements org. Doc from org. Return true if this component is within an @ElementCollection.
| |
| locateAttributeConversionInfo | back to summary |
|---|---|
| protected AttributeConversionInfo locateAttributeConversionInfo(XProperty property) Implements abstract org.
| |
| locateAttributeConversionInfo | back to summary |
|---|---|
| protected AttributeConversionInfo locateAttributeConversionInfo(String path) Implements abstract org.
| |
| normalizeCompositePath | back to summary |
|---|---|
| protected String normalizeCompositePath(String attributeName) Implements abstract org.
| |
| normalizeCompositePathForLogging | back to summary |
|---|---|
| protected String normalizeCompositePathForLogging(String attributeName) Implements abstract org.
| |
| processAttributeConversions | back to summary |
|---|---|
| private Map This is called from our constructor and handles (in order):
The order is important to ensure proper precedence.
@Convert/@Converts annotations at the Embeddable attribute level are handled in the calls to
| |
| processAttributeConversions | back to summary |
|---|---|
| private void processAttributeConversions(XClass embeddableXClass, Map<String, AttributeConversionInfo> infoMap) | |
| processAttributeConversions | back to summary |
|---|---|
| private Map | |
| setParentProperty | back to summary |
|---|---|
| public void setParentProperty(String parentProperty) Overrides org. Implements org.
| |
| startingProperty | back to summary |
|---|---|
| public void startingProperty(XProperty property) Implements org. Doc from org. Called during binding to allow the PropertyHolder to inspect its discovered properties. Mainly this is used in collecting attribute conversion declarations (via @Convert/@Converts). | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |