Class AbstractConstrain
- java.lang.Object
-
- de.businesscode.bcdui.binding.rel.impl.AbstractConstrain
-
- Direct Known Subclasses:
BooleanConstraintImpl
,CombinedConstraintImpl
public abstract class AbstractConstrain extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractConstrain.Type
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.regex.Pattern
MAINTABLE_SQLALIAS_PATTERN
protected static java.lang.String
MAINTABLE_SQLALIAS_PLACEHOLDER
protected static java.lang.String
OPER_REPL
protected static java.util.regex.Pattern
REGEXP_OPER_REPL
-
Constructor Summary
Constructors Constructor Description AbstractConstrain()
AbstractConstrain
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addChildConstraint(AbstractConstrain pConstraint)
addChildConstraintvoid
addColumn(BindingItem pColumn)
addColumnjava.util.ArrayList<AbstractConstrain>
getChildConstraints()
getChildConstraintsjava.util.List<BindingItem>
getColumns()
getColumnsabstract java.lang.String
getConstrainedStatement(java.lang.String mainTableAlias, boolean isForJoinToCaseWhen)
builds and returns full SQL statement of the constraint Method getConstrainedStatementjava.lang.String
getName()
Method getName gets name of typeint
getNumParts()
returns size of columnsprotected java.lang.String
getStatement()
getStatementAbstractConstrain.Type
getType()
getTypeprotected java.lang.String
insertMainTableAlias(java.lang.String cond, java.lang.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 aliasboolean
isNegate()
isNegateabstract boolean
mayContainChildConstraint()
if the constraint may contain child constraintvoid
setNegate(boolean pNot)
setNegateprotected void
setStatement(java.lang.String constraintStatement)
setStatementvoid
setType(AbstractConstrain.Type ptype)
setTypejava.lang.String
toString()
-
-
-
Field Detail
-
MAINTABLE_SQLALIAS_PLACEHOLDER
protected static java.lang.String MAINTABLE_SQLALIAS_PLACEHOLDER
-
MAINTABLE_SQLALIAS_PATTERN
protected static java.util.regex.Pattern MAINTABLE_SQLALIAS_PATTERN
-
OPER_REPL
protected static java.lang.String OPER_REPL
-
REGEXP_OPER_REPL
protected static java.util.regex.Pattern REGEXP_OPER_REPL
-
-
Method Detail
-
getStatement
protected java.lang.String getStatement()
getStatement- Returns:
-
insertMainTableAlias
protected java.lang.String insertMainTableAlias(java.lang.String cond, java.lang.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(java.lang.String constraintStatement)
setStatement- Parameters:
constraintStatement
-
-
getChildConstraints
public java.util.ArrayList<AbstractConstrain> getChildConstraints()
getChildConstraints- Returns:
-
getType
public AbstractConstrain.Type getType()
getType- Returns:
-
setType
public void setType(AbstractConstrain.Type ptype)
setType- Parameters:
ptype
-
-
getName
public java.lang.String getName()
Method getName gets name of type- Returns:
-
addColumn
public void addColumn(BindingItem pColumn)
addColumn- Parameters:
pColumn
-
-
getColumns
public java.util.List<BindingItem> getColumns()
getColumns- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
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 java.lang.String getConstrainedStatement(java.lang.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
-
-