public class ColumnDescription extends Object
Constructor and Description |
---|
ColumnDescription(ColumnDescription cd) |
ColumnDescription(String name,
ColumnDescription cd) |
ColumnDescription(String name,
int type,
boolean not_null) |
ColumnDescription(String name,
int type,
int size,
boolean not_null)
The Constructors if the type does require a size.
|
Modifier and Type | Method and Description |
---|---|
Class |
classType()
Returns the class of Java object for this field.
|
boolean |
equals(Object ob)
The 'equals' method, used to determine equality between column
descriptions.
|
String |
getName()
Returns the name of the field.
|
int |
getScale()
If this is a number, returns the scale of the field.
|
int |
getSize()
Returns the size of the given field.
|
int |
getSQLType()
Returns a value from java.sql.Type that is the SQL type defined for this
column.
|
String |
getSQLTypeName()
Returns the name (as a string) of the SQL type or null if the type is
not understood.
|
int |
getType()
Returns an integer representing the type of the field.
|
int |
getUniqueGroup()
Returns the unique group that this column is in.
|
boolean |
isNotNull()
Determines whether the field can contain a null value or not.
|
boolean |
isNumericType()
Returns true if this column is a numeric type.
|
boolean |
isQuantifiable()
Returns true if the type of the field is searchable.
|
boolean |
isUnique()
Determines whether the field can contain two items that are identical.
|
static ColumnDescription |
readFrom(DataInputStream in)
Reads a ColumnDescription from the given DataInputStream and returns
a new instance of it.
|
void |
setScale(int scale)
Sets the scale of the numerical values stored.
|
void |
setSQLType(int sql_type)
Sets the SQL type for this ColumnDescription object.
|
void |
setUnique()
Sets this column to unique.
|
void |
setUniqueGroup(int group)
Sets the column to belong to the specified unique group in the table.
|
void |
writeTo(DataOutputStream out)
Writes this ColumnDescription to the given DataOutputStream.
|
public ColumnDescription(String name, int type, int size, boolean not_null)
public ColumnDescription(String name, int type, boolean not_null)
public ColumnDescription(ColumnDescription cd)
public ColumnDescription(String name, ColumnDescription cd)
public void setUnique()
public void setUniqueGroup(int group)
public void setSQLType(int sql_type)
DB_STRING := CHAR, VARCHAR, LONGVARCHAR DB_NUMERIC := TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, REAL, DOUBLE, NUMERIC, DECIMAL DB_DATE := DATE, TIME, TIMESTAMP DB_BOOLEAN := BIT DB_BLOB := BINARY, VARBINARY, LONGVARBINARY DB_OBJECT := JAVA_OBJECT
public void setScale(int scale)
public String getName()
public int getType()
public boolean isNumericType()
public int getSQLType()
public String getSQLTypeName()
public Class classType()
public int getSize()
public int getScale()
public boolean isNotNull()
public boolean isUnique()
public int getUniqueGroup()
public boolean isQuantifiable()
public boolean equals(Object ob)
public void writeTo(DataOutputStream out) throws IOException
IOException
public static ColumnDescription readFrom(DataInputStream in) throws IOException
IOException
Copyright © 2015. All rights reserved.