public class ColumnType extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ColumnType.WrappedId
Wraps a string that needs to be mapped to an id column in prepared statements.
|
Constructor and Description |
---|
ColumnType(ColumnSpec spec) |
ColumnType(ColumnSpec spec,
int length) |
ColumnType(ColumnSpec spec,
int length,
boolean array) |
Modifier and Type | Method and Description |
---|---|
static ColumnType |
fromField(Field field)
Gets the column type from a Nuxeo Schema field, including its constrained length if any.
|
static ColumnType |
fromFieldType(Type type)
Gets the column type from a Nuxeo Schema field type (unconstrained).
|
static ColumnType |
fromFieldType(Type type,
boolean array)
Gets the column type from a Nuxeo Schema field type (unconstrained) with array
true if an array type is
required |
protected static ColumnType |
fromFieldType(Type type,
int maxLength) |
protected static ColumnType |
fromFieldType(Type type,
int maxLength,
boolean array) |
boolean |
isArray() |
boolean |
isClob() |
boolean |
isId()
Checks if this column holds a Nuxeo unique id (usually UUID).
|
boolean |
isUnconstrained() |
String |
toString() |
public static final int CLOB_LENGTH
public static final ColumnType STRING
public static final ColumnType CLOB
public static final ColumnType BOOLEAN
public static final ColumnType LONG
public static final ColumnType DOUBLE
public static final ColumnType TIMESTAMP
public static final ColumnType BLOBID
public static final ColumnType ARRAY_STRING
public static final ColumnType ARRAY_CLOB
public static final ColumnType ARRAY_BOOLEAN
public static final ColumnType ARRAY_LONG
public static final ColumnType ARRAY_DOUBLE
public static final ColumnType ARRAY_TIMESTAMP
public static final ColumnType ARRAY_BLOBID
public static final ColumnType ARRAY_INTEGER
public static final ColumnType NODEID
public static final ColumnType NODEIDFK
public static final ColumnType NODEIDFKNP
public static final ColumnType NODEIDFKMUL
public static final ColumnType NODEIDFKNULL
public static final ColumnType NODEIDPK
public static final ColumnType NODEVAL
public static final ColumnType NODEARRAY
public static final ColumnType SYSNAME
public static final ColumnType SYSNAMEARRAY
public static final ColumnType TINYINT
public static final ColumnType INTEGER
public static final ColumnType AUTOINC
public static final ColumnType FTINDEXED
public static final ColumnType FTSTORED
public static final ColumnType CLUSTERNODE
public static final ColumnType CLUSTERFRAGS
public final ColumnSpec spec
public final int length
public final boolean array
public ColumnType(ColumnSpec spec, int length, boolean array)
public ColumnType(ColumnSpec spec, int length)
public ColumnType(ColumnSpec spec)
public boolean isUnconstrained()
public boolean isClob()
public boolean isArray()
public boolean isId()
public static ColumnType fromField(Field field)
public static ColumnType fromFieldType(Type type)
public static ColumnType fromFieldType(Type type, boolean array)
true
if an array type is
requiredprotected static ColumnType fromFieldType(Type type, int maxLength)
protected static ColumnType fromFieldType(Type type, int maxLength, boolean array)
Copyright © 2018 Nuxeo. All rights reserved.