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 namesidandrefIdmay 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 ColumnID_COLUMNThe ID column added to every log to identify the log entries.static ColumnREF_COLUMNThe 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 columnwith the specified size.Column(String name, DataType dataType)Constructs a newColumnwith the specified data type.Column(String name, Schema subSchema)Constructs acomplex columnwith the specified subschema.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)DataTypegetDataType()Returns the data type of this column.StringgetName()Returns the name of this column.intgetSizeHint()Returns the size hint for this column.SchemagetSubSchema()Returns the subschema of this column ornullif the data type of this column is something else thanDataType.COMPLEX.inthashCode()
-
-
-
Constructor Detail
-
Column
public Column(String name, DataType dataType)
Constructs a newColumnwith the specified data type.There are separate constructors for
DataType.STRINGandDataType.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 columnwith the specified size.- Parameters:
name- the name of the columnsizeHint- the required number of characters
-
Column
public Column(String name, Schema subSchema)
Constructs acomplex columnwith 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 ornullif 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.STRINGand indicates the required capacity when creating the required tables of a log.- Returns:
- the size hint of this column
-
-