Class AbstractConstrain

java.lang.Object
de.businesscode.bcdui.binding.rel.impl.AbstractConstrain
Direct Known Subclasses:
BooleanConstraintImpl, CombinedConstraintImpl

public abstract class AbstractConstrain extends Object
  • Field Details

    • MAINTABLE_SQLALIAS_PLACEHOLDER

      protected static String MAINTABLE_SQLALIAS_PLACEHOLDER
    • MAINTABLE_SQLALIAS_PATTERN

      protected static Pattern MAINTABLE_SQLALIAS_PATTERN
    • OPER_REPL

      protected static String OPER_REPL
    • REGEXP_OPER_REPL

      protected static Pattern REGEXP_OPER_REPL
  • Constructor Details

    • AbstractConstrain

      public AbstractConstrain()
      AbstractConstrain
  • Method Details

    • getStatement

      protected String getStatement()
      getStatement
      Returns:
    • insertMainTableAlias

      protected String insertMainTableAlias(String cond, String mainTableSqlAlias)
      Turns the cached condition expression into a concrete one for the current query The relations's alias postfix is fix and baked into the BindingItemFromRel, so we just need to add the main table's alias
      Parameters:
      cond -
      mainTableSqlAlias -
      Returns:
    • setStatement

      protected void setStatement(String constraintStatement)
      setStatement
      Parameters:
      constraintStatement -
    • getChildConstraints

      public ArrayList<AbstractConstrain> getChildConstraints()
      getChildConstraints
      Returns:
    • getType

      public AbstractConstrain.Type getType()
      getType
      Returns:
    • setType

      public void setType(AbstractConstrain.Type ptype)
      setType
      Parameters:
      ptype -
    • getName

      public String getName()
      Method getName gets name of type
      Returns:
    • addColumn

      public void addColumn(BindingItem pColumn)
      addColumn
      Parameters:
      pColumn -
    • getColumns

      public List<BindingItem> getColumns()
      getColumns
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • addChildConstraint

      public void addChildConstraint(AbstractConstrain pConstraint) throws BindingException
      addChildConstraint
      Parameters:
      pConstraint -
      Throws:
      BindingException
    • setNegate

      public void setNegate(boolean pNot)
      setNegate
      Parameters:
      pNot -
    • isNegate

      public boolean isNegate()
      isNegate
      Returns:
    • getNumParts

      public int getNumParts()
      returns size of columns
      Returns:
    • getConstrainedStatement

      public abstract String getConstrainedStatement(String mainTableAlias, boolean isForJoinToCaseWhen) throws BindingException
      builds and returns full SQL statement of the constraint Method getConstrainedStatement
      Returns:
      Throws:
      BindingNotFoundException
      BindingException
    • mayContainChildConstraint

      public abstract boolean mayContainChildConstraint()
      if the constraint may contain child constraint