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 int
compareTo(Object o)
String
getName()
The name for this column.int
getType()
it is strongly suggested that you useTypes
since these are stable and pretty easily map to most interesting data types.boolean
isNullable()
If this column may be nulled.void
setName(String name)
void
setNullable(boolean nullable)
void
setType(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 useTypes
since 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 DATA
in a DB2 implementation.- Returns:
-
setType
public void setType(int type)
-
compareTo
public int compareTo(Object o)
- Specified by:
compareTo
in interfaceComparable
-
-