Class ComparisonDeclaration

java.lang.Object
org.seasar.doma.jdbc.criteria.declaration.ComparisonDeclaration
Direct Known Subclasses:
HavingDeclaration, JoinDeclaration, WhereDeclaration

public abstract class ComparisonDeclaration extends Object
  • Constructor Details

  • Method Details

    • eq

      public <PROPERTY> void eq(PropertyMetamodel<PROPERTY> left, PROPERTY right)
      Adds a = operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operand.
      Throws:
      NullPointerException - if left is null
    • eq

      public <PROPERTY> void eq(PropertyMetamodel<PROPERTY> left, PropertyMetamodel<PROPERTY> right)
      Adds a = operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand
      Throws:
      NullPointerException - if left or right is null
    • ne

      public <PROPERTY> void ne(PropertyMetamodel<PROPERTY> left, PROPERTY right)
      Adds a <> operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operand.
      Throws:
      NullPointerException - if left is null
    • ne

      public <PROPERTY> void ne(PropertyMetamodel<PROPERTY> left, PropertyMetamodel<PROPERTY> right)
      Adds a <> operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand
      Throws:
      NullPointerException - if left or right is null
    • gt

      public <PROPERTY> void gt(PropertyMetamodel<PROPERTY> left, PROPERTY right)
      Adds a > operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operand.
      Throws:
      NullPointerException - if left is null
    • gt

      public <PROPERTY> void gt(PropertyMetamodel<PROPERTY> left, PropertyMetamodel<PROPERTY> right)
      Adds a > operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand
      Throws:
      NullPointerException - if left or right is null
    • ge

      public <PROPERTY> void ge(PropertyMetamodel<PROPERTY> left, PROPERTY right)
      Adds a >= operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operand.
      Throws:
      NullPointerException - if left is null
    • ge

      public <PROPERTY> void ge(PropertyMetamodel<PROPERTY> left, PropertyMetamodel<PROPERTY> right)
      Adds a >= operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand
      Throws:
      NullPointerException - if left or right is null
    • lt

      public <PROPERTY> void lt(PropertyMetamodel<PROPERTY> left, PROPERTY right)
      Adds a < operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operand.
      Throws:
      NullPointerException - if left is null
    • lt

      public <PROPERTY> void lt(PropertyMetamodel<PROPERTY> left, PropertyMetamodel<PROPERTY> right)
      Adds a < operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand
      Throws:
      NullPointerException - if left or right is null
    • le

      public <PROPERTY> void le(PropertyMetamodel<PROPERTY> left, PROPERTY right)
      Adds a <= operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operand.
      Throws:
      NullPointerException - if left is null
    • le

      public <PROPERTY> void le(PropertyMetamodel<PROPERTY> left, PropertyMetamodel<PROPERTY> right)
      Adds a <= operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand
      Throws:
      NullPointerException - if left or right is null
    • isNull

      public <PROPERTY> void isNull(PropertyMetamodel<PROPERTY> propertyMetamodel)
      Adds a IS NULL operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      propertyMetamodel - the left hand operand
      Throws:
      NullPointerException - if propertyMetamodel is null
    • isNotNull

      public <PROPERTY> void isNotNull(PropertyMetamodel<PROPERTY> propertyMetamodel)
      Adds a IS NOT NULL operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      propertyMetamodel - the left hand operand
      Throws:
      NullPointerException - if propertyMetamodel is null
    • eqOrIsNull

      public <PROPERTY> void eqOrIsNull(PropertyMetamodel<PROPERTY> left, PROPERTY right)
      Adds a = operator or a IS NULL operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition includes the IS NULL operator.
      Throws:
      NullPointerException - if left is null
    • neOrIsNotNull

      public <PROPERTY> void neOrIsNotNull(PropertyMetamodel<PROPERTY> left, PROPERTY right)
      Adds a <> operator or a IS NOT NULL operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition includes the IS NOT NULL operator.
      Throws:
      NullPointerException - if left is null
    • like

      public void like(PropertyMetamodel<?> left, CharSequence right)
      Adds a LIKE operator.
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • like

      public void like(PropertyMetamodel<?> left, CharSequence right, LikeOption option)
      Adds a LIKE operator.
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      option - the option
      Throws:
      NullPointerException - if left is null
    • notLike

      public void notLike(PropertyMetamodel<?> left, CharSequence right)
      Adds a NOT LIKE operator.
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • notLike

      public void notLike(PropertyMetamodel<?> left, CharSequence right, LikeOption option)
      Adds a NOT LIKE operator.
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      option - the option
      Throws:
      NullPointerException - if left is null
    • between

      public <PROPERTY> void between(PropertyMetamodel<PROPERTY> propertyMetamodel, PROPERTY start, PROPERTY end)
      Adds a BETWEEN operator.

      If either of the start parameter or the end parameter is null, the query condition doesn't include the operator.

      Type Parameters:
      PROPERTY - the property type
      Parameters:
      propertyMetamodel - the left hand operand
      start - the first argument of the right hand operand
      end - the second argument of the right hand operand
      Throws:
      NullPointerException - if propertyMetamodel is null
    • in

      public <PROPERTY> void in(PropertyMetamodel<PROPERTY> left, Iterable<PROPERTY> right)
      Adds a IN operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • in

      public <PROPERTY> void in(PropertyMetamodel<PROPERTY> left, List<PROPERTY> right)
      Adds a IN operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • notIn

      public <PROPERTY> void notIn(PropertyMetamodel<PROPERTY> left, Iterable<PROPERTY> right)
      Adds a NOT IN operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • notIn

      public <PROPERTY> void notIn(PropertyMetamodel<PROPERTY> left, List<PROPERTY> right)
      Adds a NOT IN operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • in

      public <PROPERTY> void in(PropertyMetamodel<PROPERTY> left, SubSelectContext<PropertyMetamodel<PROPERTY>> right)
      Adds a IN operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand
      Throws:
      NullPointerException - if left or right is null
    • notIn

      public <PROPERTY> void notIn(PropertyMetamodel<PROPERTY> left, SubSelectContext<PropertyMetamodel<PROPERTY>> right)
      Adds a NOT IN operator.
      Type Parameters:
      PROPERTY - the property type
      Parameters:
      left - the left hand operand
      right - the right hand operand
      Throws:
      NullPointerException - if left or right is null
    • in

      public <PROPERTY1, PROPERTY2> void in(Tuple2<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>> left, Iterable<Tuple2<PROPERTY1,PROPERTY2>> right)
      Adds a IN operator.
      Type Parameters:
      PROPERTY1 - the first property type
      PROPERTY2 - the second property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • in

      public <PROPERTY1, PROPERTY2> void in(Tuple2<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>> left, List<Tuple2<PROPERTY1,PROPERTY2>> right)
      Adds a IN operator.
      Type Parameters:
      PROPERTY1 - the first property type
      PROPERTY2 - the second property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • notIn

      public <PROPERTY1, PROPERTY2> void notIn(Tuple2<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>> left, Iterable<Tuple2<PROPERTY1,PROPERTY2>> right)
      Adds a NOT IN operator.
      Type Parameters:
      PROPERTY1 - the first property type
      PROPERTY2 - the second property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • notIn

      public <PROPERTY1, PROPERTY2> void notIn(Tuple2<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>> left, List<Tuple2<PROPERTY1,PROPERTY2>> right)
      Adds a NOT IN operator.
      Type Parameters:
      PROPERTY1 - the first property type
      PROPERTY2 - the second property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • in

      public <PROPERTY1, PROPERTY2> void in(Tuple2<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>> left, SubSelectContext<Tuple2<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>>> right)
      Adds a IN operator.
      Type Parameters:
      PROPERTY1 - the first property type
      PROPERTY2 - the second property type
      Parameters:
      left - the left hand operand
      right - the right hand operand
      Throws:
      NullPointerException - if left or right is null
    • notIn

      public <PROPERTY1, PROPERTY2> void notIn(Tuple2<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>> left, SubSelectContext<Tuple2<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>>> right)
      Adds a NOT IN operator.
      Type Parameters:
      PROPERTY1 - the first property type
      PROPERTY2 - the second property type
      Parameters:
      left - the left hand operand
      right - the right hand operand
      Throws:
      NullPointerException - if left or right is null
    • in

      public <PROPERTY1, PROPERTY2, PROPERTY3> void in(Tuple3<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>,PropertyMetamodel<PROPERTY3>> left, Iterable<Tuple3<PROPERTY1,PROPERTY2,PROPERTY3>> right)
      Adds a IN operator.
      Type Parameters:
      PROPERTY1 - the first property type
      PROPERTY2 - the second property type
      PROPERTY3 - the third property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • in

      public <PROPERTY1, PROPERTY2, PROPERTY3> void in(Tuple3<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>,PropertyMetamodel<PROPERTY3>> left, List<Tuple3<PROPERTY1,PROPERTY2,PROPERTY3>> right)
      Adds a IN operator.
      Type Parameters:
      PROPERTY1 - the first property type
      PROPERTY2 - the second property type
      PROPERTY3 - the third property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • notIn

      public <PROPERTY1, PROPERTY2, PROPERTY3> void notIn(Tuple3<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>,PropertyMetamodel<PROPERTY3>> left, Iterable<Tuple3<PROPERTY1,PROPERTY2,PROPERTY3>> right)
      Adds a NOT IN operator.
      Type Parameters:
      PROPERTY1 - the first property type
      PROPERTY2 - the second property type
      PROPERTY3 - the third property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • notIn

      public <PROPERTY1, PROPERTY2, PROPERTY3> void notIn(Tuple3<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>,PropertyMetamodel<PROPERTY3>> left, List<Tuple3<PROPERTY1,PROPERTY2,PROPERTY3>> right)
      Adds a NOT IN operator.
      Type Parameters:
      PROPERTY1 - the first property type
      PROPERTY2 - the second property type
      PROPERTY3 - the third property type
      Parameters:
      left - the left hand operand
      right - the right hand operand. If this value is null, the query condition doesn't include the operator.
      Throws:
      NullPointerException - if left is null
    • in

      public <PROPERTY1, PROPERTY2, PROPERTY3> void in(Tuple3<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>,PropertyMetamodel<PROPERTY3>> left, SubSelectContext<Tuple3<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>,PropertyMetamodel<PROPERTY3>>> right)
      Adds a IN operator.
      Type Parameters:
      PROPERTY1 - the first property type
      PROPERTY2 - the second property type
      PROPERTY3 - the third property type
      Parameters:
      left - the left hand operand
      right - the right hand operand
      Throws:
      NullPointerException - if left or right is null
    • notIn

      public <PROPERTY1, PROPERTY2, PROPERTY3> void notIn(Tuple3<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>,PropertyMetamodel<PROPERTY3>> left, SubSelectContext<Tuple3<PropertyMetamodel<PROPERTY1>,PropertyMetamodel<PROPERTY2>,PropertyMetamodel<PROPERTY3>>> right)
      Adds a NOT IN operator.
      Type Parameters:
      PROPERTY1 - the first property type
      PROPERTY2 - the second property type
      PROPERTY3 - the third property type
      Parameters:
      left - the left hand operand
      right - the right hand operand
      Throws:
      NullPointerException - if left or right is null
    • exists

      public void exists(SubSelectContext<?> subSelectContext)
      Adds a EXISTS operator.
      Parameters:
      subSelectContext - the sub-select context
      Throws:
      NullPointerException - if subSelectContext is null
    • notExists

      public void notExists(SubSelectContext<?> subSelectContext)
      Adds a NOT EXISTS operator.
      Parameters:
      subSelectContext - the sub-select context
      Throws:
      NullPointerException - if subSelectContext is null
    • from

      public <ENTITY> SubSelectFromDeclaration<ENTITY> from(EntityMetamodel<ENTITY> entityMetamodel)
      Creates a sub-select context.
      Type Parameters:
      ENTITY - the entity type
      Parameters:
      entityMetamodel - the entity model
      Returns:
      the sub-select context
      Throws:
      NullPointerException - if entityMetamodel is null
    • and

      public void and(Runnable block)
      Add a AND operator.
      Parameters:
      block - the right hand operand
      Throws:
      NullPointerException - if block is null
    • or

      public void or(Runnable block)
      Add a OR operator.
      Parameters:
      block - the right hand operand
      Throws:
      NullPointerException - if block is null
    • extension

      public <EXTENSION> void extension(Function<UserDefinedCriteriaContext,EXTENSION> construct, Consumer<EXTENSION> extensionBlock)
      Add a declaring a user-defined extension.
      Type Parameters:
      EXTENSION - the type of the user-defined extension
      Parameters:
      construct - function that generates user-defined extension.
      extensionBlock - block that can use user-defined extension.
      Throws:
      NullPointerException - if construct or extensionBlock is null
    • not

      public void not(Runnable block)
      Add a NOT operator.
      Parameters:
      block - the right hand operand
      Throws:
      NullPointerException - if block is null
    • add

      protected void add(Criterion criterion)