Class AdlSqlTypeDecorator
java.lang.Object
de.calamanari.adl.sql.AdlSqlTypeDecorator
- All Implemented Interfaces:
de.calamanari.adl.cnv.tps.AdlType, AdlSqlType, Serializable
Often an
AdlSqlTypes behavior will be common resp. applicable in many scenarios but we want to change the formatter or add a type caster. To avoid
creating boiler-plate code the AdlSqlTypeDecorator provides an easy solution by composition. A given type gets wrapped to adapt its behavior.- Author:
- Karl Eilebrecht
- See Also:
-
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AdlSqlType
isCompatibleWith, withFormatter, withFormatter, withNativeTypeCaster, withNativeTypeCaster, withQueryParameterApplicator, withQueryParameterApplicator, withQueryParameterCreator, withQueryParameterCreator
-
Method Details
-
getBaseType
- Specified by:
getBaseTypein interfaceAdlSqlType- Specified by:
getBaseTypein interfacede.calamanari.adl.cnv.tps.AdlType
-
name
- Specified by:
namein interfacede.calamanari.adl.cnv.tps.AdlType
-
getFormatter
public de.calamanari.adl.cnv.tps.ArgValueFormatter getFormatter()- Specified by:
getFormatterin interfacede.calamanari.adl.cnv.tps.AdlType
-
getNativeTypeCaster
public de.calamanari.adl.cnv.tps.NativeTypeCaster getNativeTypeCaster()- Specified by:
getNativeTypeCasterin interfacede.calamanari.adl.cnv.tps.AdlType
-
supportsContains
public boolean supportsContains()- Specified by:
supportsContainsin interfacede.calamanari.adl.cnv.tps.AdlType
-
supportsLessThanGreaterThan
public boolean supportsLessThanGreaterThan()- Specified by:
supportsLessThanGreaterThanin interfacede.calamanari.adl.cnv.tps.AdlType
-
getJavaSqlType
public int getJavaSqlType()- Specified by:
getJavaSqlTypein interfaceAdlSqlType- Returns:
- this is the underlying SQL-type for this type, see
Types(mainly for reference and debugging)
-
getQueryParameterCreator
- Specified by:
getQueryParameterCreatorin interfaceAdlSqlType- Returns:
- the component that can convert a given expression argument of any given
AdlTypeinto an SQL-query parameter compliant to this type. NOT NULL.
-
getQueryParameterApplicator
- Specified by:
getQueryParameterApplicatorin interfaceAdlSqlType- Returns:
- the component that can set a parameter (sql-value) on a statement, NOT NULL
-
toString
-