Module org.firebirdsql.jaybird
Package org.firebirdsql.jdbc.metadata

# Class Clause

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

@InternalApi public final class Clause extends Object
Condition clause for constructing metadata query conditions.

Since:
  4.0
Author:
  Mark Rotteveel

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`static boolean`
`anyCondition(List<Clause> clauses)`
`static boolean`
`anyCondition(Clause... clauses)`
`static boolean`
`anyCondition(Clause clause1, Clause clause2)`
`static String`
`conjunction(List<Clause> clauses)`
`static String`
`conjunction(Clause... clauses)`
`String`
`getCondition()`
`String`
`getCondition(boolean includeAnd)`
`String`
`getCondition(String prefix, String suffix)`
Condition rendered with prefix and suffix.
`String`
`getValue()`
`boolean`
`hasCondition()`
`static List<String>`
`parameters(List<Clause> clauses)`
`static List<String>`
`parameters(Clause clause1)`
`static List<String>`
`parameters(Clause... clauses)`
`static List<String>`
`parameters(Clause clause1, Clause clause2)`

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

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

## Constructor Details

### Clause

public Clause(String columnName, String pattern)
Creates a metadata conditional clause.

Parameters:
  `columnName` - Column name or expression resulting in a string value
  `pattern` - Metadata pattern

## Method Details

### getCondition

public String getCondition()

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

### getCondition

public 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 String getCondition(String prefix, 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 String getValue()

### hasCondition

public boolean hasCondition()

### anyCondition

public static boolean anyCondition(Clause clause1, Clause clause2)

### anyCondition

public static boolean anyCondition(Clause... clauses)

### anyCondition

public static boolean anyCondition(List<Clause> clauses)

### parameters

public static List<String> parameters(Clause clause1)

### parameters

public static List<String> parameters(Clause clause1, Clause clause2)

### parameters

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

### parameters

public static List<String> parameters(List<Clause> clauses)

### conjunction

public static String conjunction(Clause... clauses)

### conjunction

public static String conjunction(List<Clause> clauses)