org.jooq.impl
Class CustomField<T>

java.lang.Object
  extended by org.jooq.impl.CustomField<T>
All Implemented Interfaces:
Serializable, Comparable<NamedQueryPart>, Adapter, AliasProvider<Field<T>>, Attachable, AttachableInternal, Field<T>, NamedQueryPart, NamedTypeProviderQueryPart<T>, QueryPart, QueryPartInternal

public abstract class CustomField<T>
extends Object

A base class for custom Field implementations in client code.

Client code may provide proper Field implementations extending this useful base class. All necessary parts of the Field interface are already implemented. Only these two methods need further implementation:

Refer to those method's Javadoc for further details about their expected behaviour. Note that, optionally, an additional implementation for may also be provided, if the default behaviour thereof needs to be overridden.

Author:
Lukas Eder
See Also:
Serialized Form

Constructor Summary
protected CustomField(String name, DataType<T> type)
           
 
Method Summary
 Field<T> abs()
          Get the absolute value of a numeric field: abs(field) This renders the same on all dialects: abs([this])
 Field<BigDecimal> acos()
          Get the arc cosine(field) function This renders the acos function where available: acos([this])
 Field<T> add(Field<? extends Number> value)
          Don't allow any further overrides
 Field<T> add(Number value)
          An arithmetic expression adding this to value.
 Field<T> as(String alias)
          Don't allow any further overrides
 SortField<T> asc()
          Create an ascending sort field from this field
 Field<Integer> ascii()
          Get the ascii(field) function This renders the replace or str_replace function: ascii([this])
 Field<BigDecimal> asin()
          Get the arc sine(field) function This renders the asin function where available: asin([this])
 Field<BigDecimal> atan()
          Get the arc tangent(field) function This renders the atan function where available: atan([this])
 Field<BigDecimal> atan2(Field<? extends Number> y)
          Get the arc tangent 2(field, y) function This renders the atan2 or atn2 function where available: atan2([this]) or atn2([this])
 Field<BigDecimal> atan2(Number y)
          Get the arc tangent 2(field, y) function This renders the atan2 or atn2 function where available: atan2([this]) or atn2([this])
 void attach(Configuration configuration)
          By default, nothing is done on an attachment event.
 Field<BigDecimal> avg()
          Get the average over a numeric field: avg(field)
 WindowPartitionByStep<BigDecimal> avgOver()
          The avg(field) over ([analytic clause]) function.
 Condition between(Field<T> minValue, Field<T> maxValue)
          this between minValue and maxValue
 Condition between(T minValue, T maxValue)
          this between minValue and maxValue
abstract  void bind(BindContext context)
          Bind all parameters of this QueryPart to a PreparedStatement This method is for JOOQ INTERNAL USE only.
 int bind(Configuration configuration, PreparedStatement stmt)
          Deprecated. 
 int bind(Configuration configuration, PreparedStatement stmt, int initialIndex)
          Deprecated. 
 int bindDeclaration(Configuration configuration, PreparedStatement stmt)
          Deprecated. 
 int bindDeclaration(Configuration configuration, PreparedStatement stmt, int initialIndex)
          Deprecated. 
 int bindReference(Configuration configuration, PreparedStatement stmt)
          Deprecated. 
 int bindReference(Configuration configuration, PreparedStatement stmt, int initialIndex)
          Deprecated. 
 Field<Integer> bitLength()
          Get the bit_length(field) function This translates into any dialect
<Z> Field<Z>
cast(Class<? extends Z> type)
          Cast this field to another type The actual cast may not be accurate as the DataType has to be "guessed" from the jOOQ-configured data types.
<Z> Field<Z>
cast(DataType<Z> type)
          Cast this field to a dialect-specific data type.
<Z> Field<Z>
cast(Field<Z> field)
          Cast this field to the type of another field.
 Field<T> ceil()
          Get the smallest integer value not less than [this] This renders the ceil or ceiling function where available: ceil([this]) or ceiling([this]) ... or simulates it elsewhere using round: round([this] + 0.499999999999999)
 Field<Integer> charLength()
          Get the char_length(field) function This translates into any dialect
 Field<T> coalesce(Field<T> option, Field<?>... options)
          Gets the Oracle-style COALESCE(expr1, expr2, ... , exprn) function Returns the dialect's equivalent to COALESCE: Oracle COALESCE
 Field<T> coalesce(T option, T... options)
          Gets the Oracle-style COALESCE(expr1, expr2, ... , exprn) function
 int compareTo(NamedQueryPart that)
           
 Field<String> concat(Field<?>... fields)
          This default implementation is known to be overridden by Expression to generate neater expressions
 Field<String> concat(String... values)
          Get the concat(value[, value, ...]) function This creates this || fields[0] || fields[1] || ...
 Field<BigDecimal> cos()
          Get the cosine(field) function This renders the cos function where available: cos([this])
 Field<BigDecimal> cosh()
          Get the hyperbolic cosine function: cosh(field) This renders the cosh function where available: cosh([this]) ... or simulates it elsewhere using exp: (exp([this] * 2) + 1) / (exp([this] * 2))
 Field<BigDecimal> cot()
          Get the cotangent(field) function This renders the cot function where available: cot([this]) ... or simulates it elsewhere using sin and cos: cos([this]) / sin([this])
 Field<BigDecimal> coth()
          Get the hyperbolic cotangent function: coth(field) This is not supported by any RDBMS, but simulated using exp exp: (exp([this] * 2) + 1) / (exp([this] * 2) - 1)
 Field<Integer> count()
          Get the count(field) function
 Field<Integer> countDistinct()
          Get the count(distinct field) function
 WindowPartitionByStep<Integer> countOver()
          The count(field) over ([analytic clause]) function.
protected  Factory create()
          Internal convenience method
protected  Factory create(Configuration configuration)
          Internal convenience method
 boolean declaresFields()
          Subclasses may override this
 boolean declaresTables()
          Subclasses may override this
<Z> Field<Z>
decode(Field<T> search, Field<Z> result)
          Gets the Oracle-style DECODE(expression, search, result[, search , result]... [, default]) function
<Z> Field<Z>
decode(Field<T> search, Field<Z> result, Field<?>... more)
          Gets the Oracle-style DECODE(expression, search, result[, search , result]... [, default]) function Returns the dialect's equivalent to DECODE: Oracle DECODE Other dialects: CASE WHEN [this = search] THEN [result], [WHEN more...
<Z> Field<Z>
decode(T search, Z result)
          Gets the Oracle-style DECODE(expression, search, result[, search , result]... [, default]) function
<Z> Field<Z>
decode(T search, Z result, Object... more)
          Gets the Oracle-style DECODE(expression, search, result[, search , result]... [, default]) function
 Field<BigDecimal> deg()
          Calculate degrees from radians from this field This renders the degrees function where available: degrees([this]) ... or simulates it elsewhere: [this] * 180 / PI
 SortField<T> desc()
          Create a descending sort field from this field
 Field<T> div(Field<? extends Number> value)
          An arithmetic expression dividing this by value
 Field<T> div(Number value)
          An arithmetic expression dividing this by value
 Condition equal(Field<T> field)
          this = field
 Condition equal(Select<?> query)
          this = (Select
 Condition equal(T value)
          this = value
 Condition equalAll(Select<?> query)
          this = all (Select
 Condition equalAny(Select<?> query)
          this = any (Select
 boolean equals(Object that)
           
 Condition equalSome(Select<?> query)
          this = some (Select
 Field<BigDecimal> exp()
          Get the exp(field) function, taking this field as the power of e This renders the same on all dialects: exp([this])
 Field<Integer> extract(DatePart datePart)
          Get the extract(field, datePart) function This translates into any dialect
 org.jooq.impl.WindowFunction<T> firstValue()
          The first_value(field) over ([analytic clause]) function.
 Field<T> floor()
          Get the largest integer value not greater than [this] This renders the floor function where available: floor([this]) ... or simulates it elsewhere using round: round([this] - 0.499999999999999)
 List<Attachable> getAttachables()
          Subclasses may further override this method
Get the list of dependent Attachables This method is for JOOQ INTERNAL USE only.
protected  List<Attachable> getAttachables(Collection<? extends QueryPart> list)
          Internal convenience method
protected  List<Attachable> getAttachables(QueryPart... list)
          Internal convenience method
protected  List<Attachable> getAttachables(Store<?> store)
          Internal convenience method
 List<Object> getBindValues()
          Retrieve the bind values that will be bound by this QueryPart This method is exposed publicly in Query.getBindValues()
 String getCastTypeName()
          Deprecated. 
 Configuration getConfiguration()
          Get the underlying configuration
 DataType<T> getDataType()
          The type of this object (might not be dialect-specific)
 DataType<T> getDataType(Configuration configuration)
          The dialect-specific type of this object
 SQLDialect getDialect()
          Reproduce the SQL dialect this QueryPart was created with This method is for JOOQ INTERNAL USE only.
 String getName()
          The name of this query part
 String getSQL()
          Retrieve the SQL code rendered by this query part.
protected  SQLDataType<T> getSQLDataType()
           
 Class<? extends T> getType()
          The type of this object
 String getTypeName()
          Deprecated. 
 Condition greaterOrEqual(Field<T> field)
          this >= field
 Condition greaterOrEqual(Select<?> query)
          this >= (Select
 Condition greaterOrEqual(T value)
          this >= value
 Condition greaterOrEqualAll(Select<?> query)
          this >= all (Select
 Condition greaterOrEqualAny(Select<?> query)
          this >= any (Select
 Condition greaterOrEqualSome(Select<?> query)
          this >= some (Select
 Condition greaterThan(Field<T> field)
          this > field
 Condition greaterThan(Select<?> query)
          this > (Select
 Condition greaterThan(T value)
          this > value
 Condition greaterThanAll(Select<?> query)
          this > all (Select
 Condition greaterThanAny(Select<?> query)
          this > any (Select
 Condition greaterThanSome(Select<?> query)
          this > some (Select
 Field<T> greatest(Field<?>... others)
          Find the greatest among all values This function has no equivalent in Adaptive Server, Derby, SQL Server and Sybase SQL Anywhere.
 Field<T> greatest(T... others)
          Find the greatest among all values This function has no equivalent in Adaptive Server, Derby, SQL Server and Sybase SQL Anywhere.
 int hashCode()
           
 Condition in(Collection<T> values)
          this in (values...)
 Condition in(Field<?>... values)
          this in (values...)
 Condition in(Select<?> query)
          this in (select...)
 Condition in(T... values)
          this in (values...)
protected  AttachableInternal internal(Attachable part)
          Internal convenience method
protected  QueryPartInternal internal(QueryPart part)
          Internal convenience method
<I> I
internalAPI(Class<I> internalType)
          Adapt to an internal type assuming its functionality This is for JOOQ INTERNAL USE only.
 Condition isFalse()
          lcase(this) in ("0", "n", "no", "false", "off", "disabled")
 Condition isNotNull()
          this is not null
 Condition isNull()
          this is null
 boolean isNullLiteral()
          Subclasses may further override this method
Whether this field represents a null literal.
 Condition isTrue()
          lcase(this) in ("1", "y", "yes", "true", "on", "enabled")
 org.jooq.impl.WindowFunction<T> lag()
          The lag(field) over ([analytic clause]) function.
 org.jooq.impl.WindowFunction<T> lag(int offset)
          The lag(field, offset) over ([analytic clause]) function.
 org.jooq.impl.WindowFunction<T> lag(int offset, Field<T> defaultValue)
          The lag(field, offset, defaultValue) over ([analytic clause]) function.
 org.jooq.impl.WindowFunction<T> lag(int offset, T defaultValue)
          The lag(field, offset, defaultValue) over ([analytic clause]) function.
 org.jooq.impl.WindowFunction<T> lastValue()
          The last_value(field) over ([analytic clause]) function.
 org.jooq.impl.WindowFunction<T> lead()
          The lead(field) over ([analytic clause]) function.
 org.jooq.impl.WindowFunction<T> lead(int offset)
          The lead(field, offset) over ([analytic clause]) function.
 org.jooq.impl.WindowFunction<T> lead(int offset, Field<T> defaultValue)
          The lead(field, offset, defaultValue) over ([analytic clause]) function.
 org.jooq.impl.WindowFunction<T> lead(int offset, T defaultValue)
          The lead(field, offset, defaultValue) over ([analytic clause]) function.
 Field<T> least(Field<?>... others)
          Find the least among all values This function has no equivalent in Adaptive Server, Derby, SQL Server and Sybase SQL Anywhere.
 Field<T> least(T... others)
          Find the least among all values This function has no equivalent in Adaptive Server, Derby, SQL Server and Sybase SQL Anywhere.
 Field<Integer> length()
          Get the length of a VARCHAR type.
 Condition lessOrEqual(Field<T> field)
          this <= field
 Condition lessOrEqual(Select<?> query)
          this <= (Select
 Condition lessOrEqual(T value)
          this <= value
 Condition lessOrEqualAll(Select<?> query)
          this <= all (Select
 Condition lessOrEqualAny(Select<?> query)
          this <= any (Select
 Condition lessOrEqualSome(Select<?> query)
          this <= some (Select
 Condition lessOrEqualToAll(Select<?> query)
          Deprecated. 
 Condition lessOrEqualToAny(Select<?> query)
          Deprecated. 
 Condition lessOrEqualToSome(Select<?> query)
          Deprecated. 
 Condition lessThan(Field<T> field)
          this < field
 Condition lessThan(Select<?> query)
          this < (Select
 Condition lessThan(T value)
          this < value
 Condition lessThanAll(Select<?> query)
          this < all (Select
 Condition lessThanAny(Select<?> query)
          this < any (Select
 Condition lessThanSome(Select<?> query)
          this < some (Select
 Condition like(T value)
          this like value
 Field<BigDecimal> ln()
          Get the ln(field) function, taking the natural logarithm of this field This renders the ln or log function where available: ln([this]) or log([this])
 Field<BigDecimal> log(int base)
          Get the log(field, base) function This renders the log function where available: log([this]) ... or simulates it elsewhere (in most RDBMS) using the natural logarithm: ln([this]) / ln([base])
 Field<String> lower()
          Get the lower(field) function This renders the lower function in all dialects: lower([this])
 Field<String> lpad(Field<? extends Number> length)
          Get the lpad(field, length) function This renders the lpad function where available: lpad([this], [length]) ... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS: concat(repeat(' ', [length] - length([this])), [this])
 Field<String> lpad(Field<? extends Number> length, Field<String> c)
          Get the lpad(field, length, character) function This renders the lpad function where available: lpad([this], [length]) ... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS: concat(repeat([character], [length] - length([this])), [this])
 Field<String> lpad(int length)
          Get the lpad(field, length) function This renders the lpad function where available: lpad([this], [length]) ... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS: concat(repeat(' ', [length] - length([this])), [this])
 Field<String> lpad(int length, char c)
          Get the lpad(field, length, character) function This renders the lpad function where available: lpad([this], [length]) ... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS: concat(repeat([character], [length] - length([this])), [this])
 Field<String> ltrim()
          Get the ltrim(field) function This renders the ltrim function in all dialects: ltrim([this])
 Field<T> max()
          Get the max value over a field: max(field)
 WindowPartitionByStep<T> maxOver()
          The max(field) over ([analytic clause]) function.
 Field<BigDecimal> median()
          Get the median over a numeric field: median(field) This is known to be supported in any of these RDBMS: HSQLDB Oracle Sybase SQL Anywhere
 Field<T> min()
          Get the min value over a field: min(field)
 WindowPartitionByStep<T> minOver()
          The min(field) over ([analytic clause]) function.
 Field<T> mod(Field<? extends Number> value)
          An arithmetic expression getting the modulo of this divided by value This renders the modulo operation where available: [this] % [value] ... or the modulo function elsewhere: mod([this], [value])
 Field<T> mod(Number value)
          An arithmetic expression getting the modulo of this divided by value This renders the modulo operation where available: [this] % [value] ... or the modulo function elsewhere: mod([this], [value])
 Field<T> mul(Field<? extends Number> value)
          Don't allow any further overrides
 Field<T> mul(Number value)
          An arithmetic expression multiplying this with value
 Field<T> neg()
          Negate this field to get its negative value.
 Condition notEqual(Field<T> field)
          this !
 Condition notEqual(Select<?> query)
          this !
 Condition notEqual(T value)
          this !
 Condition notEqualAll(Select<?> query)
          this !
 Condition notEqualAny(Select<?> query)
          this !
 Condition notEqualSome(Select<?> query)
          this !
 Condition notIn(Collection<T> values)
          this not in (values...)
 Condition notIn(Field<?>... values)
          this not in (values...)
 Condition notIn(Select<?> query)
          this not in (select...)
 Condition notIn(T... values)
          this not in (values...)
 Condition notLike(T value)
          this not like value
 Field<T> nullif(Field<T> other)
          Gets the Oracle-style NULLIF(value, other) function Returns the dialect's equivalent to NULLIF: Oracle NULLIF
 Field<T> nullif(T other)
          Gets the Oracle-style NULLIF(value, other) function
 Field<T> nvl(Field<T> defaultValue)
          Gets the Oracle-style NVL(value, defaultValue) function Returns the dialect's equivalent to NVL: DB2
 Field<T> nvl(T defaultValue)
          Gets the Oracle-style NVL(value, defaultValue) function
<Z> Field<Z>
nvl2(Field<Z> valueIfNotNull, Field<Z> valueIfNull)
          Gets the Oracle-style NVL2(value, valueIfNotNull, valueIfNull) function Returns the dialect's equivalent to NVL2: Oracle NVL2 Other dialects: CASE WHEN [value] IS NULL THEN [valueIfNull] ELSE [valueIfNotNull] END
<Z> Field<Z>
nvl2(Z valueIfNotNull, Z valueIfNull)
          Gets the Oracle-style NVL2(value, valueIfNotNull, valueIfNull) function
 Field<Integer> octetLength()
          Get the octet_length(field) function This translates into any dialect
 Field<Integer> position(Field<String> search)
          Get the position(in, search) function This renders the position or any equivalent function: position([search] in [this]) or locate([this], [search]) or locate([search], [this]) or instr([this], [search]) or charindex([search], [this])
 Field<Integer> position(String search)
          Get the position(in, search) function This renders the position or any equivalent function: position([search] in [this]) or locate([this], [search]) or locate([search], [this]) or instr([this], [search]) or charindex([search], [this])
 Field<BigDecimal> power(Number exponent)
          Get the power(field, exponent) function This renders the power function where available: power([this], [exponent]) ... or simulates it elsewhere using ln and exp: exp(ln([this]) * [exponent])
 Field<BigDecimal> rad()
          Calculate radians from degrees from this field This renders the degrees function where available: degrees([this]) ... or simulates it elsewhere: [this] * PI / 180
 Field<String> repeat(Field<? extends Number> count)
          Get the repeat(field, count) function This renders the repeat or replicate function where available: repeat([this], [count]) or replicate([this], [count]) ... or simulates it elsewhere using rpad and length, which may be simulated as well, depending on the RDBMS: rpad([this], length([this]) * [count], [this])
 Field<String> repeat(Number count)
          Get the repeat(count) function This renders the repeat or replicate function where available: repeat([this], [count]) or replicate([this], [count]) ... or simulates it elsewhere using rpad and length, which may be simulated as well, depending on the RDBMS: rpad([this], length([this]) * [count], [this])
 Field<String> replace(Field<String> search)
          Get the replace(in, search) function This renders the replace or str_replace function where available: replace([this], [search]) or str_replace([this], [search]) ... or simulates it elsewhere using the three-argument replace function: replace([this], [search], '')
 Field<String> replace(Field<String> search, Field<String> replace)
          Get the replace(in, search, replace) function This renders the replace or str_replace function: replace([this], [search]) or str_replace([this], [search])
 Field<String> replace(String search)
          Get the replace(in, search) function This renders the replace or str_replace function where available: replace([this], [search]) or str_replace([this], [search]) ... or simulates it elsewhere using the three-argument replace function: replace([this], [search], '')
 Field<String> replace(String search, String replace)
          Get the replace(in, search, replace) function This renders the replace or str_replace function: replace([this], [search]) or str_replace([this], [search])
 Field<T> round()
          Get rounded value of a numeric field: round(field) This renders the round function where available: round([this]) or round([this], 0) ... or simulates it elsewhere using floor and ceil
 Field<T> round(int decimals)
          Get rounded value of a numeric field: round(field, decimals) This renders the round function where available: round([this], [decimals]) ... or simulates it elsewhere using floor and ceil
 Field<String> rpad(Field<? extends Number> length)
          Get the rpad(field, length) function This renders the rpad function where available: rpad([this], [length]) ... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS: concat([this], repeat(' ', [length] - length([this])))
 Field<String> rpad(Field<? extends Number> length, Field<String> c)
          Get the rpad(field, length, character) function This renders the rpad function where available: rpad([this], [length]) ... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS: concat([this], repeat([character], [length] - length([this])))
 Field<String> rpad(int length)
          Get the rpad(field, length) function This renders the rpad function where available: rpad([this], [length]) ... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS: concat([this], repeat(' ', [length] - length([this])))
 Field<String> rpad(int length, char c)
          Get the rpad(field, length, character) function This renders the rpad function where available: rpad([this], [length]) ... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS: concat([this], repeat([character], [length] - length([this])))
 Field<String> rtrim()
          Get the rtrim(field) function This renders the rtrim function in all dialects: rtrim([this])
 Field<Integer> sign()
          Get the sign of a numeric field: sign(field) This renders the sign function where available: sign([this]) ... or simulates it elsewhere (without bind variables on values -1, 0, 1): CASE WHEN [this] > 0 THEN 1 WHEN [this] < 0 THEN -1 ELSE 0 END
 Field<BigDecimal> sin()
          Get the sine(field) function This renders the sin function where available: sin([this])
 Field<BigDecimal> sinh()
          Get the hyperbolic sine function: sinh(field) This renders the sinh function where available: sinh([this]) ... or simulates it elsewhere using exp: (exp([this] * 2) - 1) / (exp([this] * 2))
<Z> SortField<Z>
sort(Map<T,Z> sortMap)
          Create a sort field of the form (in pseudo code) CASE [this] WHEN [sortMap.key(0)] THEN sortMap.value(0) WHEN [sortMap.key(1)] THEN sortMap.value(1) ...
 SortField<Integer> sortAsc(Collection<T> sortList)
          Create a sort field of the form CASE [this] WHEN [sortList.get(0)] THEN 0 WHEN [sortList.get(1)] THEN 1 ...
 SortField<Integer> sortAsc(T... sortList)
          Create a sort field of the form CASE [this] WHEN [sortList[0]] THEN 0 WHEN [sortList[1]] THEN 1 ...
 SortField<Integer> sortDesc(Collection<T> sortList)
          Create a sort field of the form CASE [this] WHEN [sortList.get(0)] THEN 0 WHEN [sortList.get(1)] THEN 1 ...
 SortField<Integer> sortDesc(T... sortList)
          Create a sort field of the form CASE [this] WHEN [sortList[0]] THEN 0 WHEN [sortList[1]] THEN 1 ...
 Field<BigDecimal> sqrt()
          Get the sqrt(field) function This renders the sqrt function where available: sqrt([this]) ... or simulates it elsewhere using power (which in turn may also be simulated using ln and exp functions): power([this], 0.5)
 Field<BigDecimal> stddevPop()
          Get the population standard deviation of a numeric field: stddev_pop(field) This is known to be supported in any of these RDBMS: DB2 H2 HSQLDB Ingres MySQL Oracle Postgres SQL Server (stdev) Sybase ASE Sybase SQL Anywhere
 WindowPartitionByStep<BigDecimal> stddevPopOver()
          The stddev_pop(field) over ([analytic clause]) function.
 Field<BigDecimal> stddevSamp()
          Get the sample standard deviation of a numeric field: stddev_samp(field) This is known to be supported in any of these RDBMS: DB2 H2 HSQLDB Ingres MySQL Oracle Postgres SQL Server (stdev) Sybase ASE Sybase SQL Anywhere
 WindowPartitionByStep<BigDecimal> stddevSampOver()
          The stddev_samp(field) over ([analytic clause]) function.
 Field<T> sub(Field<? extends Number> value)
          An arithmetic expression subtracting value from this
 Field<T> sub(Number value)
          An arithmetic expression subtracting value from this.
 Field<String> substring(Field<? extends Number> startingPosition)
          Get the substring(field, startingPosition) function This renders the substr or substring function: substr([this], [startingPosition]) or substring([this], [startingPosition])
 Field<String> substring(Field<? extends Number> startingPosition, Field<? extends Number> length)
          Get the substring(field, startingPosition, length) function This renders the substr or substring function: substr([this], [startingPosition], [length]) or substring([this], [startingPosition], [length])
 Field<String> substring(int startingPosition)
          Get the substring(field, startingPosition) function This renders the substr or substring function: substr([this], [startingPosition]) or substring([this], [startingPosition])
 Field<String> substring(int startingPosition, int length)
          Get the substring(field, startingPosition, length) function This renders the substr or substring function: substr([this], [startingPosition], [length]) or substring([this], [startingPosition], [length])
 Field<BigDecimal> sum()
          Get the sum over a numeric field: sum(field)
 WindowPartitionByStep<BigDecimal> sumOver()
          The sum(field) over ([analytic clause]) function.
 Field<BigDecimal> tan()
          Get the tangent(field) function This renders the tan function where available: tan([this])
 Field<BigDecimal> tanh()
          Get the hyperbolic tangent function: tanh(field) This renders the tanh function where available: tanh([this]) ... or simulates it elsewhere using exp: (exp([this] * 2) - 1) / (exp([this] * 2) + 1)
abstract  void toSQL(RenderContext context)
          Render this QueryPart to a SQL string contained in context.sql().
 String toSQLDeclaration(Configuration configuration)
          Deprecated. 
 String toSQLDeclaration(Configuration configuration, boolean inlineParameters)
          Deprecated. 
 String toSQLReference(Configuration configuration)
          Deprecated. 
 String toSQLReference(Configuration configuration, boolean inlineParameters)
          Deprecated. 
 String toString()
           
 Field<String> trim()
          Get the trim(field) function This renders the trim function where available: trim([this]) ... or simulates it elsewhere using rtrim and ltrim: ltrim(rtrim([this]))
 Field<String> upper()
          Get the upper(field) function This renders the upper function in all dialects: upper([this])
 Field<BigDecimal> varPop()
          Get the population variance of a numeric field: var_pop(field) This is known to be supported in any of these RDBMS: DB2 H2 HSQLDB Ingres MySQL Oracle Postgres SQL Server (stdev) Sybase ASE Sybase SQL Anywhere
 WindowPartitionByStep<BigDecimal> varPopOver()
          The var_pop(field) over ([analytic clause]) function.
 Field<BigDecimal> varSamp()
          Get the sample variance of a numeric field: var_samp(field) This is known to be supported in any of these RDBMS: H2 HSQLDB Ingres MySQL Oracle Postgres SQL Server (var) Sybase SQL Anywhere
 WindowPartitionByStep<BigDecimal> varSampOver()
          The var_samp(field) over ([analytic clause]) function.
protected  String wrapInParentheses(String sql)
          Wrap a piece of SQL code in parentheses, if not wrapped already
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jooq.Field
equals, getName, getType
 
Methods inherited from interface org.jooq.NamedTypeProviderQueryPart
getCastTypeName, getDataType, getDataType, getTypeName
 
Methods inherited from interface org.jooq.QueryPart
getSQL
 
Methods inherited from interface org.jooq.Attachable
attach
 
Methods inherited from interface org.jooq.Adapter
internalAPI
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

CustomField

protected CustomField(String name,
                      DataType<T> type)
Method Detail

as

public final Field<T> as(String alias)
Don't allow any further overrides

Specified by:
as in interface AliasProvider<Field<T>>
Specified by:
as in interface Field<T>
Parameters:
alias - The alias name
Returns:
The field alias

add

public final Field<T> add(Field<? extends Number> value)
Don't allow any further overrides

Specified by:
add in interface Field<T>

mul

public final Field<T> mul(Field<? extends Number> value)
Don't allow any further overrides

Specified by:
mul in interface Field<T>

isNullLiteral

public boolean isNullLiteral()
Subclasses may further override this method
Whether this field represents a null literal.

This method is for JOOQ INTERNAL USE only!

This method was added to be able to recognise null literals within jOOQ and handle them specially, as some SQL dialects have a rather un-intuitive way of handling null values.

Specified by:
isNullLiteral in interface Field<T>

getAttachables

public List<Attachable> getAttachables()
Subclasses may further override this method
Get the list of dependent Attachables

This method is for JOOQ INTERNAL USE only. Do not reference directly


toSQL

public abstract void toSQL(RenderContext context)
Description copied from interface: QueryPartInternal
Render this QueryPart to a SQL string contained in context.sql(). The context will contain additional information about how to render this QueryPart, e.g. whether this QueryPart should be rendered as a declaration or reference, whether this QueryPart's contained bind variables should be inlined or replaced by '?', etc.

Specified by:
toSQL in interface QueryPartInternal

bind

public abstract void bind(BindContext context)
                   throws SQLException
Description copied from interface: QueryPartInternal
Bind all parameters of this QueryPart to a PreparedStatement

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
bind in interface QueryPartInternal
Parameters:
context - The context holding the next bind index and other information for variable binding
Throws:
SQLException

cast

public final <Z> Field<Z> cast(Field<Z> field)
Description copied from interface: Field
Cast this field to the type of another field.

This results in the same as casting this field to NamedTypeProviderQueryPart.getCastTypeName()

Specified by:
cast in interface Field<T>
Type Parameters:
Z - The generic type of the cast field
Parameters:
field - The field whose type is used for the cast
Returns:
The cast field
See Also:
Field.cast(DataType)

cast

public final <Z> Field<Z> cast(DataType<Z> type)
Description copied from interface: Field
Cast this field to a dialect-specific data type.

Specified by:
cast in interface Field<T>
Type Parameters:
Z - The generic type of the cast field

cast

public final <Z> Field<Z> cast(Class<? extends Z> type)
Description copied from interface: Field
Cast this field to another type

The actual cast may not be accurate as the DataType has to be "guessed" from the jOOQ-configured data types. Use Field.cast(DataType) for more accurate casts.

Specified by:
cast in interface Field<T>
Type Parameters:
Z - The generic type of the cast field
Parameters:
type - The type that is used for the cast
Returns:
The cast field
See Also:
Field.cast(DataType)

asc

public final SortField<T> asc()
Description copied from interface: Field
Create an ascending sort field from this field

Specified by:
asc in interface Field<T>
Returns:
This field as an ascending sort field

desc

public final SortField<T> desc()
Description copied from interface: Field
Create a descending sort field from this field

Specified by:
desc in interface Field<T>
Returns:
This field as a descending sort field

sortAsc

public final SortField<Integer> sortAsc(Collection<T> sortList)
Description copied from interface: Field
Create a sort field of the form
 CASE [this] WHEN [sortList.get(0)] THEN 0
             WHEN [sortList.get(1)] THEN 1
             ...
             WHEN [sortList.get(n)] THEN n
                                    ELSE null
 END ASC
 

Note: You can use this in combination with SortField.nullsFirst() or SortField.nullsLast() to specify whether the default should have highest or lowest priority.

Specified by:
sortAsc in interface Field<T>
Parameters:
sortList - The list containing sort value preferences
Returns:
The sort field

sortAsc

public final SortField<Integer> sortAsc(T... sortList)
Description copied from interface: Field
Create a sort field of the form
 CASE [this] WHEN [sortList[0]] THEN 0
             WHEN [sortList[1]] THEN 1
             ...
             WHEN [sortList[n]] THEN n
                                ELSE null
 END ASC
 

Note: You can use this in combination with SortField.nullsFirst() or SortField.nullsLast() to specify whether the default should have highest or lowest priority.

Specified by:
sortAsc in interface Field<T>
Parameters:
sortList - The list containing sort value preferences
Returns:
The sort field

sortDesc

public final SortField<Integer> sortDesc(Collection<T> sortList)
Description copied from interface: Field
Create a sort field of the form
 CASE [this] WHEN [sortList.get(0)] THEN 0
             WHEN [sortList.get(1)] THEN 1
             ...
             WHEN [sortList.get(n)] THEN n
                                    ELSE null
 END DESC
 

Note: You can use this in combination with SortField.nullsFirst() or SortField.nullsLast() to specify whether the default should have highest or lowest priority.

Specified by:
sortDesc in interface Field<T>
Parameters:
sortList - The list containing sort value preferences
Returns:
The sort field

sortDesc

public final SortField<Integer> sortDesc(T... sortList)
Description copied from interface: Field
Create a sort field of the form
 CASE [this] WHEN [sortList[0]] THEN 0
             WHEN [sortList[1]] THEN 1
             ...
             WHEN [sortList[n]] THEN n
                                    ELSE null
 END DESC
 

Note: You can use this in combination with SortField.nullsFirst() or SortField.nullsLast() to specify whether the default should have highest or lowest priority.

Specified by:
sortDesc in interface Field<T>
Parameters:
sortList - The list containing sort value preferences
Returns:
The sort field

sort

public final <Z> SortField<Z> sort(Map<T,Z> sortMap)
Description copied from interface: Field
Create a sort field of the form (in pseudo code)
 CASE [this] WHEN [sortMap.key(0)] THEN sortMap.value(0)
             WHEN [sortMap.key(1)] THEN sortMap.value(1)
             ...
             WHEN [sortMap.key(n)] THEN sortMap.value(n)
                                   ELSE null
 END DESC
 

Note: You can use this in combination with SortField.nullsFirst() or SortField.nullsLast() to specify whether the default should have highest or lowest priority.

Specified by:
sort in interface Field<T>
Parameters:
sortMap - The list containing sort value preferences
Returns:
The sort field

neg

public final Field<T> neg()
Description copied from interface: Field
Negate this field to get its negative value.

This renders the same on all dialects:

-[this]

Specified by:
neg in interface Field<T>

add

public final Field<T> add(Number value)
Description copied from interface: Field
An arithmetic expression adding this to value.

Specified by:
add in interface Field<T>

sub

public final Field<T> sub(Number value)
Description copied from interface: Field
An arithmetic expression subtracting value from this.

Specified by:
sub in interface Field<T>

sub

public final Field<T> sub(Field<? extends Number> value)
Description copied from interface: Field
An arithmetic expression subtracting value from this

Specified by:
sub in interface Field<T>

mul

public final Field<T> mul(Number value)
Description copied from interface: Field
An arithmetic expression multiplying this with value

Specified by:
mul in interface Field<T>

div

public final Field<T> div(Number value)
Description copied from interface: Field
An arithmetic expression dividing this by value

Specified by:
div in interface Field<T>

div

public final Field<T> div(Field<? extends Number> value)
Description copied from interface: Field
An arithmetic expression dividing this by value

Specified by:
div in interface Field<T>

mod

public final Field<T> mod(Number value)
Description copied from interface: Field
An arithmetic expression getting the modulo of this divided by value

This renders the modulo operation where available:

[this] % [value]
... or the modulo function elsewhere:
mod([this], [value])

Specified by:
mod in interface Field<T>

mod

public final Field<T> mod(Field<? extends Number> value)
Description copied from interface: Field
An arithmetic expression getting the modulo of this divided by value

This renders the modulo operation where available:

[this] % [value]
... or the modulo function elsewhere:
mod([this], [value])

Specified by:
mod in interface Field<T>

countOver

public final WindowPartitionByStep<Integer> countOver()
Description copied from interface: Field
The count(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
countOver in interface Field<T>

maxOver

public final WindowPartitionByStep<T> maxOver()
Description copied from interface: Field
The max(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
maxOver in interface Field<T>

minOver

public final WindowPartitionByStep<T> minOver()
Description copied from interface: Field
The min(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
minOver in interface Field<T>

sumOver

public final WindowPartitionByStep<BigDecimal> sumOver()
Description copied from interface: Field
The sum(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
sumOver in interface Field<T>

avgOver

public final WindowPartitionByStep<BigDecimal> avgOver()
Description copied from interface: Field
The avg(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
avgOver in interface Field<T>

firstValue

public final org.jooq.impl.WindowFunction<T> firstValue()
Description copied from interface: Field
The first_value(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
firstValue in interface Field<T>

lastValue

public final org.jooq.impl.WindowFunction<T> lastValue()
Description copied from interface: Field
The last_value(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
lastValue in interface Field<T>

lead

public final org.jooq.impl.WindowFunction<T> lead()
Description copied from interface: Field
The lead(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
lead in interface Field<T>

lead

public final org.jooq.impl.WindowFunction<T> lead(int offset)
Description copied from interface: Field
The lead(field, offset) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
lead in interface Field<T>

lead

public final org.jooq.impl.WindowFunction<T> lead(int offset,
                                                  T defaultValue)
Description copied from interface: Field
The lead(field, offset, defaultValue) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
lead in interface Field<T>

lead

public final org.jooq.impl.WindowFunction<T> lead(int offset,
                                                  Field<T> defaultValue)
Description copied from interface: Field
The lead(field, offset, defaultValue) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
lead in interface Field<T>

lag

public final org.jooq.impl.WindowFunction<T> lag()
Description copied from interface: Field
The lag(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
lag in interface Field<T>

lag

public final org.jooq.impl.WindowFunction<T> lag(int offset)
Description copied from interface: Field
The lag(field, offset) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
lag in interface Field<T>

lag

public final org.jooq.impl.WindowFunction<T> lag(int offset,
                                                 T defaultValue)
Description copied from interface: Field
The lag(field, offset, defaultValue) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
lag in interface Field<T>

lag

public final org.jooq.impl.WindowFunction<T> lag(int offset,
                                                 Field<T> defaultValue)
Description copied from interface: Field
The lag(field, offset, defaultValue) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
lag in interface Field<T>

stddevPopOver

public final WindowPartitionByStep<BigDecimal> stddevPopOver()
Description copied from interface: Field
The stddev_pop(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
stddevPopOver in interface Field<T>

stddevSampOver

public final WindowPartitionByStep<BigDecimal> stddevSampOver()
Description copied from interface: Field
The stddev_samp(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
stddevSampOver in interface Field<T>

varPopOver

public final WindowPartitionByStep<BigDecimal> varPopOver()
Description copied from interface: Field
The var_pop(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
varPopOver in interface Field<T>

varSampOver

public final WindowPartitionByStep<BigDecimal> varSampOver()
Description copied from interface: Field
The var_samp(field) over ([analytic clause]) function.

Window functions are supported in DB2, Postgres, Oracle, SQL Server and Sybase.

Specified by:
varSampOver in interface Field<T>

count

public final Field<Integer> count()
Description copied from interface: Field
Get the count(field) function

Specified by:
count in interface Field<T>
See Also:
Factory.count()

countDistinct

public final Field<Integer> countDistinct()
Description copied from interface: Field
Get the count(distinct field) function

Specified by:
countDistinct in interface Field<T>
See Also:
Factory.count()

max

public final Field<T> max()
Description copied from interface: Field
Get the max value over a field: max(field)

Specified by:
max in interface Field<T>

min

public final Field<T> min()
Description copied from interface: Field
Get the min value over a field: min(field)

Specified by:
min in interface Field<T>

sum

public final Field<BigDecimal> sum()
Description copied from interface: Field
Get the sum over a numeric field: sum(field)

Specified by:
sum in interface Field<T>

avg

public final Field<BigDecimal> avg()
Description copied from interface: Field
Get the average over a numeric field: avg(field)

Specified by:
avg in interface Field<T>

median

public final Field<BigDecimal> median()
Description copied from interface: Field
Get the median over a numeric field: median(field)

This is known to be supported in any of these RDBMS:

Specified by:
median in interface Field<T>

stddevPop

public final Field<BigDecimal> stddevPop()
Description copied from interface: Field
Get the population standard deviation of a numeric field: stddev_pop(field)

This is known to be supported in any of these RDBMS:

Specified by:
stddevPop in interface Field<T>

stddevSamp

public final Field<BigDecimal> stddevSamp()
Description copied from interface: Field
Get the sample standard deviation of a numeric field: stddev_samp(field)

This is known to be supported in any of these RDBMS:

Specified by:
stddevSamp in interface Field<T>

varPop

public final Field<BigDecimal> varPop()
Description copied from interface: Field
Get the population variance of a numeric field: var_pop(field)

This is known to be supported in any of these RDBMS:

Specified by:
varPop in interface Field<T>

varSamp

public final Field<BigDecimal> varSamp()
Description copied from interface: Field
Get the sample variance of a numeric field: var_samp(field)

This is known to be supported in any of these RDBMS:

Specified by:
varSamp in interface Field<T>

sign

public final Field<Integer> sign()
Description copied from interface: Field
Get the sign of a numeric field: sign(field)

This renders the sign function where available:

sign([this])
... or simulates it elsewhere (without bind variables on values -1, 0, 1):
 CASE WHEN [this] > 0 THEN 1
      WHEN [this] < 0 THEN -1
      ELSE 0
 END

Specified by:
sign in interface Field<T>

abs

public final Field<T> abs()
Description copied from interface: Field
Get the absolute value of a numeric field: abs(field)

This renders the same on all dialects:

abs([this])

Specified by:
abs in interface Field<T>

round

public final Field<T> round()
Description copied from interface: Field
Get rounded value of a numeric field: round(field)

This renders the round function where available:

round([this]) or
 round([this], 0)
... or simulates it elsewhere using floor and ceil

Specified by:
round in interface Field<T>

round

public final Field<T> round(int decimals)
Description copied from interface: Field
Get rounded value of a numeric field: round(field, decimals)

This renders the round function where available:

round([this], [decimals])
... or simulates it elsewhere using floor and ceil

Specified by:
round in interface Field<T>

floor

public final Field<T> floor()
Description copied from interface: Field
Get the largest integer value not greater than [this]

This renders the floor function where available:

floor([this])
... or simulates it elsewhere using round:
round([this] - 0.499999999999999)

Specified by:
floor in interface Field<T>

ceil

public final Field<T> ceil()
Description copied from interface: Field
Get the smallest integer value not less than [this]

This renders the ceil or ceiling function where available:

ceil([this]) or
 ceiling([this])
... or simulates it elsewhere using round:
round([this] + 0.499999999999999)

Specified by:
ceil in interface Field<T>

greatest

public final Field<T> greatest(T... others)
Description copied from interface: Field
Find the greatest among all values

This function has no equivalent in Adaptive Server, Derby, SQL Server and Sybase SQL Anywhere. Its current simulation implementation has O(2^n) complexity and should be avoided for n > 5! Better implementation suggestions are very welcome.

Specified by:
greatest in interface Field<T>
See Also:
Field.greatest(Field...)

greatest

public final Field<T> greatest(Field<?>... others)
Description copied from interface: Field
Find the greatest among all values

This function has no equivalent in Adaptive Server, Derby, SQL Server and Sybase SQL Anywhere. Its current simulation implementation has O(2^n) complexity and should be avoided for n > 5! Better implementation suggestions are very welcome.

Specified by:
greatest in interface Field<T>

least

public final Field<T> least(T... others)
Description copied from interface: Field
Find the least among all values

This function has no equivalent in Adaptive Server, Derby, SQL Server and Sybase SQL Anywhere. Its current simulation implementation has O(2^n) complexity and should be avoided for n > 5! Better implementation suggestions are very welcome.

Specified by:
least in interface Field<T>
See Also:
Field.least(Field...)

least

public final Field<T> least(Field<?>... others)
Description copied from interface: Field
Find the least among all values

This function has no equivalent in Adaptive Server, Derby, SQL Server and Sybase SQL Anywhere. Its current simulation implementation has O(2^n) complexity and should be avoided for n > 5! Better implementation suggestions are very welcome.

Specified by:
least in interface Field<T>

sqrt

public final Field<BigDecimal> sqrt()
Description copied from interface: Field
Get the sqrt(field) function

This renders the sqrt function where available:

sqrt([this])
... or simulates it elsewhere using power (which in turn may also be simulated using ln and exp functions):
power([this], 0.5)

Specified by:
sqrt in interface Field<T>

exp

public final Field<BigDecimal> exp()
Description copied from interface: Field
Get the exp(field) function, taking this field as the power of e

This renders the same on all dialects:

exp([this])

Specified by:
exp in interface Field<T>

ln

public final Field<BigDecimal> ln()
Description copied from interface: Field
Get the ln(field) function, taking the natural logarithm of this field

This renders the ln or log function where available:

ln([this]) or
 log([this])

Specified by:
ln in interface Field<T>

log

public final Field<BigDecimal> log(int base)
Description copied from interface: Field
Get the log(field, base) function

This renders the log function where available:

log([this])
... or simulates it elsewhere (in most RDBMS) using the natural logarithm:
ln([this]) / ln([base])

Specified by:
log in interface Field<T>

power

public final Field<BigDecimal> power(Number exponent)
Description copied from interface: Field
Get the power(field, exponent) function

This renders the power function where available:

power([this], [exponent])
... or simulates it elsewhere using ln and exp:
exp(ln([this]) * [exponent])

Specified by:
power in interface Field<T>

acos

public final Field<BigDecimal> acos()
Description copied from interface: Field
Get the arc cosine(field) function

This renders the acos function where available:

acos([this])

Specified by:
acos in interface Field<T>

asin

public final Field<BigDecimal> asin()
Description copied from interface: Field
Get the arc sine(field) function

This renders the asin function where available:

asin([this])

Specified by:
asin in interface Field<T>

atan

public final Field<BigDecimal> atan()
Description copied from interface: Field
Get the arc tangent(field) function

This renders the atan function where available:

atan([this])

Specified by:
atan in interface Field<T>

atan2

public final Field<BigDecimal> atan2(Number y)
Description copied from interface: Field
Get the arc tangent 2(field, y) function

This renders the atan2 or atn2 function where available:

atan2([this]) or
 atn2([this])

Specified by:
atan2 in interface Field<T>

atan2

public final Field<BigDecimal> atan2(Field<? extends Number> y)
Description copied from interface: Field
Get the arc tangent 2(field, y) function

This renders the atan2 or atn2 function where available:

atan2([this]) or
 atn2([this])

Specified by:
atan2 in interface Field<T>

cos

public final Field<BigDecimal> cos()
Description copied from interface: Field
Get the cosine(field) function

This renders the cos function where available:

cos([this])

Specified by:
cos in interface Field<T>

sin

public final Field<BigDecimal> sin()
Description copied from interface: Field
Get the sine(field) function

This renders the sin function where available:

sin([this])

Specified by:
sin in interface Field<T>

tan

public final Field<BigDecimal> tan()
Description copied from interface: Field
Get the tangent(field) function

This renders the tan function where available:

tan([this])

Specified by:
tan in interface Field<T>

cot

public final Field<BigDecimal> cot()
Description copied from interface: Field
Get the cotangent(field) function

This renders the cot function where available:

cot([this])
... or simulates it elsewhere using sin and cos:
cos([this]) / sin([this])

Specified by:
cot in interface Field<T>

sinh

public final Field<BigDecimal> sinh()
Description copied from interface: Field
Get the hyperbolic sine function: sinh(field)

This renders the sinh function where available:

sinh([this])
... or simulates it elsewhere using exp:
(exp([this] * 2) - 1) / (exp([this] * 2))

Specified by:
sinh in interface Field<T>

cosh

public final Field<BigDecimal> cosh()
Description copied from interface: Field
Get the hyperbolic cosine function: cosh(field)

This renders the cosh function where available:

cosh([this])
... or simulates it elsewhere using exp:
(exp([this] * 2) + 1) / (exp([this] * 2))

Specified by:
cosh in interface Field<T>

tanh

public final Field<BigDecimal> tanh()
Description copied from interface: Field
Get the hyperbolic tangent function: tanh(field)

This renders the tanh function where available:

tanh([this])
... or simulates it elsewhere using exp:
(exp([this] * 2) - 1) / (exp([this] * 2) + 1)

Specified by:
tanh in interface Field<T>

coth

public final Field<BigDecimal> coth()
Description copied from interface: Field
Get the hyperbolic cotangent function: coth(field)

This is not supported by any RDBMS, but simulated using exp exp:

(exp([this] * 2) + 1) / (exp([this] * 2) - 1)

Specified by:
coth in interface Field<T>

deg

public final Field<BigDecimal> deg()
Description copied from interface: Field
Calculate degrees from radians from this field

This renders the degrees function where available:

degrees([this])
... or simulates it elsewhere:
[this] * 180 / PI

Specified by:
deg in interface Field<T>

rad

public final Field<BigDecimal> rad()
Description copied from interface: Field
Calculate radians from degrees from this field

This renders the degrees function where available:

degrees([this])
... or simulates it elsewhere:
[this] * PI / 180

Specified by:
rad in interface Field<T>

upper

public final Field<String> upper()
Description copied from interface: Field
Get the upper(field) function

This renders the upper function in all dialects:

upper([this])

Specified by:
upper in interface Field<T>

lower

public final Field<String> lower()
Description copied from interface: Field
Get the lower(field) function

This renders the lower function in all dialects:

lower([this])

Specified by:
lower in interface Field<T>

trim

public final Field<String> trim()
Description copied from interface: Field
Get the trim(field) function

This renders the trim function where available:

trim([this])
... or simulates it elsewhere using rtrim and ltrim:
ltrim(rtrim([this]))

Specified by:
trim in interface Field<T>

rtrim

public final Field<String> rtrim()
Description copied from interface: Field
Get the rtrim(field) function

This renders the rtrim function in all dialects:

rtrim([this])

Specified by:
rtrim in interface Field<T>

ltrim

public final Field<String> ltrim()
Description copied from interface: Field
Get the ltrim(field) function

This renders the ltrim function in all dialects:

ltrim([this])

Specified by:
ltrim in interface Field<T>

rpad

public final Field<String> rpad(Field<? extends Number> length)
Description copied from interface: Field
Get the rpad(field, length) function

This renders the rpad function where available:

rpad([this], [length])
... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS:
concat([this], repeat(' ', [length] - length([this])))

Specified by:
rpad in interface Field<T>

rpad

public final Field<String> rpad(int length)
Description copied from interface: Field
Get the rpad(field, length) function

This renders the rpad function where available:

rpad([this], [length])
... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS:
concat([this], repeat(' ', [length] - length([this])))

Specified by:
rpad in interface Field<T>

rpad

public final Field<String> rpad(Field<? extends Number> length,
                                Field<String> c)
Description copied from interface: Field
Get the rpad(field, length, character) function

This renders the rpad function where available:

rpad([this], [length])
... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS:
concat([this], repeat([character], [length] - length([this])))

Specified by:
rpad in interface Field<T>

rpad

public final Field<String> rpad(int length,
                                char c)
Description copied from interface: Field
Get the rpad(field, length, character) function

This renders the rpad function where available:

rpad([this], [length])
... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS:
concat([this], repeat([character], [length] - length([this])))

Specified by:
rpad in interface Field<T>

lpad

public final Field<String> lpad(Field<? extends Number> length)
Description copied from interface: Field
Get the lpad(field, length) function

This renders the lpad function where available:

lpad([this], [length])
... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS:
concat(repeat(' ', [length] - length([this])), [this])

Specified by:
lpad in interface Field<T>

lpad

public final Field<String> lpad(int length)
Description copied from interface: Field
Get the lpad(field, length) function

This renders the lpad function where available:

lpad([this], [length])
... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS:
concat(repeat(' ', [length] - length([this])), [this])

Specified by:
lpad in interface Field<T>

lpad

public final Field<String> lpad(Field<? extends Number> length,
                                Field<String> c)
Description copied from interface: Field
Get the lpad(field, length, character) function

This renders the lpad function where available:

lpad([this], [length])
... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS:
concat(repeat([character], [length] - length([this])), [this])

Specified by:
lpad in interface Field<T>

lpad

public final Field<String> lpad(int length,
                                char c)
Description copied from interface: Field
Get the lpad(field, length, character) function

This renders the lpad function where available:

lpad([this], [length])
... or simulates it elsewhere using concat, repeat, and length, which may be simulated as well, depending on the RDBMS:
concat(repeat([character], [length] - length([this])), [this])

Specified by:
lpad in interface Field<T>

repeat

public final Field<String> repeat(Number count)
Description copied from interface: Field
Get the repeat(count) function

This renders the repeat or replicate function where available:

repeat([this], [count]) or
 replicate([this], [count])
... or simulates it elsewhere using rpad and length, which may be simulated as well, depending on the RDBMS:
rpad([this], length([this]) * [count], [this])

Specified by:
repeat in interface Field<T>

repeat

public final Field<String> repeat(Field<? extends Number> count)
Description copied from interface: Field
Get the repeat(field, count) function

This renders the repeat or replicate function where available:

repeat([this], [count]) or
 replicate([this], [count])
... or simulates it elsewhere using rpad and length, which may be simulated as well, depending on the RDBMS:
rpad([this], length([this]) * [count], [this])

Specified by:
repeat in interface Field<T>

replace

public final Field<String> replace(Field<String> search)
Description copied from interface: Field
Get the replace(in, search) function

This renders the replace or str_replace function where available:

replace([this], [search]) or
 str_replace([this], [search])
... or simulates it elsewhere using the three-argument replace function:
replace([this], [search], '')

Specified by:
replace in interface Field<T>

replace

public final Field<String> replace(String search)
Description copied from interface: Field
Get the replace(in, search) function

This renders the replace or str_replace function where available:

replace([this], [search]) or
 str_replace([this], [search])
... or simulates it elsewhere using the three-argument replace function:
replace([this], [search], '')

Specified by:
replace in interface Field<T>

replace

public final Field<String> replace(Field<String> search,
                                   Field<String> replace)
Description copied from interface: Field
Get the replace(in, search, replace) function

This renders the replace or str_replace function:

replace([this], [search]) or
 str_replace([this], [search])

Specified by:
replace in interface Field<T>

replace

public final Field<String> replace(String search,
                                   String replace)
Description copied from interface: Field
Get the replace(in, search, replace) function

This renders the replace or str_replace function:

replace([this], [search]) or
 str_replace([this], [search])

Specified by:
replace in interface Field<T>

position

public final Field<Integer> position(String search)
                              throws SQLDialectNotSupportedException
Description copied from interface: Field
Get the position(in, search) function

This renders the position or any equivalent function:

position([search] in [this]) or
 locate([this], [search]) or
 locate([search], [this]) or
 instr([this], [search]) or
 charindex([search], [this])

Specified by:
position in interface Field<T>
Throws:
SQLDialectNotSupportedException

position

public final Field<Integer> position(Field<String> search)
                              throws SQLDialectNotSupportedException
Description copied from interface: Field
Get the position(in, search) function

This renders the position or any equivalent function:

position([search] in [this]) or
 locate([this], [search]) or
 locate([search], [this]) or
 instr([this], [search]) or
 charindex([search], [this])

Specified by:
position in interface Field<T>
Throws:
SQLDialectNotSupportedException

ascii

public final Field<Integer> ascii()
Description copied from interface: Field
Get the ascii(field) function

This renders the replace or str_replace function:

ascii([this])

Specified by:
ascii in interface Field<T>

concat

public final Field<String> concat(Field<?>... fields)
This default implementation is known to be overridden by Expression to generate neater expressions

Specified by:
concat in interface Field<T>

concat

public final Field<String> concat(String... values)
Description copied from interface: Field
Get the concat(value[, value, ...]) function

This creates this || fields[0] || fields[1] || ... as an expression, or concat(this, fields[0], fields[1], ...), depending on the dialect.

Specified by:
concat in interface Field<T>

substring

public final Field<String> substring(int startingPosition)
Description copied from interface: Field
Get the substring(field, startingPosition) function

This renders the substr or substring function:

substr([this], [startingPosition]) or
 substring([this], [startingPosition])

Specified by:
substring in interface Field<T>

substring

public final Field<String> substring(int startingPosition,
                                     int length)
Description copied from interface: Field
Get the substring(field, startingPosition, length) function

This renders the substr or substring function:

substr([this], [startingPosition], [length]) or
 substring([this], [startingPosition], [length])

Specified by:
substring in interface Field<T>

substring

public final Field<String> substring(Field<? extends Number> startingPosition)
Description copied from interface: Field
Get the substring(field, startingPosition) function

This renders the substr or substring function:

substr([this], [startingPosition]) or
 substring([this], [startingPosition])

Specified by:
substring in interface Field<T>

substring

public final Field<String> substring(Field<? extends Number> startingPosition,
                                     Field<? extends Number> length)
Description copied from interface: Field
Get the substring(field, startingPosition, length) function

This renders the substr or substring function:

substr([this], [startingPosition], [length]) or
 substring([this], [startingPosition], [length])

Specified by:
substring in interface Field<T>

length

public final Field<Integer> length()
Description copied from interface: Field
Get the length of a VARCHAR type. This is a synonym for Field.charLength()

Specified by:
length in interface Field<T>
See Also:
Field.charLength()

charLength

public final Field<Integer> charLength()
Description copied from interface: Field
Get the char_length(field) function

This translates into any dialect

Specified by:
charLength in interface Field<T>

bitLength

public final Field<Integer> bitLength()
Description copied from interface: Field
Get the bit_length(field) function

This translates into any dialect

Specified by:
bitLength in interface Field<T>

octetLength

public final Field<Integer> octetLength()
Description copied from interface: Field
Get the octet_length(field) function

This translates into any dialect

Specified by:
octetLength in interface Field<T>

extract

public final Field<Integer> extract(DatePart datePart)
Description copied from interface: Field
Get the extract(field, datePart) function

This translates into any dialect

Specified by:
extract in interface Field<T>

nvl

public final Field<T> nvl(Field<T> defaultValue)
Description copied from interface: Field
Gets the Oracle-style NVL(value, defaultValue) function

Returns the dialect's equivalent to NVL:

Specified by:
nvl in interface Field<T>

nvl

public final Field<T> nvl(T defaultValue)
Description copied from interface: Field
Gets the Oracle-style NVL(value, defaultValue) function

Specified by:
nvl in interface Field<T>
See Also:
Field.nvl(Field)

nvl2

public final <Z> Field<Z> nvl2(Field<Z> valueIfNotNull,
                               Field<Z> valueIfNull)
Description copied from interface: Field
Gets the Oracle-style NVL2(value, valueIfNotNull, valueIfNull) function

Returns the dialect's equivalent to NVL2:

Other dialects: CASE WHEN [value] IS NULL THEN [valueIfNull] ELSE [valueIfNotNull] END

Specified by:
nvl2 in interface Field<T>

nvl2

public final <Z> Field<Z> nvl2(Z valueIfNotNull,
                               Z valueIfNull)
Description copied from interface: Field
Gets the Oracle-style NVL2(value, valueIfNotNull, valueIfNull) function

Specified by:
nvl2 in interface Field<T>
See Also:
Field.nvl2(Field, Field)

nullif

public final Field<T> nullif(T other)
Description copied from interface: Field
Gets the Oracle-style NULLIF(value, other) function

Specified by:
nullif in interface Field<T>
See Also:
Field.nullif(Field)

nullif

public final Field<T> nullif(Field<T> other)
Description copied from interface: Field
Gets the Oracle-style NULLIF(value, other) function

Returns the dialect's equivalent to NULLIF:

Specified by:
nullif in interface Field<T>

decode

public final <Z> Field<Z> decode(T search,
                                 Z result)
Description copied from interface: Field
Gets the Oracle-style DECODE(expression, search, result[, search , result]... [, default]) function

Specified by:
decode in interface Field<T>
See Also:
Field.decode(Field, Field, Field[])

decode

public final <Z> Field<Z> decode(T search,
                                 Z result,
                                 Object... more)
Description copied from interface: Field
Gets the Oracle-style DECODE(expression, search, result[, search , result]... [, default]) function

Specified by:
decode in interface Field<T>
See Also:
Field.decode(Field, Field, Field[])

decode

public final <Z> Field<Z> decode(Field<T> search,
                                 Field<Z> result)
Description copied from interface: Field
Gets the Oracle-style DECODE(expression, search, result[, search , result]... [, default]) function

Specified by:
decode in interface Field<T>
See Also:
Field.decode(Field, Field, Field[])

decode

public final <Z> Field<Z> decode(Field<T> search,
                                 Field<Z> result,
                                 Field<?>... more)
Description copied from interface: Field
Gets the Oracle-style DECODE(expression, search, result[, search , result]... [, default]) function

Returns the dialect's equivalent to DECODE:

Other dialects:

 CASE WHEN [this = search] THEN [result],
     [WHEN more...         THEN more...]
     [ELSE more...]
 END
 

Specified by:
decode in interface Field<T>
Parameters:
search - the mandatory first search parameter
result - the mandatory first result parameter
more - the optional parameters. If more.length is even, then it is assumed that it contains more search/result pairs. If more.length is odd, then it is assumed that it contains more search/result pairs plus a default at the end.

coalesce

public final Field<T> coalesce(T option,
                               T... options)
Description copied from interface: Field
Gets the Oracle-style COALESCE(expr1, expr2, ... , exprn) function

Specified by:
coalesce in interface Field<T>
See Also:
Field.coalesce(Field, Field...)

coalesce

public final Field<T> coalesce(Field<T> option,
                               Field<?>... options)
Description copied from interface: Field
Gets the Oracle-style COALESCE(expr1, expr2, ... , exprn) function

Returns the dialect's equivalent to COALESCE:

Specified by:
coalesce in interface Field<T>

isNull

public final Condition isNull()
Description copied from interface: Field
this is null

Specified by:
isNull in interface Field<T>

isNotNull

public final Condition isNotNull()
Description copied from interface: Field
this is not null

Specified by:
isNotNull in interface Field<T>

isTrue

public final Condition isTrue()
Description copied from interface: Field
lcase(this) in ("1", "y", "yes", "true", "on", "enabled")

Specified by:
isTrue in interface Field<T>

isFalse

public final Condition isFalse()
Description copied from interface: Field
lcase(this) in ("0", "n", "no", "false", "off", "disabled")

Specified by:
isFalse in interface Field<T>

like

public final Condition like(T value)
Description copied from interface: Field
this like value

Specified by:
like in interface Field<T>

notLike

public final Condition notLike(T value)
Description copied from interface: Field
this not like value

Specified by:
notLike in interface Field<T>

in

public final Condition in(T... values)
Description copied from interface: Field
this in (values...)

Specified by:
in in interface Field<T>

in

public final Condition in(Field<?>... values)
Description copied from interface: Field
this in (values...)

Specified by:
in in interface Field<T>

in

public final Condition in(Collection<T> values)
Description copied from interface: Field
this in (values...)

Specified by:
in in interface Field<T>

in

public final Condition in(Select<?> query)
Description copied from interface: Field
this in (select...)

Specified by:
in in interface Field<T>

notIn

public final Condition notIn(T... values)
Description copied from interface: Field
this not in (values...)

Specified by:
notIn in interface Field<T>

notIn

public final Condition notIn(Field<?>... values)
Description copied from interface: Field
this not in (values...)

Specified by:
notIn in interface Field<T>

notIn

public final Condition notIn(Collection<T> values)
Description copied from interface: Field
this not in (values...)

Specified by:
notIn in interface Field<T>

notIn

public final Condition notIn(Select<?> query)
Description copied from interface: Field
this not in (select...)

Specified by:
notIn in interface Field<T>

between

public final Condition between(T minValue,
                               T maxValue)
Description copied from interface: Field
this between minValue and maxValue

Specified by:
between in interface Field<T>

between

public final Condition between(Field<T> minValue,
                               Field<T> maxValue)
Description copied from interface: Field
this between minValue and maxValue

Specified by:
between in interface Field<T>

equal

public final Condition equal(T value)
Description copied from interface: Field
this = value

Specified by:
equal in interface Field<T>

equal

public final Condition equal(Field<T> field)
Description copied from interface: Field
this = field

Specified by:
equal in interface Field<T>

equal

public final Condition equal(Select<?> query)
Description copied from interface: Field
this = (Select ...)

Specified by:
equal in interface Field<T>

equalAny

public final Condition equalAny(Select<?> query)
Description copied from interface: Field
this = any (Select ...)

Specified by:
equalAny in interface Field<T>

equalSome

public final Condition equalSome(Select<?> query)
Description copied from interface: Field
this = some (Select ...)

Specified by:
equalSome in interface Field<T>

equalAll

public final Condition equalAll(Select<?> query)
Description copied from interface: Field
this = all (Select ...)

Specified by:
equalAll in interface Field<T>

notEqual

public final Condition notEqual(T value)
Description copied from interface: Field
this != value

Specified by:
notEqual in interface Field<T>

notEqual

public final Condition notEqual(Field<T> field)
Description copied from interface: Field
this != field

Specified by:
notEqual in interface Field<T>

notEqual

public final Condition notEqual(Select<?> query)
Description copied from interface: Field
this != (Select ...)

Specified by:
notEqual in interface Field<T>

notEqualAny

public final Condition notEqualAny(Select<?> query)
Description copied from interface: Field
this != any (Select ...)

Specified by:
notEqualAny in interface Field<T>

notEqualSome

public final Condition notEqualSome(Select<?> query)
Description copied from interface: Field
this != some (Select ...)

Specified by:
notEqualSome in interface Field<T>

notEqualAll

public final Condition notEqualAll(Select<?> query)
Description copied from interface: Field
this != all (Select ...)

Specified by:
notEqualAll in interface Field<T>

lessThan

public final Condition lessThan(T value)
Description copied from interface: Field
this < value

Specified by:
lessThan in interface Field<T>

lessThan

public final Condition lessThan(Field<T> field)
Description copied from interface: Field
this < field

Specified by:
lessThan in interface Field<T>

lessThan

public final Condition lessThan(Select<?> query)
Description copied from interface: Field
this < (Select ...)

Specified by:
lessThan in interface Field<T>

lessThanAny

public final Condition lessThanAny(Select<?> query)
Description copied from interface: Field
this < any (Select ...)

Specified by:
lessThanAny in interface Field<T>

lessThanSome

public final Condition lessThanSome(Select<?> query)
Description copied from interface: Field
this < some (Select ...)

Specified by:
lessThanSome in interface Field<T>

lessThanAll

public final Condition lessThanAll(Select<?> query)
Description copied from interface: Field
this < all (Select ...)

Specified by:
lessThanAll in interface Field<T>

lessOrEqual

public final Condition lessOrEqual(T value)
Description copied from interface: Field
this <= value

Specified by:
lessOrEqual in interface Field<T>

lessOrEqual

public final Condition lessOrEqual(Field<T> field)
Description copied from interface: Field
this <= field

Specified by:
lessOrEqual in interface Field<T>

lessOrEqual

public final Condition lessOrEqual(Select<?> query)
Description copied from interface: Field
this <= (Select ...)

Specified by:
lessOrEqual in interface Field<T>

lessOrEqualAny

public final Condition lessOrEqualAny(Select<?> query)
Description copied from interface: Field
this <= any (Select ...)

Specified by:
lessOrEqualAny in interface Field<T>

lessOrEqualSome

public final Condition lessOrEqualSome(Select<?> query)
Description copied from interface: Field
this <= some (Select ...)

Specified by:
lessOrEqualSome in interface Field<T>

lessOrEqualAll

public final Condition lessOrEqualAll(Select<?> query)
Description copied from interface: Field
this <= all (Select ...)

Specified by:
lessOrEqualAll in interface Field<T>

lessOrEqualToAny

@Deprecated
public final Condition lessOrEqualToAny(Select<?> query)
Deprecated. 

Description copied from interface: Field
this <= any (Select ...)

Specified by:
lessOrEqualToAny in interface Field<T>

lessOrEqualToSome

@Deprecated
public final Condition lessOrEqualToSome(Select<?> query)
Deprecated. 

Description copied from interface: Field
this <= some (Select ...)

Specified by:
lessOrEqualToSome in interface Field<T>

lessOrEqualToAll

@Deprecated
public final Condition lessOrEqualToAll(Select<?> query)
Deprecated. 

Description copied from interface: Field
this <= all (Select ...)

Specified by:
lessOrEqualToAll in interface Field<T>

greaterThan

public final Condition greaterThan(T value)
Description copied from interface: Field
this > value

Specified by:
greaterThan in interface Field<T>

greaterThan

public final Condition greaterThan(Field<T> field)
Description copied from interface: Field
this > field

Specified by:
greaterThan in interface Field<T>

greaterThan

public final Condition greaterThan(Select<?> query)
Description copied from interface: Field
this > (Select ...)

Specified by:
greaterThan in interface Field<T>

greaterThanAny

public final Condition greaterThanAny(Select<?> query)
Description copied from interface: Field
this > any (Select ...)

Specified by:
greaterThanAny in interface Field<T>

greaterThanSome

public final Condition greaterThanSome(Select<?> query)
Description copied from interface: Field
this > some (Select ...)

Specified by:
greaterThanSome in interface Field<T>

greaterThanAll

public final Condition greaterThanAll(Select<?> query)
Description copied from interface: Field
this > all (Select ...)

Specified by:
greaterThanAll in interface Field<T>

greaterOrEqual

public final Condition greaterOrEqual(T value)
Description copied from interface: Field
this >= value

Specified by:
greaterOrEqual in interface Field<T>

greaterOrEqual

public final Condition greaterOrEqual(Field<T> field)
Description copied from interface: Field
this >= field

Specified by:
greaterOrEqual in interface Field<T>

greaterOrEqual

public final Condition greaterOrEqual(Select<?> query)
Description copied from interface: Field
this >= (Select ...)

Specified by:
greaterOrEqual in interface Field<T>

greaterOrEqualAny

public final Condition greaterOrEqualAny(Select<?> query)
Description copied from interface: Field
this >= any (Select ...)

Specified by:
greaterOrEqualAny in interface Field<T>

greaterOrEqualSome

public final Condition greaterOrEqualSome(Select<?> query)
Description copied from interface: Field
this >= some (Select ...)

Specified by:
greaterOrEqualSome in interface Field<T>

greaterOrEqualAll

public final Condition greaterOrEqualAll(Select<?> query)
Description copied from interface: Field
this >= all (Select ...)

Specified by:
greaterOrEqualAll in interface Field<T>

getDataType

public final DataType<T> getDataType()
Description copied from interface: NamedTypeProviderQueryPart
The type of this object (might not be dialect-specific)

Specified by:
getDataType in interface NamedTypeProviderQueryPart<T>

getSQLDataType

protected final SQLDataType<T> getSQLDataType()

getDataType

public final DataType<T> getDataType(Configuration configuration)
Description copied from interface: NamedTypeProviderQueryPart
The dialect-specific type of this object

Specified by:
getDataType in interface NamedTypeProviderQueryPart<T>

getType

public final Class<? extends T> getType()
Description copied from interface: NamedTypeProviderQueryPart
The type of this object

Specified by:
getType in interface NamedTypeProviderQueryPart<T>

getTypeName

@Deprecated
public final String getTypeName()
Deprecated. 

Description copied from interface: NamedTypeProviderQueryPart
The type name of this object (might not be dialect-specific)

Specified by:
getTypeName in interface NamedTypeProviderQueryPart<T>

getCastTypeName

@Deprecated
public final String getCastTypeName()
Deprecated. 

Description copied from interface: NamedTypeProviderQueryPart
The dialect-specific type name of this object, used for casts

Specified by:
getCastTypeName in interface NamedTypeProviderQueryPart<T>

getName

public final String getName()
Description copied from interface: NamedQueryPart
The name of this query part

Specified by:
getName in interface NamedQueryPart

compareTo

public final int compareTo(NamedQueryPart that)
Specified by:
compareTo in interface Comparable<NamedQueryPart>

internalAPI

public final <I> I internalAPI(Class<I> internalType)
Description copied from interface: Adapter
Adapt to an internal type assuming its functionality

This is for JOOQ INTERNAL USE only. If you need to access the internal API, these are the known possible interfaces:

Be aware though, that the internal API may change even between minor releases.

Specified by:
internalAPI in interface Adapter
Type Parameters:
I - The internal type's generic type parameter.
Parameters:
internalType - The internal type
Returns:
This object wrapped by or cast to an internal type

attach

public void attach(Configuration configuration)
By default, nothing is done on an attachment event. Subclasses may override this, however, in order to receive a connection when needed

Specified by:
attach in interface Attachable

getConfiguration

public final Configuration getConfiguration()
Description copied from interface: AttachableInternal
Get the underlying configuration

Specified by:
getConfiguration in interface AttachableInternal

getDialect

public final SQLDialect getDialect()
Description copied from interface: QueryPartInternal
Reproduce the SQL dialect this QueryPart was created with

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
getDialect in interface QueryPartInternal
Returns:
The SQL dialect

getSQL

public final String getSQL()
Description copied from interface: QueryPart
Retrieve the SQL code rendered by this query part.

Specified by:
getSQL in interface QueryPart

getBindValues

public final List<Object> getBindValues()
Description copied from interface: QueryPartInternal
Retrieve the bind values that will be bound by this QueryPart

This method is exposed publicly in Query.getBindValues()

Specified by:
getBindValues in interface QueryPartInternal

toSQLReference

@Deprecated
public final String toSQLReference(Configuration configuration)
Deprecated. 

Description copied from interface: QueryPartInternal
Transform this object into SQL, such that it can be used as a reference. This always results in calling toSQLReference(configuration, false)

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
toSQLReference in interface QueryPartInternal
Parameters:
configuration - The configuration overriding dialects and schemata
Returns:
SQL representation of this QueryPart
See Also:
QueryPartInternal.toSQLReference(Configuration, boolean)

toSQLReference

@Deprecated
public final String toSQLReference(Configuration configuration,
                                              boolean inlineParameters)
Deprecated. 

Description copied from interface: QueryPartInternal
Transform this object into SQL, such that it can be used as a reference.

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
toSQLReference in interface QueryPartInternal
Parameters:
configuration - The configuration overriding dialects and schemata
inlineParameters - if set to true, all parameters are inlined, not replaced by "?"
Returns:
SQL representation of this QueryPart

toSQLDeclaration

@Deprecated
public final String toSQLDeclaration(Configuration configuration)
Deprecated. 

Description copied from interface: QueryPartInternal
Transform this object into SQL, such that it can be used as a declaration. Usually, this is the same as calling toSQLReference(configuration, false)

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
toSQLDeclaration in interface QueryPartInternal
Parameters:
configuration - The configuration overriding dialects and schemata
Returns:
SQL representation of this QueryPart
See Also:
QueryPartInternal.toSQLDeclaration(Configuration, boolean)

toSQLDeclaration

@Deprecated
public final String toSQLDeclaration(Configuration configuration,
                                                boolean inlineParameters)
Deprecated. 

Description copied from interface: QueryPartInternal
Transform this object into SQL, such that it can be used as a declaration. Usually, this is the same as calling toSQLReference(Configuration, boolean)

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
toSQLDeclaration in interface QueryPartInternal
Parameters:
configuration - The configuration overriding dialects and schemata
inlineParameters - if set to true, all parameters are inlined, not replaced by "?"
Returns:
SQL representation of this QueryPart

bind

@Deprecated
public final int bind(Configuration configuration,
                                 PreparedStatement stmt)
               throws SQLException
Deprecated. 

Description copied from interface: QueryPartInternal
Bind all parameters of this QueryPart to a PreparedStatement. This always results in calling bind(configuration, stmt, 1)

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
bind in interface QueryPartInternal
Parameters:
configuration - The configuration overriding dialects and schemata
stmt - The statement to bind values to
Returns:
The index of the next binding variable
Throws:
SQLException
See Also:
QueryPartInternal.bind(Configuration, PreparedStatement, int)

bind

@Deprecated
public final int bind(Configuration configuration,
                                 PreparedStatement stmt,
                                 int initialIndex)
               throws SQLException
Deprecated. 

Description copied from interface: QueryPartInternal
Bind all parameters of this QueryPart to a PreparedStatement.

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
bind in interface QueryPartInternal
Parameters:
configuration - The configuration overriding dialects and schemata
stmt - The statement to bind values to
initialIndex - The index of the next binding variable
Returns:
The index of the next binding variable
Throws:
SQLException

bindReference

@Deprecated
public final int bindReference(Configuration configuration,
                                          PreparedStatement stmt)
                        throws SQLException
Deprecated. 

Description copied from interface: QueryPartInternal
Bind all parameters of this QueryPart to a PreparedStatement. This always results in calling bind(configuration, stmt, 1)

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
bindReference in interface QueryPartInternal
Parameters:
configuration - The configuration overriding dialects and schemata
stmt - The statement to bind values to
Returns:
The index of the next binding variable
Throws:
SQLException
See Also:
QueryPartInternal.bind(Configuration, PreparedStatement, int)

bindReference

@Deprecated
public final int bindReference(Configuration configuration,
                                          PreparedStatement stmt,
                                          int initialIndex)
                        throws SQLException
Deprecated. 

Description copied from interface: QueryPartInternal
Bind all parameters of this QueryPart to a PreparedStatement.

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
bindReference in interface QueryPartInternal
Parameters:
configuration - The configuration overriding dialects and schemata
stmt - The statement to bind values to
initialIndex - The index of the next binding variable
Returns:
The index of the next binding variable
Throws:
SQLException

bindDeclaration

@Deprecated
public final int bindDeclaration(Configuration configuration,
                                            PreparedStatement stmt)
                          throws SQLException
Deprecated. 

Description copied from interface: QueryPartInternal
Bind all parameters of this QueryPart to a PreparedStatement. This always results in calling bind(configuration, stmt, 1)

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
bindDeclaration in interface QueryPartInternal
Parameters:
configuration - The configuration overriding dialects and schemata
stmt - The statement to bind values to
Returns:
The index of the next binding variable
Throws:
SQLException
See Also:
QueryPartInternal.bind(Configuration, PreparedStatement, int)

bindDeclaration

@Deprecated
public final int bindDeclaration(Configuration configuration,
                                            PreparedStatement stmt,
                                            int initialIndex)
                          throws SQLException
Deprecated. 

Description copied from interface: QueryPartInternal
Bind all parameters of this QueryPart to a PreparedStatement.

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
bindDeclaration in interface QueryPartInternal
Parameters:
configuration - The configuration overriding dialects and schemata
stmt - The statement to bind values to
initialIndex - The index of the next binding variable
Returns:
The index of the next binding variable
Throws:
SQLException

declaresFields

public boolean declaresFields()
Subclasses may override this

Specified by:
declaresFields in interface QueryPartInternal

declaresTables

public boolean declaresTables()
Subclasses may override this

Specified by:
declaresTables in interface QueryPartInternal

equals

public boolean equals(Object that)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

wrapInParentheses

protected final String wrapInParentheses(String sql)
Wrap a piece of SQL code in parentheses, if not wrapped already


internal

protected final AttachableInternal internal(Attachable part)
Internal convenience method


internal

protected final QueryPartInternal internal(QueryPart part)
Internal convenience method


getAttachables

protected final List<Attachable> getAttachables(Collection<? extends QueryPart> list)
Internal convenience method


getAttachables

protected final List<Attachable> getAttachables(QueryPart... list)
Internal convenience method


getAttachables

protected final List<Attachable> getAttachables(Store<?> store)
Internal convenience method


create

protected final Factory create()
Internal convenience method


create

protected final Factory create(Configuration configuration)
Internal convenience method



Copyright © 2011. All Rights Reserved.