public static final class Type.Column extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Type.Column.ColumnBaseType
An enumeration of base types for column (excluding
any property-related subtypes).
|
static class |
Type.Column.ColumnType
An enumeration of all the Kinetica column types (including
sub-types that are determined by the properties used).
|
Constructor and Description |
---|
Column(String name,
Class<?> type,
List<String> properties)
Creates a
Type.Column object with the specified metadata. |
Column(String name,
Class<?> type,
String... properties)
Creates a
Type.Column object with the specified metadata. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Type.Column.ColumnBaseType |
getColumnBaseType()
Gets the enumeration of the *base* type of the column.
|
Type.Column.ColumnType |
getColumnType()
Gets the enumeration of the type of the column.
|
String |
getName()
Gets the name of the column.
|
List<String> |
getProperties()
Gets the list of properties that apply to the column.
|
Class<?> |
getType()
Gets the Java data type of the column.
|
int |
hashCode() |
boolean |
hasProperty(String property)
Checks if the given property applies to the column.
|
boolean |
isNullable()
Gets whether the column is nullable.
|
String |
toString() |
public Column(String name, Class<?> type, String... properties)
Type.Column
object with the specified metadata.name
- the name of the columntype
- the Java data type of the columnproperties
- the list of properties that apply to the column;
defaults to noneIllegalArgumentException
- if name
or any
properties
are invalid, or if type
is not one of the
following: ByteBuffer
, Double
, Float
,
Integer
, Long
, or String
ColumnProperty
public Column(String name, Class<?> type, List<String> properties)
Type.Column
object with the specified metadata.name
- the name of the columntype
- the Java data type of the columnproperties
- the list of properties that apply to the column;
defaults to noneIllegalArgumentException
- if name
or any
properties
are invalid, or if type
is not one of the
following: ByteBuffer
, Double
, Float
,
Integer
, Long
, or String
ColumnProperty
public String getName()
public Class<?> getType()
public Type.Column.ColumnBaseType getColumnBaseType()
getType()
and then comparing
it to various Java classes, e.g. Integer.class. With this
enumeration, switch statements can be used to do different things for
different column types. This enumeration is preferred when the
same thing needs to be done for all sub-types of a given base type.
For example, string has a lot of sub-types; rather than having to
group multiple case statements (and ensuring that no applicable
enumeration is missed) for Type.Column.ColumnType
, this enumeration
can be used to cover all string cases.public Type.Column.ColumnType getColumnType()
hasProperty(String)
to
check for given column properties. With this enumeration,
switch statements can be used to do different things for
different column types.public boolean isNullable()
public List<String> getProperties()
ColumnProperty
public boolean hasProperty(String property)
ColumnProperty
Copyright © 2019. All rights reserved.