Package net.sf.basedb.core.dbengine
Class TableInfo.ColumnInfo
java.lang.Object
net.sf.basedb.core.dbengine.TableInfo.ColumnInfo
- All Implemented Interfaces:
Comparable<TableInfo.ColumnInfo>
- Enclosing class:
- TableInfo
public static class TableInfo.ColumnInfo extends Object implements Comparable<TableInfo.ColumnInfo>
Holds information about a single column in a table.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ColumnInfo(String name, String type, Integer sqlType, int size, boolean isNullable, boolean isUnique)
Create a new ColumnInfo object. -
Method Summary
Modifier and Type Method Description int
compareTo(TableInfo.ColumnInfo o)
String
getName()
int
getSize()
Integer
getSqlType()
String
getType()
boolean
isNullable()
boolean
isStringType()
boolean
isUnique()
String
toString()
-
Field Details
-
name
-
type
-
sqlType
-
size
private final int size -
isNullable
private final boolean isNullable -
isUnique
private final boolean isUnique
-
-
Constructor Details
-
ColumnInfo
public ColumnInfo(String name, String type, Integer sqlType, int size, boolean isNullable, boolean isUnique)Create a new ColumnInfo object.- Parameters:
name
- The name of the columntype
- The type of the column (int, float, varchar, ...) etc.size
- The size of the columnisNullable
- If the column is nullableisUnique
- If the column must have unique values
-
-
Method Details
-
getName
-
getType
-
getSqlType
- Since:
- 2.9
-
getSize
public int getSize() -
isNullable
public boolean isNullable() -
isUnique
public boolean isUnique() -
isStringType
public boolean isStringType()- Since:
- 2.9
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<TableInfo.ColumnInfo>
-