Class ElPropertyChain

java.lang.Object
io.ebeaninternal.server.el.ElPropertyChain
All Implemented Interfaces:
io.ebean.plugin.ExpressionPath, SpiQueryManyJoin, ElPropertyDeploy, ElPropertyValue

public final class ElPropertyChain extends Object implements ElPropertyValue
A ElGetValue based on a chain of properties.

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.

  • Constructor Details

    • ElPropertyChain

      public ElPropertyChain(boolean containsMany, boolean embedded, String expression, ElPropertyValue[] chain)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fetchPreference

      public int fetchPreference()
      Description copied from interface: ElPropertyDeploy
      Return the fetch preference. This can be used to control which ToMany relationship is left as a 'join' and which get converted to query join.
      Specified by:
      fetchPreference in interface ElPropertyDeploy
    • isAggregation

      public boolean isAggregation()
      Description copied from interface: ElPropertyDeploy
      Return true if this is an aggregation property.
      Specified by:
      isAggregation in interface ElPropertyDeploy
    • containsManySince

      public boolean containsManySince(String sinceProperty)
      Return true if there is a many property from sinceProperty to the end of this chain.
      Specified by:
      containsManySince in interface ElPropertyDeploy
    • containsFormulaWithJoin

      public boolean containsFormulaWithJoin()
      Description copied from interface: ElPropertyDeploy
      Return true if the property is a formula with a join clause.
      Specified by:
      containsFormulaWithJoin in interface ElPropertyDeploy
    • containsMany

      public boolean containsMany()
      Description copied from interface: ElPropertyDeploy
      Return true if there is a property on the path that is a many property.
      Specified by:
      containsMany in interface ElPropertyDeploy
      Specified by:
      containsMany in interface io.ebean.plugin.ExpressionPath
    • elPrefix

      public String elPrefix()
      Description copied from interface: ElPropertyDeploy
      Return the prefix path of the property.

      This is use to determine joins required to support this property.

      Specified by:
      elPrefix in interface ElPropertyDeploy
    • name

      public String name()
      Description copied from interface: ElPropertyDeploy
      Return the name of the property.
      Specified by:
      name in interface ElPropertyDeploy
    • elName

      public String elName()
      Description copied from interface: ElPropertyDeploy
      The ElPrefix plus name.
      Specified by:
      elName in interface ElPropertyDeploy
      Specified by:
      elName in interface io.ebean.plugin.ExpressionPath
    • elPlaceholder

      public String elPlaceholder(boolean encrypted)
      Description copied from interface: ElPropertyDeploy
      Return the place holder in the form of ${elPrefix}dbColumn.

      The ${elPrefix} is replaced by the appropriate table alias.

      Specified by:
      elPlaceholder in interface ElPropertyDeploy
    • isDbEncrypted

      public boolean isDbEncrypted()
      Description copied from interface: ElPropertyValue
      Return true if the property is encrypted in the DB.
      Specified by:
      isDbEncrypted in interface ElPropertyValue
    • isLocalEncrypted

      public boolean isLocalEncrypted()
      Description copied from interface: ElPropertyValue
      Return true if the property is encrypted via Java.
      Specified by:
      isLocalEncrypted in interface ElPropertyValue
    • localEncrypt

      public Object localEncrypt(Object value)
      Description copied from interface: ElPropertyValue
      Encrypt the input value return the encrypted value.
      Specified by:
      localEncrypt in interface ElPropertyValue
    • assocIsEmpty

      public String assocIsEmpty(SpiExpressionRequest request, String path)
      Description copied from interface: ElPropertyValue
      Return the logical where clause to support "Is empty".
      Specified by:
      assocIsEmpty in interface ElPropertyValue
    • assocIdValues

      public Object[] assocIdValues(io.ebean.bean.EntityBean bean)
      Specified by:
      assocIdValues in interface io.ebean.plugin.ExpressionPath
    • assocIdExpression

      public String assocIdExpression(String prefix, String operator)
      Specified by:
      assocIdExpression in interface io.ebean.plugin.ExpressionPath
    • assocIdInExpr

      public String assocIdInExpr(String prefix)
      Description copied from interface: ElPropertyValue
      Return the logical id in expression taking into account embedded id's.
      Specified by:
      assocIdInExpr in interface ElPropertyValue
    • assocIdInValueExpr

      public String assocIdInValueExpr(boolean not, int size)
      Description copied from interface: ElPropertyValue
      Return the logical id value expression taking into account embedded id's.
      Specified by:
      assocIdInValueExpr in interface ElPropertyValue
    • isAssocMany

      public boolean isAssocMany()
      Description copied from interface: ElPropertyValue
      Return true if the property is a OneToMany or ManyToMany associated bean property.
      Specified by:
      isAssocMany in interface ElPropertyValue
    • property

      public io.ebean.plugin.Property property()
      Specified by:
      property in interface io.ebean.plugin.ExpressionPath
    • isAssocId

      public boolean isAssocId()
      Description copied from interface: ElPropertyValue
      Return true if this is an ManyToOne or OneToOne associated bean property.
      Specified by:
      isAssocId in interface ElPropertyValue
      Specified by:
      isAssocId in interface io.ebean.plugin.ExpressionPath
    • isAssocProperty

      public boolean isAssocProperty()
      Description copied from interface: ElPropertyValue
      Return true if any path of this path contains a Associated One or Many.
      Specified by:
      isAssocProperty in interface ElPropertyValue
    • dbColumn

      public String dbColumn()
      Description copied from interface: ElPropertyDeploy
      Return the deployment db column for this property.
      Specified by:
      dbColumn in interface ElPropertyDeploy
    • beanProperty

      public BeanProperty beanProperty()
      Description copied from interface: ElPropertyDeploy
      Return the underlying bean property.
      Specified by:
      beanProperty in interface ElPropertyDeploy
    • jdbcType

      public int jdbcType()
      Specified by:
      jdbcType in interface io.ebean.plugin.ExpressionPath
    • stringParser

      public io.ebean.text.StringParser stringParser()
      Specified by:
      stringParser in interface io.ebean.plugin.ExpressionPath
    • convert

      public Object convert(Object value)
      Specified by:
      convert in interface io.ebean.plugin.ExpressionPath
    • pathGet

      public Object pathGet(Object bean)
      Specified by:
      pathGet in interface io.ebean.plugin.ExpressionPath
    • pathGetNested

      public Object pathGetNested(Object bean)
      Description copied from interface: ElPropertyValue
      Return the value ensuring objects prior to the top scalar property are automatically populated.
      Specified by:
      pathGetNested in interface ElPropertyValue
    • pathSet

      public void pathSet(Object bean, Object value)
      Specified by:
      pathSet in interface io.ebean.plugin.ExpressionPath