public class CompositePropertyMapping extends Object implements PropertyMapping
ComponentJoin.ComponentPropertyMapping
.
like above, consider moving to a singly-defined CompositePropertyMapping in the attribute/association walking SPIConstructor and Description |
---|
CompositePropertyMapping(CompositeType compositeType,
PropertyMapping parentPropertyMapping,
String parentPropertyName)
Builds a CompositePropertyMapping
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkIncomingPropertyName(String propertyName)
Used to check the validity of the propertyName argument passed into
toType(String) ,
toColumns(String, String) and toColumns(String) . |
CompositeType |
getType()
Get the type of the thing containing the properties
|
protected String |
resolveParentPropertyPath(String propertyName)
Builds the relative path.
|
String[] |
toColumns(String propertyName)
Given a property path, return the corresponding column name(s).
|
String[] |
toColumns(String alias,
String propertyName)
Obtain aliased column/formula fragments for the specified property path.
|
protected String |
toParentPropertyPath(String propertyName)
Used to build a property path relative to
parentPropertyMapping . |
Type |
toType(String propertyName)
Given a component path expression, get the type of the property
|
public CompositePropertyMapping(CompositeType compositeType, PropertyMapping parentPropertyMapping, String parentPropertyName)
compositeType
- The composite being described by this PropertyMappingparentPropertyMapping
- The PropertyMapping of our parent (composites have to have a parent/owner)parentPropertyName
- The name of this composite within the parentPropertyMappingpublic Type toType(String propertyName) throws QueryException
PropertyMapping
toType
in interface PropertyMapping
QueryException
protected String toParentPropertyPath(String propertyName)
parentPropertyMapping
. First, the incoming
propertyName argument is validated (using checkIncomingPropertyName(java.lang.String)
). Then the
relative path is built (using resolveParentPropertyPath(java.lang.String)
).propertyName
- The incoming propertyName.protected void checkIncomingPropertyName(String propertyName)
toType(String)
,
toColumns(String, String)
and toColumns(String)
.propertyName
- The incoming propertyName argument to validateprotected String resolveParentPropertyPath(String propertyName)
toType(String)
,
toColumns(String, String)
and toColumns(String)
calls out to parentPropertyMapping
.
Called from toParentPropertyPath(java.lang.String)
.
Override this to adjust how the relative property path is built for this mapping.propertyName
- The incoming property name to "path append".public String[] toColumns(String alias, String propertyName) throws QueryException
PropertyMapping
toColumns
in interface PropertyMapping
QueryException
public String[] toColumns(String propertyName) throws QueryException, UnsupportedOperationException
PropertyMapping
toColumns
in interface PropertyMapping
QueryException
UnsupportedOperationException
public CompositeType getType()
PropertyMapping
getType
in interface PropertyMapping
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.