javax.rad.persist
Class ColumnMetaData

java.lang.Object
  extended by javax.rad.persist.ColumnMetaData
All Implemented Interfaces:
Serializable

public class ColumnMetaData
extends Object
implements Serializable

A ColumnMetaData is a description of the data type and other attributes of a table storage column. (persists on server)

See Also:
IDataType, Serialized Form

Constructor Summary
ColumnMetaData()
          Constructs a ColumnDefinition with the specified name.
ColumnMetaData(String pName)
          Constructs a ColumnDefinition with the specified name.
 
Method Summary
static ColumnDefinition createColumnDefinition(ColumnMetaData pColumnMetaData)
          It converts a server ColumnMetaData to an client ColumnDefinition and returns it.
static ColumnMetaData createColumnMetaData(ColumnDefinition pColumnDefinition)
          It returns the ColumnMetaData to the corresponding ColumnDefinition.
static IDataType createDataType(ColumnMetaData pColumnMetaData)
          It creates the corresponding IDataType to the meta data column.
 IStorage getAutomaticLinkStorage()
          Returns the DBStorage to the server side dropdown list (automatic linked celleditor).
static String[] getColumnNames(ColumnMetaData[] auColumnMetaData)
          Returns all column names of the ColumnMetaData[].
 String getDataType()
          Returns the used java data type class name for this ColumnMetaData.
static String getDefaultLabel(String pName)
          It returns an default label for the pName.
 String getLabel()
          Returns the default label.
 StorageReferenceDefinition getLinkReference()
          Returns the link reference for a server side dropdown list (automatic linked celleditor).
 String getName()
          Returns the column name.
 int getPrecision()
          Returns the precision/size of this column.
 String getRealColumnName()
          Returns the name the use in the database (real column) for the column name.
 int getScale()
          Returns the scale of this column.
 int getSQLType()
          Returns the SQL type of this column.
 boolean isAutoIncrement()
          Returns true if this ColumnMetaData is an auto increment column.
 boolean isNullable()
          Returns true if values in this column may be null.
 boolean isSigned()
          Returns if this ColumnMetaData is signed.
 boolean isWritable()
          Returns whether this column is writeable.
 void setAutoIncrement(boolean autoIncrement)
          Sets if this ColumnMetaData is an auto increment column.
 void setAutomaticLinkStorage(IStorage pStorage)
          Sets the DBStorage to the server side dropdown list (automatic linked celleditor).
 void setDataType(String pDataTypeClassName)
          Sets the used java data type class name for this ColumnMetaData.
 void setLabel(String pLabel)
          Sets default label.
 void setLinkReference(StorageReferenceDefinition pLinkReference)
          Sets the link reference for an server side Dropdown list (automatic linked celleditor).
 void setName(String pName)
          Set the name of the column.
 void setNullable(boolean pNullable)
          Sets whether values in this column may be null.
 void setPrecision(int pPrecision)
          Sets the precision/size of this column.
 void setRealColumnName(String pRealColumnName)
          Sets the name the use in the database (real column) for the column name.
 void setScale(int pScale)
          Sets the scale of this column.
 void setSigned(boolean pSigned)
          Sets if this ColumnMetaData is signed.
 void setSQLType(int pSQLType)
          Sets the SQL type of this column.
 void setWritable(boolean pStorable)
          Sets whether this column is writeable.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColumnMetaData

public ColumnMetaData()
Constructs a ColumnDefinition with the specified name.


ColumnMetaData

public ColumnMetaData(String pName)
Constructs a ColumnDefinition with the specified name.

Parameters:
pName - is the for every RowDefinition unique name
Method Detail

toString

public String toString()

Overrides:
toString in class Object

setName

public void setName(String pName)
Set the name of the column.

Parameters:
pName - column name

getName

public String getName()
Returns the column name.

Returns:
the column name

getLabel

public String getLabel()
Returns the default label.

Returns:
the default label.

setLabel

public void setLabel(String pLabel)
Sets default label.

Parameters:
pLabel - the default label. to set

setDataType

public void setDataType(String pDataTypeClassName)
Sets the used java data type class name for this ColumnMetaData.

Parameters:
pDataTypeClassName - the java data type class name for this ColumnMetaData.

getDataType

public String getDataType()
Returns the used java data type class name for this ColumnMetaData.

Returns:
ctDataTypeClassName the java data type class name for this ColumnMetaData.

setNullable

public void setNullable(boolean pNullable)
Sets whether values in this column may be null.

Parameters:
pNullable - true if values in this column may be null.

isNullable

public boolean isNullable()
Returns true if values in this column may be null.

Returns:
true if values in this column may be null.

getPrecision

public int getPrecision()
Returns the precision/size of this column.

Returns:
the precision/size of this column.

setPrecision

public void setPrecision(int pPrecision)
Sets the precision/size of this column.

Parameters:
pPrecision - the precision/size of this column.

getScale

public int getScale()
Returns the scale of this column.

Returns:
the scale of this column.

setScale

public void setScale(int pScale)
Sets the scale of this column.

Parameters:
pScale - the scale of this column.

getSQLType

public int getSQLType()
Returns the SQL type of this column.

Returns:
the SQL type of this column.

setSQLType

public void setSQLType(int pSQLType)
Sets the SQL type of this column.

Parameters:
pSQLType - the SQL type of this column.

setWritable

public void setWritable(boolean pStorable)
Sets whether this column is writeable.

Parameters:
pStorable - true if column is writeable.

isWritable

public boolean isWritable()
Returns whether this column is writeable.

Returns:
true if column is writeable.

isSigned

public boolean isSigned()
Returns if this ColumnMetaData is signed.

Returns:
if this ColumnMetaData is signed.

setSigned

public void setSigned(boolean pSigned)
Sets if this ColumnMetaData is signed.

Parameters:
pSigned - true, if signed.

isAutoIncrement

public boolean isAutoIncrement()
Returns true if this ColumnMetaData is an auto increment column.

Returns:
true if this ColumnMetaData is an auto increment column.

setAutoIncrement

public void setAutoIncrement(boolean autoIncrement)
Sets if this ColumnMetaData is an auto increment column.

Parameters:
autoIncrement - the bAutoIncrement to set

getLinkReference

public StorageReferenceDefinition getLinkReference()
Returns the link reference for a server side dropdown list (automatic linked celleditor).

Returns:
the link reference for an server side dropdown list (automatic linked celleditor).

setLinkReference

public void setLinkReference(StorageReferenceDefinition pLinkReference)
Sets the link reference for an server side Dropdown list (automatic linked celleditor).

Parameters:
pLinkReference - the link reference to set

getAutomaticLinkStorage

public IStorage getAutomaticLinkStorage()
Returns the DBStorage to the server side dropdown list (automatic linked celleditor).

Returns:
the DBStorage to the server side dropdown list (automatic linked celleditor).

setAutomaticLinkStorage

public void setAutomaticLinkStorage(IStorage pStorage)
Sets the DBStorage to the server side dropdown list (automatic linked celleditor).

Parameters:
pStorage - the DBStorage to the server side dropdown list (automatic linked celleditor) to set

getRealColumnName

public String getRealColumnName()
Returns the name the use in the database (real column) for the column name.

Returns:
the name the use in the database (real column) for the column name.

setRealColumnName

public void setRealColumnName(String pRealColumnName)
Sets the name the use in the database (real column) for the column name.

Parameters:
pRealColumnName - the name the use in the database (real column) for the column name to set

createColumnDefinition

public static ColumnDefinition createColumnDefinition(ColumnMetaData pColumnMetaData)
                                               throws ModelException
It converts a server ColumnMetaData to an client ColumnDefinition and returns it.

Parameters:
pColumnMetaData - the server column meta data to convert.
Returns:
the ColumnDefinition for the ColumnMetaData.
Throws:
ModelException - if the ColumnDefintion couldn't created

createDataType

public static IDataType createDataType(ColumnMetaData pColumnMetaData)
It creates the corresponding IDataType to the meta data column.

Parameters:
pColumnMetaData - the MetaDataColumn to use.
Returns:
to the meta data column the corresponding IDataType.

createColumnMetaData

public static ColumnMetaData createColumnMetaData(ColumnDefinition pColumnDefinition)
It returns the ColumnMetaData to the corresponding ColumnDefinition.

Parameters:
pColumnDefinition - the ColumnDefinition to use.
Returns:
the ColumnMetaData to the corresponding ColumnDefinition.

getDefaultLabel

public static String getDefaultLabel(String pName)
It returns an default label for the pName.

Parameters:
pName - the Column Name to use.
Returns:
the default column label

getColumnNames

public static String[] getColumnNames(ColumnMetaData[] auColumnMetaData)
Returns all column names of the ColumnMetaData[].

Parameters:
auColumnMetaData - the ColumnMetaData[] to use.
Returns:
all column names of the ColumnMetaData[].


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.