Class Column
- java.lang.Object
-
- de.aristaflow.adept2.model.logmanagement.Column
-
- All Implemented Interfaces:
Serializable
public class Column extends Object implements Serializable
Represents a column in the entry schema of a log in the log management facility, aka. log managerColumns 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 namesid
andrefId
may not be used because these identifiers are used internally.- Author:
- Patrick Schmidt
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description Column(String name, int sizeHint)
Constructs astring column
with the specified size.Column(String name, DataType dataType)
Constructs a newColumn
with the specified data type.Column(String name, Schema subSchema)
Constructs acomplex column
with the specified subschema.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
DataType
getDataType()
Returns the data type of this column.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 ornull
if the data type of this column is something else thanDataType.COMPLEX
.int
hashCode()
-
-
-
Constructor Detail
-
Column
public Column(String name, DataType dataType)
Constructs a newColumn
with the specified data type.There are separate constructors for
DataType.STRING
andDataType.COMPLEX
. This constructor cannot be used for these.- Parameters:
name
- the name of the columndataType
- the data type of the column
-
Column
public Column(String name, int sizeHint)
Constructs astring column
with the specified size.- Parameters:
name
- the name of the columnsizeHint
- the required number of characters
-
Column
public Column(String name, Schema subSchema)
Constructs acomplex column
with the specified subschema.- Parameters:
name
- the name of the columnsubSchema
- the subschema of the column
-
-
Method Detail
-
getName
public String getName()
Returns the name of this column.- Returns:
- the name of this column
-
getDataType
public DataType getDataType()
Returns the data type of this column.- Returns:
- the data type of this column
-
getSubSchema
public Schema getSubSchema()
Returns the subschema of this column ornull
if the data type of this column is something else thanDataType.COMPLEX
.- Returns:
- the subschema of this column or
null
-
getSizeHint
public int getSizeHint()
Returns the size hint for this column. Currently this value is only used forDataType.STRING
and indicates the required capacity when creating the required tables of a log.- Returns:
- the size hint of this column
-
-