## org.eclipse.datatools.sqltools.sqlbuilder.views.criteria
Class CriteriaElement

    java.lang.Object
      org.eclipse.datatools.sqltools.sqlbuilder.views.criteria.CriteriaElement

    public class CriteriaElement

extends java.lang.Object

CritieriaElement provides the IElement for the critera grid view. It is applicable for select, update, and delete statements

Constructor Summary
`CriteriaElement(SQLDomainModel domainModel, java.lang.Object target, java.lang.Object clause, Predicate predicate, boolean isHaving, boolean firstClause)`

Method Summary
`java.lang.String` `getAndOr()` If the current predicate is contained in a SearchConditionCombined, get the group operator.
`QueryValueExpression` `getColumn()` Return the "column" from the grid This corresponds to the left hand side of the predicate
`java.lang.String` `getColumnText(int columnIndex)` Get the mof value and return it
`java.lang.ref.WeakReference` `getCriteriaElementVectorRef()`
`Predicate` `getCurrentPredicate()` Return the lists of SQLPredicates that made up the search conditon
`boolean` `getFirstClause()`
`java.lang.String` `getOperator()` Return the comparison operator
`QuerySearchCondition` `getSearchCondition()` Return the Search Condition for the current statement
`SearchConditionHelper` `getSearchConditionHelper()` Return the lists of SQLPredicates that made up the search conditon
`SQLQueryObject` `getSQLStatement()` Return the current statement (either select, update, or delete)
`java.lang.String` `getValue()` Return the "value" from the grid This corresponds to the right hand side of the predicate
`boolean` `setAndOr(java.lang.String andOrString)`
`void` `setCriteriaElementVectorRef(java.lang.ref.WeakReference criteriaElementVectorRef)`
`void` `setElementProperty(java.lang.Object key, java.lang.Object propValue)` Set the mof object from the grid value
`QueryValueExpression` `showExpressionBuilder(boolean isColumn, java.lang.String sProperty)` Launch the expression builder
`QueryValueExpression` `showExpressionBuilder(java.lang.Object key, boolean isColumn, java.lang.String sProperty)` Launch the expression builder

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CriteriaElement

    public CriteriaElement(SQLDomainModel domainModel,
                           java.lang.Object target,
                           java.lang.Object clause,
                           Predicate predicate,
                           boolean isHaving,
                           boolean firstClause)

Parameters:
  `target` - - a select, update or delete SQL statement
  `whereClause` - - the where clause part of the above statement
  `predicate` - - the predicate the made up the table row
  `provide` - - the content provider that creates this element

Method Detail

### getFirstClause

    public boolean getFirstClause()

### getCurrentPredicate

    public Predicate getCurrentPredicate()

  Return the lists of SQLPredicates that made up the search conditon

### getSearchConditionHelper

    public SearchConditionHelper getSearchConditionHelper()

  Return the lists of SQLPredicates that made up the search conditon

### getSQLStatement

    public SQLQueryObject getSQLStatement()

  Return the current statement (either select, update, or delete)

### getSearchCondition

    public QuerySearchCondition getSearchCondition()

  Return the Search Condition for the current statement

### setElementProperty

    public void setElementProperty(java.lang.Object key,
                                   java.lang.Object propValue)

  Set the mof object from the grid value

### getColumnText

    public java.lang.String getColumnText(int columnIndex)

  Get the mof value and return it

### getColumn

    public QueryValueExpression getColumn()

  Return the "column" from the grid This corresponds to the left hand side of the predicate

### getValue

    public java.lang.String getValue()

  Return the "value" from the grid This corresponds to the right hand side of the predicate

### getOperator

    public java.lang.String getOperator()

  Return the comparison operator

### getAndOr

    public java.lang.String getAndOr()

  If the current predicate is contained in a SearchConditionCombined, get the group operator. Because it is a binary tree, traverse the left branch to get the operator value

### setAndOr

    public boolean setAndOr(java.lang.String andOrString)

### showExpressionBuilder

    public QueryValueExpression showExpressionBuilder(boolean isColumn,
                                                      java.lang.String sProperty)

  Launch the expression builder

### showExpressionBuilder

    public QueryValueExpression showExpressionBuilder(java.lang.Object key,
                                                      boolean isColumn,
                                                      java.lang.String sProperty)

  Launch the expression builder

### getCriteriaElementVectorRef

    public java.lang.ref.WeakReference getCriteriaElementVectorRef()

  Returns:
    Returns the criteriaElementVectorRef.

### setCriteriaElementVectorRef

    public void setCriteriaElementVectorRef(java.lang.ref.WeakReference criteriaElementVectorRef)

  Parameters:
    `criteriaElementVectorRef` - The criteriaElementVectorRef to set.