Class BeanFkeyProperty

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

public final class BeanFkeyProperty extends Object implements ElPropertyValue
Used to evaluate imported foreign keys so as to avoid unnecessary joins.
  • Constructor Details

    • BeanFkeyProperty

      public BeanFkeyProperty(String name, String dbColumn, int deployOrder)
  • Method Details

    • toString

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

      public boolean isAggregation()
      Description copied from interface: ElPropertyDeploy
      Return true if this is an aggregation property.
      Specified by:
      isAggregation in interface ElPropertyDeploy
    • 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
    • create

      public BeanFkeyProperty create(String expression, boolean pathContainsMany)
    • isDbEncrypted

      public boolean isDbEncrypted()
      Returns false for keys.
      Specified by:
      isDbEncrypted in interface ElPropertyValue
    • isLocalEncrypted

      public boolean isLocalEncrypted()
      Returns false for keys.
      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
    • 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()
      Returns false.
      Specified by:
      containsMany in interface ElPropertyDeploy
      Specified by:
      containsMany in interface io.ebean.plugin.ExpressionPath
    • containsManySince

      public boolean containsManySince(String sinceProperty)
      Description copied from interface: ElPropertyDeploy
      Return true if there is a property is on the path after sinceProperty that is a 'many' property.
      Specified by:
      containsManySince in interface ElPropertyDeploy
    • dbColumn

      public String dbColumn()
      Description copied from interface: ElPropertyDeploy
      Return the deployment db column for this property.
      Specified by:
      dbColumn 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
    • assocIdValues

      public Object[] assocIdValues(io.ebean.bean.EntityBean value)
      Returns null as not an AssocOne.
      Specified by:
      assocIdValues in interface io.ebean.plugin.ExpressionPath
    • assocIdExpression

      public String assocIdExpression(String prefix, String operator)
      Returns null as not an AssocOne.
      Specified by:
      assocIdExpression in interface io.ebean.plugin.ExpressionPath
    • assocIdInExpr

      public String assocIdInExpr(String prefix)
      Returns null as not an AssocOne.
      Specified by:
      assocIdInExpr in interface ElPropertyValue
    • assocIdInValueExpr

      public String assocIdInValueExpr(boolean not, int size)
      Returns null as not an AssocOne.
      Specified by:
      assocIdInValueExpr 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
    • 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
    • isAssocId

      public boolean isAssocId()
      Returns false as not an AssocOne.
      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
    • 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
    • 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
    • jdbcType

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

      public BeanProperty beanProperty()
      Description copied from interface: ElPropertyDeploy
      Return the underlying bean property.
      Specified by:
      beanProperty in interface ElPropertyDeploy
    • 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
    • pathSet

      public void pathSet(Object bean, Object value)
      Specified by:
      pathSet 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
    • property

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