JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.datasource
Class BaseColumn

java.lang.Object
  |
  +--com.klg.jclass.datasource.BaseColumn
All Implemented Interfaces:
ColumnModel, Serializable
Direct Known Subclasses:
BaseVirtualColumn, Column, Column

public class BaseColumn
extends Object
implements ColumnModel, Serializable

An implementation of ColumnModel. Extend it and set each of its properties.

Calls to MetaDataModel.getJavaColumnType call getMetaColumnType() below.

ResultSetMetaData methods are mirrored here, see their documentation for descriptions. Some drivers do not support all ResultSetMetaData methods. If they do not the following defaults are used:
NAMEVALUE
catalognull
displayWidth25
namenull
labelnull
typejava.sql.Types.OTHER
typeName"OTHER"
precision5
scale5
schemanull
tablenull
isAutoIncrementfalse
isCaseSensitivefalse
isCurrencyfalse
isDefinitelyWritabletrue
isNullableResultSetMetaData.columnNullable
isReadOnlyfalse
isSearchabletrue
isSignedfalse
isWritabletrue

See Also:
Serialized Form

Field Summary
protected  String catalog
           
protected  String columnClassName
           
protected  int displayWidth
           
protected  String identifier
           
protected  boolean isAutoIncrement
           
protected  boolean isCaseSensitive
           
protected  boolean isCurrency
           
protected  boolean isDefinitelyWritable
           
protected  int isNullable
           
protected  boolean isReadOnly
           
protected  boolean isSearchable
           
protected  boolean isSigned
           
protected  boolean isWritable
           
protected  String label
           
protected  int metaType
           
protected  String name
           
protected static int NOT_SET
           
protected  int precision
           
protected  int scale
           
protected  String schema
           
protected  String table
           
protected  int type
           
protected  String typeName
           
 
Constructor Summary
BaseColumn()
           
BaseColumn(String name, int type)
          Constructor
 
Method Summary
 String getCatalogName()
           
 String getColumnClassName()
           
 int getColumnDisplaySize()
           
 String getColumnLabel()
           
 String getColumnName()
           
 int getColumnType()
          Return the jdbc.Sql.Types type for the column.
 String getColumnTypeName()
           
 String getIdentifier()
          Return a string which uniquely identifies this column.
 int getMetaColumnType()
          Return one of MetaDataModel types.
 int getPrecision()
           
 int getScale()
           
 String getSchemaName()
           
 String getTableName()
           
 boolean isAutoIncrement()
           
 boolean isCaseSensitive()
           
 boolean isCurrency()
           
 boolean isDefinitelyWritable()
           
 int isNullable()
           
 boolean isReadOnly()
           
 boolean isSearchable()
           
 boolean isSigned()
           
 boolean isTimeDate()
          Is this column's type date/time/timestamp?
 boolean isWritable()
           
 void setAutoIncrement(boolean isAutoIncrement)
           
 void setCaseSensitive(boolean isCaseSensitive)
           
 void setCatalogName(String catalog)
           
 void setColumnClassName(String columnClassName)
           
 void setColumnDisplaySize(int displayWidth)
           
 void setColumnLabel(String label)
           
 void setColumnName(String name)
           
 void setColumnType(int type)
          Set the java.sql.Types type for this column.
 void setColumnTypeName(String typeName)
           
 void setCurrency(boolean isCurrency)
           
 void setDefinitelyWritable(boolean isDefinitelyWritable)
           
 void setIdentifier(String identifier)
           
 void setMetaColumnType(int metaType)
          Set the metaType for this column.
 void setMetaColumnTypeFromSqlType(int type)
          Set the metaType for this column.
 void setNullable(int isNullable)
           
 void setPrecision(int precision)
           
 void setReadOnly(boolean isReadOnly)
           
 void setScale(int scale)
           
 void setSchemaName(String schema)
           
 void setSearchable(boolean isSearchable)
           
 void setSigned(boolean isSigned)
           
 void setTableName(String table)
           
 void setWritable(boolean isWritable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_SET

protected static final int NOT_SET
See Also:
Constant Field Values

name

protected String name

table

protected String table

catalog

protected String catalog

schema

protected String schema

label

protected String label

typeName

protected String typeName

identifier

protected String identifier

columnClassName

protected String columnClassName

type

protected int type

displayWidth

protected int displayWidth

precision

protected int precision

scale

protected int scale

isNullable

protected int isNullable

metaType

protected int metaType

isCurrency

protected boolean isCurrency

isReadOnly

protected boolean isReadOnly

isAutoIncrement

protected boolean isAutoIncrement

isCaseSensitive

protected boolean isCaseSensitive

isSearchable

protected boolean isSearchable

isDefinitelyWritable

protected boolean isDefinitelyWritable

isSigned

protected boolean isSigned

isWritable

protected boolean isWritable
Constructor Detail

BaseColumn

public BaseColumn()

BaseColumn

public BaseColumn(String name,
                  int type)
Constructor

Parameters:
name - the name of this column
type - this column's type, one of,
Method Detail

getMetaColumnType

public int getMetaColumnType()
Return one of MetaDataModel types. Java object types and java.sql.Types types are mapped to MetaDataModel types.

Specified by:
getMetaColumnType in interface ColumnModel
Returns:
this column's type as one of the MetaDataModel type constants.
See Also:
getColumnType()

isTimeDate

public boolean isTimeDate()
Is this column's type date/time/timestamp?

Specified by:
isTimeDate in interface ColumnModel
Returns:
true if this column's type is date/time/timestamp, false otherwise

getCatalogName

public String getCatalogName()
Specified by:
getCatalogName in interface ColumnModel

getColumnDisplaySize

public int getColumnDisplaySize()
Specified by:
getColumnDisplaySize in interface ColumnModel

getColumnLabel

public String getColumnLabel()
Specified by:
getColumnLabel in interface ColumnModel

getColumnName

public String getColumnName()
Specified by:
getColumnName in interface ColumnModel

getColumnType

public int getColumnType()
Description copied from interface: ColumnModel
Return the jdbc.Sql.Types type for the column. In the model this type is not used, it is mapped to a MetaDataModel type constant.

Specified by:
getColumnType in interface ColumnModel
Returns:
a java.sql.Types type
See Also:
ColumnModel.getMetaColumnType()

getColumnTypeName

public String getColumnTypeName()
Specified by:
getColumnTypeName in interface ColumnModel

getPrecision

public int getPrecision()
Specified by:
getPrecision in interface ColumnModel

getScale

public int getScale()
Specified by:
getScale in interface ColumnModel

getSchemaName

public String getSchemaName()
Specified by:
getSchemaName in interface ColumnModel

getTableName

public String getTableName()
Specified by:
getTableName in interface ColumnModel

isAutoIncrement

public boolean isAutoIncrement()
Specified by:
isAutoIncrement in interface ColumnModel

isCaseSensitive

public boolean isCaseSensitive()
Specified by:
isCaseSensitive in interface ColumnModel

isCurrency

public boolean isCurrency()
Specified by:
isCurrency in interface ColumnModel

isDefinitelyWritable

public boolean isDefinitelyWritable()
Specified by:
isDefinitelyWritable in interface ColumnModel

isNullable

public int isNullable()
Specified by:
isNullable in interface ColumnModel

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface ColumnModel

isSearchable

public boolean isSearchable()
Specified by:
isSearchable in interface ColumnModel

isSigned

public boolean isSigned()
Specified by:
isSigned in interface ColumnModel

isWritable

public boolean isWritable()
Specified by:
isWritable in interface ColumnModel

getIdentifier

public String getIdentifier()
Return a string which uniquely identifies this column. That is, determine if it is identified by an alias, by it name, or by fully qualified name. For example, colA A, or colA, or qualifier.colA. If identifier is null, column name is returned.

Specified by:
getIdentifier in interface ColumnModel
Returns:
unique identifier for this column

getColumnClassName

public String getColumnClassName()
Specified by:
getColumnClassName in interface ColumnModel

setMetaColumnType

public void setMetaColumnType(int metaType)
Set the metaType for this column. Maps the passed in java.sql.Types type to a MetaDataModel type.

Specified by:
setMetaColumnType in interface ColumnModel
Parameters:
metaType - a int which is the MetaDataModel type for the column
See Also:
MetaDataModel

setMetaColumnTypeFromSqlType

public void setMetaColumnTypeFromSqlType(int type)
Set the metaType for this column. Maps the passed in java.sql.Types type to a MetaDataModel type.

Specified by:
setMetaColumnTypeFromSqlType in interface ColumnModel

setCatalogName

public void setCatalogName(String catalog)
Specified by:
setCatalogName in interface ColumnModel

setColumnDisplaySize

public void setColumnDisplaySize(int displayWidth)
Specified by:
setColumnDisplaySize in interface ColumnModel

setColumnLabel

public void setColumnLabel(String label)
Specified by:
setColumnLabel in interface ColumnModel

setColumnName

public void setColumnName(String name)
Specified by:
setColumnName in interface ColumnModel

setColumnType

public void setColumnType(int type)
Set the java.sql.Types type for this column.

Specified by:
setColumnType in interface ColumnModel

setColumnTypeName

public void setColumnTypeName(String typeName)
Specified by:
setColumnTypeName in interface ColumnModel

setPrecision

public void setPrecision(int precision)
Specified by:
setPrecision in interface ColumnModel

setScale

public void setScale(int scale)
Specified by:
setScale in interface ColumnModel

setSchemaName

public void setSchemaName(String schema)
Specified by:
setSchemaName in interface ColumnModel

setTableName

public void setTableName(String table)
Specified by:
setTableName in interface ColumnModel

setAutoIncrement

public void setAutoIncrement(boolean isAutoIncrement)
Specified by:
setAutoIncrement in interface ColumnModel

setCaseSensitive

public void setCaseSensitive(boolean isCaseSensitive)
Specified by:
setCaseSensitive in interface ColumnModel

setCurrency

public void setCurrency(boolean isCurrency)
Specified by:
setCurrency in interface ColumnModel

setDefinitelyWritable

public void setDefinitelyWritable(boolean isDefinitelyWritable)
Specified by:
setDefinitelyWritable in interface ColumnModel

setNullable

public void setNullable(int isNullable)
Specified by:
setNullable in interface ColumnModel

setReadOnly

public void setReadOnly(boolean isReadOnly)
Specified by:
setReadOnly in interface ColumnModel

setSearchable

public void setSearchable(boolean isSearchable)
Specified by:
setSearchable in interface ColumnModel

setSigned

public void setSigned(boolean isSigned)
Specified by:
setSigned in interface ColumnModel

setWritable

public void setWritable(boolean isWritable)
Specified by:
setWritable in interface ColumnModel

setColumnClassName

public void setColumnClassName(String columnClassName)
Specified by:
setColumnClassName in interface ColumnModel

setIdentifier

public void setIdentifier(String identifier)
Specified by:
setIdentifier in interface ColumnModel

Copyright © 2004 Quest Software Inc..
All rights reserved.