Package org.nuxeo.ecm.core.storage.sql
Class ColumnType
- java.lang.Object
-
- org.nuxeo.ecm.core.storage.sql.ColumnType
-
- All Implemented Interfaces:
Serializable
public class ColumnType extends Object implements Serializable
The database-level column types, including per-type parameters like length.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classColumnType.WrappedIdWraps a string that needs to be mapped to an id column in prepared statements.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ColumnType(ColumnSpec spec)ColumnType(ColumnSpec spec, int length)ColumnType(ColumnSpec spec, int length, boolean array)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ColumnTypefromField(Field field)Gets the column type from a Nuxeo Schema field, including its constrained length if any.static ColumnTypefromFieldType(Type type)Gets the column type from a Nuxeo Schema field type (unconstrained).static ColumnTypefromFieldType(Type type, boolean array)Gets the column type from a Nuxeo Schema field type (unconstrained) with arraytrueif an array type is requiredprotected static ColumnTypefromFieldType(Type type, int maxLength)protected static ColumnTypefromFieldType(Type type, int maxLength, boolean array)booleanisArray()booleanisClob()booleanisId()Checks if this column holds a Nuxeo unique id (usually UUID).booleanisUnconstrained()StringtoString()
-
-
-
Field Detail
-
CLOB_LENGTH
public static final int CLOB_LENGTH
Length used internally to flag a string to use CLOB.- See Also:
- Constant Field Values
-
STRING
public static final ColumnType STRING
-
CLOB
public static final ColumnType CLOB
-
BOOLEAN
public static final ColumnType BOOLEAN
-
LONG
public static final ColumnType LONG
-
DOUBLE
public static final ColumnType DOUBLE
-
TIMESTAMP
public static final ColumnType TIMESTAMP
-
BLOBID
public static final ColumnType BLOBID
-
BLOB
public static final ColumnType BLOB
-
ARRAY_STRING
public static final ColumnType ARRAY_STRING
-
ARRAY_CLOB
public static final ColumnType ARRAY_CLOB
-
ARRAY_BOOLEAN
public static final ColumnType ARRAY_BOOLEAN
-
ARRAY_LONG
public static final ColumnType ARRAY_LONG
-
ARRAY_DOUBLE
public static final ColumnType ARRAY_DOUBLE
-
ARRAY_TIMESTAMP
public static final ColumnType ARRAY_TIMESTAMP
-
ARRAY_BLOBID
public static final ColumnType ARRAY_BLOBID
-
ARRAY_INTEGER
public static final ColumnType ARRAY_INTEGER
-
NODEID
public static final ColumnType NODEID
-
NODEIDFK
public static final ColumnType NODEIDFK
-
NODEIDFKNP
public static final ColumnType NODEIDFKNP
-
NODEIDFKMUL
public static final ColumnType NODEIDFKMUL
-
NODEIDFKNULL
public static final ColumnType NODEIDFKNULL
-
NODEIDPK
public static final ColumnType NODEIDPK
-
NODEVAL
public static final ColumnType NODEVAL
-
NODEARRAY
public static final ColumnType NODEARRAY
-
SYSNAME
public static final ColumnType SYSNAME
-
SYSNAMEARRAY
public static final ColumnType SYSNAMEARRAY
-
TINYINT
public static final ColumnType TINYINT
-
INTEGER
public static final ColumnType INTEGER
-
AUTOINC
public static final ColumnType AUTOINC
-
FTINDEXED
public static final ColumnType FTINDEXED
-
FTSTORED
public static final ColumnType FTSTORED
-
CLUSTERNODE
public static final ColumnType CLUSTERNODE
-
CLUSTERFRAGS
public static final ColumnType CLUSTERFRAGS
-
spec
public final ColumnSpec spec
-
length
public final int length
-
array
public final boolean array
-
-
Constructor Detail
-
ColumnType
public ColumnType(ColumnSpec spec, int length, boolean array)
-
ColumnType
public ColumnType(ColumnSpec spec, int length)
-
ColumnType
public ColumnType(ColumnSpec spec)
-
-
Method Detail
-
isUnconstrained
public boolean isUnconstrained()
-
isClob
public boolean isClob()
-
isArray
public boolean isArray()
-
isId
public boolean isId()
Checks if this column holds a Nuxeo unique id (usually UUID).
-
fromField
public static ColumnType fromField(Field field)
Gets the column type from a Nuxeo Schema field, including its constrained length if any.
-
fromFieldType
public static ColumnType fromFieldType(Type type)
Gets the column type from a Nuxeo Schema field type (unconstrained).
-
fromFieldType
public static ColumnType fromFieldType(Type type, boolean array)
Gets the column type from a Nuxeo Schema field type (unconstrained) with arraytrueif an array type is required
-
fromFieldType
protected static ColumnType fromFieldType(Type type, int maxLength)
-
fromFieldType
protected static ColumnType fromFieldType(Type type, int maxLength, boolean array)
-
-