Class Clause

java.lang.Object
overit.geocall.sql.code.criterion.Criterion
overit.geocall.sql.code.criterion.Clause
All Implemented Interfaces:
Cloneable

public class Clause extends Criterion
The class extends Criterion and aims to define a clause expressed by pure sql code.
This class is really usefull when you need to create a Decision with a non-predefined criterion, a customized criterion.
For example a clause could be defined like "NAMEFIELD >= value".
  • Field Details

    • _clause

      protected final String _clause
  • Constructor Details

    • Clause

      public Clause(String clause)
      This methos is the class's constructor and aims to sets the sql code's string.
      Parameters:
      clause - The Sql code's String to be set, to create the clause.
  • Method Details

    • define

      public Parts define(String name, Object value)
      Description copied from class: Criterion
      defines the Parts of the operation with all the information to become a fragment.
      Specified by:
      define in class Criterion
      Parameters:
      name - the nome of the context field
      value - the current value of the context field
      Returns:
      return null if the Criterion don't find an information, a Parts otherwise. Then Parts con also contain empty strings if the decision is to discard the name and the value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object