public class Column
extends java.lang.Object
implements java.io.Serializable
Columns may not contain an underscore _. Otherwise they may be legal
SQL identifiers, which may depend on the actual DBMS. So it's a good idea to
stick with the Latin alphabet and digits. Also the names id and
refId may not be used because these identifiers are used internally.
| Modifier and Type | Field and Description |
|---|---|
static Column |
ID_COLUMN
The ID column added to every log to identify the log entries.
|
static Column |
REF_COLUMN
The referenced ID column added to every subschema of a log to identify
parent log entry.
|
| Constructor and Description |
|---|
Column(java.lang.String name,
DataType dataType)
Constructs a new
Column with the specified data type. |
Column(java.lang.String name,
int sizeHint)
Constructs a
string column with the specified
size. |
Column(java.lang.String name,
Schema subSchema)
Constructs a
complex column with the specified
subschema. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
DataType |
getDataType()
Returns the data type of this column.
|
java.lang.String |
getName()
Returns the name of this column.
|
int |
getSizeHint()
Returns the size hint for this column.
|
Schema |
getSubSchema()
Returns the subschema of this column or
null if the data type of
this column is something else than DataType.COMPLEX. |
int |
hashCode() |
public static final Column ID_COLUMN
public static final Column REF_COLUMN
public Column(java.lang.String name,
DataType dataType)
Column with the specified data type.
There are separate constructors for DataType.STRING and
DataType.COMPLEX. This constructor cannot be used for these.
name - the name of the columndataType - the data type of the columnpublic Column(java.lang.String name,
int sizeHint)
string column with the specified
size.name - the name of the columnsizeHint - the required number of characterspublic Column(java.lang.String name,
Schema subSchema)
complex column with the specified
subschema.name - the name of the columnsubSchema - the subschema of the columnpublic java.lang.String getName()
public DataType getDataType()
public Schema getSubSchema()
null if the data type of
this column is something else than DataType.COMPLEX.nullpublic int getSizeHint()
DataType.STRING and indicates the required capacity when
creating the required tables of a log.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object