org.firebirdsql.jdbc.metadata

## Class Clause

- java.lang.Object
- - org.firebirdsql.jdbc.metadata.Clause

-     @InternalApi
      public final class Clause
      extends java.lang.Object

  Condition clause for constructing metadata query conditions.
  Since:
    4.0
  Author:
    Mark Rotteveel

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Clause(java.lang.String columnName, java.lang.String pattern)` Creates a metadata conditional clause.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `anyCondition(Clause... clauses)`
    `static boolean` | `anyCondition(Clause clause1, Clause clause2)`
    `java.lang.String` | `getCondition()`
    `java.lang.String` | `getCondition(boolean includeAnd)`
    `java.lang.String` | `getCondition(java.lang.String prefix, java.lang.String suffix)` Condition rendered with prefix and suffix.
    `java.lang.String` | `getValue()`
    `boolean` | `hasCondition()`
    `static java.util.List<java.lang.String>` | `parameters(Clause... clauses)`
    `static java.util.List<java.lang.String>` | `parameters(Clause clause1)`
    `static java.util.List<java.lang.String>` | `parameters(Clause clause1, Clause clause2)`
    `static java.util.List<java.lang.String>` | `parameters(java.util.List<Clause> clauses)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Clause

          public Clause(java.lang.String columnName,
                        java.lang.String pattern)

      Creates a metadata conditional clause.
      Parameters:
        `columnName` - Column name or expression resulting in a string value
        `pattern` - Metadata pattern

  - ### Method Detail

    - #### getCondition

          public java.lang.String getCondition()

      Returns:
        The condition for this clause suffixed with `" and "`, or empty string if the condition is empty

    - #### getCondition

          public java.lang.String getCondition(boolean includeAnd)

      Returns:
        The condition for this clause suffixed with `" and "` when `includeAnd` is `true`, or empty string if the condition is empty

    - #### getCondition

          public java.lang.String getCondition(java.lang.String prefix,
                                               java.lang.String suffix)

      Condition rendered with prefix and suffix.
      Parameters:
        `prefix` - Prefix
        `suffix` - Suffix
      Returns:
        The condition for this clause prefixed with `prefix` and suffixed with `suffix`, or empty string if the condition is empty

    - #### getValue

          public java.lang.String getValue()

    - #### hasCondition

          public boolean hasCondition()

    - #### anyCondition

          public static boolean anyCondition(Clause clause1,
                                             Clause clause2)

    - #### anyCondition

          public static boolean anyCondition(Clause... clauses)

    - #### parameters

          public static java.util.List<java.lang.String> parameters(Clause clause1)

    - #### parameters

          public static java.util.List<java.lang.String> parameters(Clause clause1,
                                                                    Clause clause2)

    - #### parameters

          public static java.util.List<java.lang.String> parameters(Clause... clauses)

    - #### parameters

          public static java.util.List<java.lang.String> parameters(java.util.List<Clause> clauses)

Copyright © 2001-2025 Jaybird (Firebird JDBC) team. All rights reserved.