public class ElPropertyChain extends Object implements ElPropertyValue
Used to get the value for an compound expression like customer.name or customer.shippingAddress.city etc.
Note that if any element in the chain returns null, then null is returned and no further processing of the chain occurs.
| Type | Property and Description |
|---|---|
boolean |
isAssoc
Return true if any path of this path contains a Associated One or Many.
|
ROOT_ELPREFIX| Constructor and Description |
|---|
ElPropertyChain(boolean containsMany,
boolean embedded,
String expression,
ElPropertyValue[] chain) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsFormulaWithJoin()
Return true if the property is a formula with a join clause.
|
boolean |
containsMany()
Return true if there is a property on the path that is a many property.
|
boolean |
containsManySince(String sinceProperty)
Return true if there is a many property from sinceProperty to
the end of this chain.
|
Object |
elConvertType(Object value)
Convert the value to the expected type.
|
Object |
elGetReference(Object bean)
Return the value ensuring objects prior to the top scalar property are
automatically populated.
|
Object |
elGetValue(Object bean)
Return the value from a given entity bean.
|
void |
elSetLoaded(Object bean) |
void |
elSetReference(Object bean)
Make the owning bean of this property a reference (as in not new/dirty).
|
void |
elSetValue(Object bean,
Object value,
boolean populate,
boolean reference)
Set a value given a root level bean.
|
String |
getAssocIdInExpr(String prefix)
Return the logical id in expression taking into account embedded id's.
|
String |
getAssocIdInValueExpr(int size)
Return the logical id value expression taking into account embedded id's.
|
String |
getAssocOneIdExpr(String prefix,
String operator)
Return the Id expression string.
|
Object[] |
getAssocOneIdValues(Object bean)
Return the Id values for the given bean value.
|
BeanProperty |
getBeanProperty()
Return the underlying bean property.
|
String |
getDbColumn()
Return the deployment db column for this property.
|
int |
getDeployOrder()
Return the deploy order for the property.
|
String |
getElName()
The ElPrefix plus name.
|
String |
getElPlaceholder(boolean encrypted)
Return the place holder in the form of ${elPrefix}dbColumn.
|
String |
getElPrefix()
Return the prefix path of the property.
|
int |
getJdbcType()
Return the underlying JDBC type or 0 if this is not a scalar type.
|
String |
getName()
Return the name of the property.
|
StringFormatter |
getStringFormatter()
Return the default StringFormatter for the scalar property.
|
StringParser |
getStringParser()
Return the default StringParser for the scalar property.
|
boolean |
isAssocId()
Return true if this is an ManyToOne or OneToOne associated bean property.
|
boolean |
isAssocProperty()
Return true if any path of this path contains a Associated One or Many.
|
boolean |
isDateTimeCapable()
Return true if the last type is "DateTime capable" - can support
ElPropertyValue.parseDateTime(long). |
boolean |
isDbEncrypted()
Return true if the property is encrypted in the DB.
|
boolean |
isDeployOnly()
Full ElGetValue support.
|
boolean |
isLocalEncrypted()
Return true if the property is encrypted via Java.
|
Object |
parseDateTime(long systemTimeMillis)
For DateTime capable scalar types convert the long systemTimeMillis into
an appropriate java time (Date,Timestamp,Time,Calendar, JODA type etc).
|
isAssocProperty in interface ElPropertyValuepublic ElPropertyChain(boolean containsMany,
boolean embedded,
String expression,
ElPropertyValue[] chain)
public boolean isDeployOnly()
public boolean containsManySince(String sinceProperty)
containsManySince in interface ElPropertyDeploypublic boolean containsFormulaWithJoin()
ElPropertyDeploycontainsFormulaWithJoin in interface ElPropertyDeploypublic boolean containsMany()
ElPropertyDeploycontainsMany in interface ElPropertyDeploypublic String getElPrefix()
ElPropertyDeployThis is use to determine joins required to support this property.
getElPrefix in interface ElPropertyDeploypublic String getName()
ElPropertyDeploygetName in interface ElPropertyDeploypublic String getElName()
ElPropertyDeploygetElName in interface ElPropertyDeploypublic String getElPlaceholder(boolean encrypted)
ElPropertyDeployThe ${elPrefix} is replaced by the appropriate table alias.
getElPlaceholder in interface ElPropertyDeploypublic boolean isDbEncrypted()
ElPropertyValueisDbEncrypted in interface ElPropertyValuepublic boolean isLocalEncrypted()
ElPropertyValueisLocalEncrypted in interface ElPropertyValuepublic Object[] getAssocOneIdValues(Object bean)
ElPropertyValuegetAssocOneIdValues in interface ElPropertyValuepublic String getAssocOneIdExpr(String prefix, String operator)
ElPropertyValueTypically used to produce id = ? expression strings.
getAssocOneIdExpr in interface ElPropertyValuepublic String getAssocIdInExpr(String prefix)
ElPropertyValuegetAssocIdInExpr in interface ElPropertyValuepublic String getAssocIdInValueExpr(int size)
ElPropertyValuegetAssocIdInValueExpr in interface ElPropertyValuepublic int getDeployOrder()
ElPropertyValuegetDeployOrder in interface ElPropertyValuepublic boolean isAssocId()
ElPropertyValueisAssocId in interface ElPropertyValuepublic boolean isAssocProperty()
ElPropertyValueisAssocProperty in interface ElPropertyValuepublic String getDbColumn()
ElPropertyDeploygetDbColumn in interface ElPropertyDeploypublic BeanProperty getBeanProperty()
ElPropertyDeploygetBeanProperty in interface ElPropertyDeploypublic boolean isDateTimeCapable()
ElPropertyValueElPropertyValue.parseDateTime(long).isDateTimeCapable in interface ElPropertyValuepublic int getJdbcType()
ElPropertyValuegetJdbcType in interface ElPropertyValuepublic Object parseDateTime(long systemTimeMillis)
ElPropertyValueparseDateTime in interface ElPropertyValuepublic StringParser getStringParser()
ElPropertyValuegetStringParser in interface ElPropertyValuepublic StringFormatter getStringFormatter()
ElPropertyValuegetStringFormatter in interface ElPropertyValuepublic Object elConvertType(Object value)
ElPropertyValueTypically useful for converting strings to the appropriate number type etc.
elConvertType in interface ElPropertyValuepublic Object elGetValue(Object bean)
ElPropertyValueelGetValue in interface ElPropertyValuepublic Object elGetReference(Object bean)
ElPropertyValueelGetReference in interface ElPropertyValuepublic void elSetLoaded(Object bean)
public void elSetReference(Object bean)
ElPropertyValueelSetReference in interface ElPropertyValuepublic void elSetValue(Object bean, Object value, boolean populate, boolean reference)
ElPropertyValueIf populate then
elSetValue in interface ElPropertyValueCopyright © 2014. All Rights Reserved.