public abstract class Converter<SrcType,DstType> extends Object
Modifier and Type | Field and Description |
---|---|
static Converter<Column,SqlObject> |
COLUMN_TO_OBJ
Converter which converts a Column to a ColumnObject.
|
static Converter<Object,SqlObject> |
COLUMN_VALUE_TO_OBJ
Converter which converts a column value object to a SqlObject using
toColumnSqlObject(Object) |
static Converter<Object,SqlObject> |
CUSTOM_COLUMN_TO_OBJ
Converter which converts a custom column object to a SqlObject using
toCustomColumnSqlObject(Object) |
static Converter<Object,SqlObject> |
CUSTOM_TABLE_DEF_TO_OBJ
Converter which converts a custom table def object to a SqlObject using
toCustomTableDefSqlObject(Object) |
static Converter<Object,Condition> |
CUSTOM_TO_CONDITION
Converter which converts an Object to a Condition using
toConditionObject(Object) |
static Converter<Object,SqlObject> |
CUSTOM_TO_CONSTRAINTCLAUSE
Converter which converts an Object to a SqlObject using
toCustomConstraintSqlObject(java.lang.Object) |
static Converter<Object,Expression> |
CUSTOM_TO_EXPRESSION
Converter which converts an Object to an Expression using
toExpressionObject(Object) |
static Converter<Object,SqlObject> |
CUSTOM_TO_OBJ
Converter which converts an Object to a CustomSql using
toCustomSqlObject(Object) |
static Converter<Object,Subquery> |
CUSTOM_TO_SUBQUERY
Converter which converts an Object to a Subquery using
toSubquery(java.lang.Object) |
static Converter<Object,SqlObject> |
TYPED_COLUMN_TO_OBJ
Converter which converts a Column to a TypedColumnObject or a value
object to a SqlObject using
toCustomSqlObject(Object) |
static Converter<Object,SqlObject> |
VALUE_TO_OBJ
Converter which converts a value object to a SqlObject using
toValueSqlObject(Object) |
Constructor and Description |
---|
Converter() |
Modifier and Type | Method and Description |
---|---|
abstract DstType |
convert(SrcType src)
Converts the given src object to a SqlObject of the expected type.
|
static SqlObject |
toColumnSqlObject(Column col)
Converts a Column to a SqlObject.
|
static SqlObject |
toColumnSqlObject(Column col,
String alias)
Converts a Column to a SqlObject with the given alias.
|
static SqlObject |
toColumnSqlObject(Object obj)
Converts a column Object to a SqlObject.
|
static SqlObject |
toColumnSqlObject(Object obj,
String alias)
Converts a column Object to a SqlObject with the given alias.
|
static Condition |
toConditionObject(Object obj)
Converts an Object to a Condition.
|
static SqlObject |
toConstraintSqlObject(Constraint constraint)
Converts a Constraint to a SqlObject.
|
static SqlObject |
toCustomColumnSqlObject(Object obj)
Converts a column Object to a SqlObject.
|
static SqlObject |
toCustomColumnSqlObject(Object obj,
String alias)
Converts a column Object to a SqlObject.
|
static SqlObject |
toCustomConstraintClause(Object obj)
Converts an constraint clause Object to a SqlObject.
|
static SqlObject |
toCustomConstraintSqlObject(Object obj)
Converts a constraint Object to a SqlObject for use in a constraint
clause..
|
static SqlObject |
toCustomFunctionSqlObject(Object obj)
Converts a function Object to a SqlObject.
|
static SqlObject |
toCustomIndexSqlObject(Object obj)
Converts a index Object to a SqlObject.
|
static SqlObject |
toCustomSqlObject(Object obj)
Converts an Object to a custom SqlObject.
|
static SqlObject |
toCustomSqlObject(Object obj,
String alias)
Converts an Object to a custom SqlObject.
|
static SqlObject |
toCustomTableDefSqlObject(Object table)
Converts a table Object to a SqlObject.
|
static SqlObject |
toCustomTableSqlObject(Object obj)
Converts a table Object to a SqlObject.
|
static SqlObject |
toCustomTypedColumnSqlObject(Object column)
Converts a column Object to a SqlObject.
|
static Expression |
toExpressionObject(Object obj)
Converts an Object to an Expression.
|
static SqlObject |
toFunctionSqlObject(Function function)
Converts a Function to a SqlObject.
|
static SqlObject |
toIndexSqlObject(Index index)
Converts a Index to a SqlObject.
|
static Subquery |
toSubquery(Object obj)
Converts an Object to a Subquery.
|
static SqlObject |
toTableDefSqlObject(Table table)
Converts a Table to a table definition SqlObject.
|
static SqlObject |
toTableSqlObject(Table table)
Converts a Table to a SqlObject.
|
static SqlObject |
toValueSqlObject(Object obj)
Converts a value Object to a SqlObject.
|
static SqlObject |
toValueSqlObject(Object obj,
String alias)
Converts a value Object to a SqlObject with the given alias.
|
public static final Converter<Object,SqlObject> CUSTOM_TO_OBJ
toCustomSqlObject(Object)
public static final Converter<Column,SqlObject> COLUMN_TO_OBJ
Conversions (in order):
Column
-> ColumnObject
null
-> SqlObject.NULL_VALUE
public static final Converter<Object,SqlObject> VALUE_TO_OBJ
toValueSqlObject(Object)
public static final Converter<Object,SqlObject> COLUMN_VALUE_TO_OBJ
toColumnSqlObject(Object)
public static final Converter<Object,SqlObject> CUSTOM_COLUMN_TO_OBJ
toCustomColumnSqlObject(Object)
public static final Converter<Object,Expression> CUSTOM_TO_EXPRESSION
toExpressionObject(Object)
public static final Converter<Object,Condition> CUSTOM_TO_CONDITION
toConditionObject(Object)
public static final Converter<Object,SqlObject> TYPED_COLUMN_TO_OBJ
toCustomSqlObject(Object)
public static final Converter<Object,Subquery> CUSTOM_TO_SUBQUERY
toSubquery(java.lang.Object)
public static final Converter<Object,SqlObject> CUSTOM_TO_CONSTRAINTCLAUSE
toCustomConstraintSqlObject(java.lang.Object)
public static final Converter<Object,SqlObject> CUSTOM_TABLE_DEF_TO_OBJ
toCustomTableDefSqlObject(Object)
public abstract DstType convert(SrcType src)
src
- object to be coercedpublic static SqlObject toColumnSqlObject(Column col)
Conversions (in order):
Column
-> ColumnObject
col
- object to coerce to a column SqlObjectpublic static SqlObject toColumnSqlObject(Column col, String alias)
Conversions (in order):
Column
-> ColumnObject
Result of previous conversion is wrapped as an AliasedObject
if
the given alias is non-null
.
col
- object to coerce to a column SqlObjectalias
- optional column alias for the objectpublic static SqlObject toTableSqlObject(Table table)
Conversions (in order):
Table
-> TableObject
table
- object to coerce to a table SqlObjectpublic static SqlObject toConstraintSqlObject(Constraint constraint)
Conversions (in order):
Constraint
-> ConstraintObject
constraint
- object to coerce to a constraint SqlObjectpublic static SqlObject toTableDefSqlObject(Table table)
Conversions (in order):
Table
-> TableDefObject
table
- object to coerce to a table SqlObjectpublic static SqlObject toIndexSqlObject(Index index)
Conversions (in order):
Index
-> IndexObject
index
- object to coerce to a index SqlObjectpublic static SqlObject toFunctionSqlObject(Function function)
Conversions (in order):
Function
-> FunctionObject
function
- object to coerce to a function SqlObjectpublic static SqlObject toColumnSqlObject(Object obj)
Conversions (in order):
Column
-> ColumnObject
null
-> SqlObject.NULL_VALUE
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
SqlObject
-> SqlObject
Object
-> ValueObject
obj
- object to coerce to a column SqlObjectpublic static SqlObject toColumnSqlObject(Object obj, String alias)
Conversions (in order):
Column
-> ColumnObject
null
-> SqlObject.NULL_VALUE
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
SqlObject
-> SqlObject
Object
-> ValueObject
Result of previous conversion is wrapped as an AliasedObject
if
the given alias is non-null
.
obj
- object to coerce to a column SqlObjectalias
- optional column alias for the objectpublic static SqlObject toCustomColumnSqlObject(Object obj)
Conversions (in order):
Column
-> ColumnObject
null
-> SqlObject.NULL_VALUE
SqlObject
-> SqlObject
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
Object
-> CustomSql
obj
- object to coerce to a custom column SqlObjectpublic static SqlObject toCustomColumnSqlObject(Object obj, String alias)
Conversions (in order):
Column
-> ColumnObject
null
-> SqlObject.NULL_VALUE
SqlObject
-> SqlObject
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
Object
-> CustomSql
obj
- object to coerce to a custom column SqlObjectalias
- optional column alias for the objectpublic static SqlObject toCustomTableSqlObject(Object obj)
Conversions (in order):
Table
-> TableObject
null
-> SqlObject.NULL_VALUE
SqlObject
-> SqlObject
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
Object
-> CustomSql
obj
- object to coerce to a custom table SqlObjectpublic static SqlObject toCustomConstraintSqlObject(Object obj)
Conversions (in order):
Constraint
-> ConstraintObject
null
-> null
ConstraintClause.Prefix
.
obj
- object to coerce to a custom constraint SqlObjectpublic static SqlObject toCustomIndexSqlObject(Object obj)
Conversions (in order):
Index
-> IndexObject
null
-> SqlObject.NULL_VALUE
SqlObject
-> SqlObject
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
Object
-> CustomSql
obj
- object to coerce to a custom index SqlObjectpublic static SqlObject toCustomFunctionSqlObject(Object obj)
Conversions (in order):
Function
-> FunctionObject
null
-> SqlObject.NULL_VALUE
SqlObject
-> SqlObject
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
Object
-> CustomSql
obj
- object to coerce to a custom function SqlObjectpublic static SqlObject toValueSqlObject(Object obj)
Conversions (in order):
null
-> SqlObject.NULL_VALUE
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
SqlObject
-> SqlObject
Object
-> ValueObject
obj
- object to coerce to a value SqlObjectpublic static SqlObject toValueSqlObject(Object obj, String alias)
Conversions (in order):
null
-> SqlObject.NULL_VALUE
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
SqlObject
-> SqlObject
Object
-> ValueObject
Result of previous conversion is wrapped as an AliasedObject
if
the given alias is non-null
.
obj
- object to coerce to a value SqlObjectalias
- optional column alias for the objectpublic static SqlObject toCustomSqlObject(Object obj)
Conversions (in order):
null
-> SqlObject.NULL_VALUE
SqlObject
-> SqlObject
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
Object
-> CustomSql
obj
- object to coerce to a custom SqlObjectpublic static SqlObject toCustomSqlObject(Object obj, String alias)
Conversions (in order):
null
-> SqlObject.NULL_VALUE
SqlObject
-> SqlObject
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
Object
-> CustomSql
Result of previous conversion is wrapped as an AliasedObject
if
the given alias is non-null
.
obj
- object to coerce to a custom SqlObjectalias
- optional column alias for the objectpublic static SqlObject toCustomTableDefSqlObject(Object table)
Conversions (in order):
Table
-> TableDefObject
null
-> SqlObject.NULL_VALUE
SqlObject
-> SqlObject
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
Object
-> CustomSql
table
- object to coerce to a table definition SqlObjectpublic static SqlObject toCustomTypedColumnSqlObject(Object column)
Conversions (in order):
Column
-> TypedColumnObject
null
-> SqlObject.NULL_VALUE
SqlObject
-> SqlObject
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
Object
-> CustomSql
column
- object to coerce to a typed column definition SqlObjectpublic static Expression toExpressionObject(Object obj)
Conversions (in order):
Expression
-> Expression
Column
-> ColumnObject
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
null
-> SqlObject.NULL_VALUE
CustomExpression
SqlObject
-> SqlObject
Object
-> ValueObject
obj
- object to coerce to an Expressionpublic static Condition toConditionObject(Object obj)
Conversions (in order):
Condition
-> Condition
CustomCondition
Column
-> ColumnObject
null
-> SqlObject.NULL_VALUE
SqlObject
-> SqlObject
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
Object
-> CustomSql
obj
- object to coerce to a Conditionpublic static Subquery toSubquery(Object obj)
obj
- object to coerce to a Subquerypublic static SqlObject toCustomConstraintClause(Object obj)
Conversions (in order):
Constraint
-> ConstraintClause
null
-> SqlObject.NULL_VALUE
SqlObject
-> SqlObject
Boolean
-> BooleanValueObject
Number
-> NumberValueObject
Object
-> CustomSql
obj
- object to coerce to a constraint clause SqlObjectCopyright © 2006–2021 OpenHMS. All rights reserved.