Class DataDescriptorEntry
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.data.DataDescriptorEntry
-
- All Implemented Interfaces:
Comparable
- Direct Known Subclasses:
ColumnDescriptorEntry
public class DataDescriptorEntry extends Object implements Comparable
Describes a column in an SQL database in a platform and vendor neutral way.Created by Jeff Gaynor
on 8/30/11 at 2:34 PM
-
-
Constructor Summary
Constructors Constructor Description DataDescriptorEntry(String name, int type)DataDescriptorEntry(String name, int type, boolean nullable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Object o)StringgetName()The name for this column.intgetType()it is strongly suggested that you useTypessince these are stable and pretty easily map to most interesting data types.booleanisNullable()If this column may be nulled.voidsetName(String name)voidsetNullable(boolean nullable)voidsetType(int type)
-
-
-
Method Detail
-
isNullable
public boolean isNullable()
If this column may be nulled.
Update for version 5.0+: Changed default from false to true since non primary key entries consistently blow up. If this is to be required, set it explicitly to true now.- Returns:
-
setNullable
public void setNullable(boolean nullable)
-
getName
public String getName()
The name for this column. This will be used in the resulting table.- Returns:
-
setName
public void setName(String name)
-
getType
public int getType()
it is strongly suggested that you useTypessince these are stable and pretty easily map to most interesting data types. These (within rather narrow limits) are converted by the database abstraction layer to the correct underlying data type. E.g. a BLOB would become aLONG VARCHAR FOR BIT DATAin a DB2 implementation.- Returns:
-
setType
public void setType(int type)
-
compareTo
public int compareTo(Object o)
- Specified by:
compareToin interfaceComparable
-
-