Class AbstractConstrain
java.lang.Object
de.businesscode.bcdui.binding.rel.impl.AbstractConstrain
- Direct Known Subclasses:
BooleanConstraintImpl,CombinedConstraintImpl
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildConstraint(AbstractConstrain pConstraint) addChildConstraintvoidaddColumn(BindingItem pColumn) addColumngetChildConstraintsgetColumnsabstract StringgetConstrainedStatement(String mainTableAlias, boolean isForJoinToCaseWhen) builds and returns full SQL statement of the constraint Method getConstrainedStatementgetName()Method getName gets name of typeintreturns size of columnsprotected StringgetStatementgetType()getTypeprotected StringinsertMainTableAlias(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 aliasbooleanisNegate()isNegateabstract booleanif the constraint may contain child constraintvoidsetNegate(boolean pNot) setNegateprotected voidsetStatement(String constraintStatement) setStatementvoidsetType(AbstractConstrain.Type ptype) setTypetoString()
-
Field Details
-
MAINTABLE_SQLALIAS_PLACEHOLDER
-
MAINTABLE_SQLALIAS_PATTERN
-
OPER_REPL
-
REGEXP_OPER_REPL
-
-
Constructor Details
-
AbstractConstrain
public AbstractConstrain()AbstractConstrain
-
-
Method Details
-
getStatement
getStatement- Returns:
-
insertMainTableAlias
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
setStatement- Parameters:
constraintStatement-
-
getChildConstraints
getChildConstraints- Returns:
-
getType
getType- Returns:
-
setType
setType- Parameters:
ptype-
-
getName
Method getName gets name of type- Returns:
-
addColumn
addColumn- Parameters:
pColumn-
-
getColumns
getColumns- Returns:
-
toString
-
addChildConstraint
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:
BindingNotFoundExceptionBindingException
-
mayContainChildConstraint
public abstract boolean mayContainChildConstraint()if the constraint may contain child constraint
-