wt.introspection
Class ColumnDescriptor

java.lang.Object
  extended bywt.introspection.ColumnDescriptor
All Implemented Interfaces:
Cloneable, Externalizable, Serializable
Direct Known Subclasses:
AliasDescriptor

public class ColumnDescriptor
extends Object
implements Externalizable, Cloneable

ColumnDescriptor supplies meta-data information for an attribute

Supported API: false

Extendable: false

See Also:
AttributeDescriptor, WTIntrospector, ClassInfo, LinkInfo, Serialized Form

Field Summary
private static String CLASSNAME
           
private  String dbColumnName
           
static boolean DEBUG
           
private static int DEBUG_LEVEL
           
static long externalizationVersionUID
          Version identifier for managing compatibility and evolution of externalizable classes.
private  boolean indexed
           
private  String javaType
           
private  int length
           
private static DebugWriter LOG
           
static int MAX_BYTES_PER_CHAR
           
static int MAX_SQL_STRING_SIZE
           
protected  String name
           
private  ClassInfo ownerClassInfo
           
private  boolean pdInitialized
           
private  PropertyDescriptor propertyDescriptor
           
static String REF_DELIMETER
           
private  boolean required
           
(package private) static long serialVersionUID
           
private static String SIMPLE_CLASSNAME
           
private  int sqlType
           
private  String tableSize
           
private  String tableSpaceName
           
private  boolean unique
           
private  boolean updatable
           
 
Constructor Summary
ColumnDescriptor()
           
ColumnDescriptor(String attributeName, String aJavaType, String columnName, int aSqlType, int aLength, boolean isRequired, boolean isIndexed, boolean isUnique, boolean isUpdatable, String aTableSpaceName, String aTableSize)
           
 
Method Summary
 Object clone()
           
 String getBaseColumnName()
          Answer my source table's column name
 String getColumnName()
          Answer my database column name
 String getJavaType()
          Answer my Java type
 int getLength()
          Length of the attribute.
 String getName()
          Answer my name
 PropertyDescriptor getPropertyDescriptor()
          Answer my PropertyDescriptor.
 int getSQLType()
          Answer my SQL type
 String getTableSize()
          Get the table size.
 String getTableSpaceName()
          Get the table space name.
 boolean isIndexed()
          Answer whether attribute is indexed
 boolean isRequired()
          Answer true | false - attribute is required
 boolean isUnique()
          Answer whether attribute must be unique, among all instances
 boolean isUpdatable()
          Answer whether column may be updatable
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
(package private)  void setColumnName(String newName)
          Set my database column name Only to be used by ClassInfo, in qualifying names for composites.
(package private)  void setName(String newName)
          Set my name Only to be used by ClassInfo, in qualifying names for composites.
(package private)  void setOwnerClassInfo(ClassInfo info)
          Set my owning ClassInfo Only to be used when BaseTableInfo initializes it.
(package private)  void setPropertyDescriptor(PropertyDescriptor pd)
          Set my PropertyDescriptor Only to be used when ClassInfo initializes it.
 String toString()
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASSNAME

private static final String CLASSNAME

SIMPLE_CLASSNAME

private static final String SIMPLE_CLASSNAME

DEBUG

public static final boolean DEBUG

LOG

private static final DebugWriter LOG

externalizationVersionUID

public static final long externalizationVersionUID
Version identifier for managing compatibility and evolution of externalizable classes.

See Also:
Constant Field Values

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

DEBUG_LEVEL

private static final int DEBUG_LEVEL
See Also:
Constant Field Values

REF_DELIMETER

public static final String REF_DELIMETER
See Also:
Constant Field Values

MAX_BYTES_PER_CHAR

public static final int MAX_BYTES_PER_CHAR

MAX_SQL_STRING_SIZE

public static final int MAX_SQL_STRING_SIZE

name

protected String name

javaType

private String javaType

dbColumnName

private String dbColumnName

sqlType

private int sqlType

length

private int length

required

private boolean required

indexed

private boolean indexed

unique

private boolean unique

updatable

private boolean updatable

tableSpaceName

private String tableSpaceName

tableSize

private String tableSize

pdInitialized

private boolean pdInitialized

propertyDescriptor

private PropertyDescriptor propertyDescriptor

ownerClassInfo

private ClassInfo ownerClassInfo
Constructor Detail

ColumnDescriptor

public ColumnDescriptor()

ColumnDescriptor

public ColumnDescriptor(String attributeName,
                        String aJavaType,
                        String columnName,
                        int aSqlType,
                        int aLength,
                        boolean isRequired,
                        boolean isIndexed,
                        boolean isUnique,
                        boolean isUpdatable,
                        String aTableSpaceName,
                        String aTableSize)
Method Detail

clone

public Object clone()

getBaseColumnName

public String getBaseColumnName()
Answer my source table's column name

Returns:
source table's column name

getColumnName

public String getColumnName()
Answer my database column name

Returns:
columnName

getJavaType

public String getJavaType()
Answer my Java type

Returns:
Java type

getLength

public int getLength()
Length of the attribute. For character column types, the max bytes per character for the current encoding will be multiplied by the modeled length to determine the length, in bytes, of the column.

Returns:
The storage length of the column.

getName

public String getName()
Answer my name

Returns:
name

getSQLType

public int getSQLType()
Answer my SQL type

Returns:
SQL type

getTableSize

public String getTableSize()
Get the table size. Only applies to certain column types, such as BLOB.

Returns:
Table Size is a categorization, with valid String values of [ TINY | SMALL | MEDIUM | LARGE | HUGE ]

getTableSpaceName

public String getTableSpaceName()
Get the table space name. Only applies to certain column types, such as BLOB.

Returns:
Table Space Name

isIndexed

public boolean isIndexed()
Answer whether attribute is indexed

Returns:
indexed

isRequired

public boolean isRequired()
Answer true | false - attribute is required

Returns:
required

isUnique

public boolean isUnique()
Answer whether attribute must be unique, among all instances

Returns:
unique

isUpdatable

public boolean isUpdatable()
Answer whether column may be updatable

Returns:
updatable

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

setColumnName

void setColumnName(String newName)
Set my database column name Only to be used by ClassInfo, in qualifying names for composites.


setName

void setName(String newName)
Set my name Only to be used by ClassInfo, in qualifying names for composites.


toString

public String toString()

getPropertyDescriptor

public PropertyDescriptor getPropertyDescriptor()
Answer my PropertyDescriptor.

Returns:
PropertyDescriptor

setPropertyDescriptor

void setPropertyDescriptor(PropertyDescriptor pd)
Set my PropertyDescriptor Only to be used when ClassInfo initializes it.


setOwnerClassInfo

void setOwnerClassInfo(ClassInfo info)
Set my owning ClassInfo Only to be used when BaseTableInfo initializes it.


writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException