public class DBType
extends java.lang.Object
Describe a full column type as it is described in the IVOA document of TAP.
Thus, this object contains 2 attributes: type
(or datatype) and length
(or size).
The length/size may be not defined ; in this case, its value is set to NO_LENGTH
or is negative or null.
All datatypes declared in the IVOA recommendation document of TAP are listed in an enumeration type: DBType.DBDatatype
.
It is used to set the attribute type/datatype of this class.
Modifier and Type | Class and Description |
---|---|
static class |
DBType.DBDatatype
List of all datatypes declared in the IVOA recommendation of TAP (in the section UPLOAD).
|
Modifier and Type | Field and Description |
---|---|
int |
length
The length parameter (only few datatypes need this parameter: char, varchar, binary and varbinary).
|
static int |
NO_LENGTH
Special value in case no length/size is specified.
|
DBType.DBDatatype |
type
Datatype of a column.
|
Constructor and Description |
---|
DBType(DBType.DBDatatype datatype)
Build a TAP column type by specifying a datatype.
|
DBType(DBType.DBDatatype datatype,
int length)
Build a TAP column type by specifying a datatype and a length (needed only for datatypes like char, varchar, binary and varbinary).
|
Modifier and Type | Method and Description |
---|---|
boolean |
isBinary() |
boolean |
isCompatible(DBType t) |
boolean |
isGeometry() |
boolean |
isNumeric() |
boolean |
isString() |
java.lang.String |
toString() |
public static final int NO_LENGTH
public final DBType.DBDatatype type
public final int length
public DBType(DBType.DBDatatype datatype)
datatype
- Column datatype.public DBType(DBType.DBDatatype datatype, int length)
datatype
- Column datatype.length
- Length of the column value (needed only for datatypes like char, varchar, binary and varbinary).public boolean isNumeric()
public boolean isBinary()
public boolean isString()
public boolean isGeometry()
public boolean isCompatible(DBType t)
public java.lang.String toString()
toString
in class java.lang.Object