com.sibvisions.rad.persist.jdbc
Class ServerColumnMetaData

java.lang.Object
  extended by com.sibvisions.rad.persist.jdbc.ServerColumnMetaData
All Implemented Interfaces:
Cloneable

public class ServerColumnMetaData
extends Object
implements Cloneable

A ServerColumnMetaData is a description of the data type and other attributes of a table storage column. (persists on server) It also includes the server relevant infos, in addition to the ColumnMetaData just for the client.

See Also:
IDataType, ColumnMetaData

Constructor Summary
ServerColumnMetaData()
          Constructs a ServerColumnMetaData with defaults.
ServerColumnMetaData(Name pName)
          Constructs a ServerColumnMetaData with a specific name.
 
Method Summary
 ServerColumnMetaData clone()
          
 Object[] getAllowedValues()
          Gets the allowed values for this column.
 ColumnMetaData getColumnMetaData()
          Returns the ColumnMetaData client infos.
 Name getColumnName()
          Returns the name object for that column.
 IDataType getDataType()
          Returns the used data type for this ServerColumnMetaData.
 Object getDefaultValue()
          Gets the default value of this column.
 int getDetectedType()
          Returns the detected type of this column.
 String getLabel()
          Returns the default label.
 ForeignKey getLinkForeignKey()
          Returns the foreign key for a server side Droopdown list (automatic linked celleditor).
 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 getQuotedName()
          Returns the quoted column name.
 String getRealQueryColumnName()
          Returns the name the use in the database (real column) for the query the column.
 int getScale()
          Returns the scale of this column.
 int getSQLType()
          Returns the SQL type of this column.
 String getSQLTypeName()
          Returns the SQL type name 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 setAllowedValues(Object[] pValues)
          Sets the allowed values for this column.
 void setAutoIncrement(boolean pAutoIncrement)
          Sets if this ColumnMetaData is an auto increment column.
 void setDataType(IDataType pDataType)
          Sets the used data type this ServerColumnMetaData.
 void setDataType(int pTypeIdentifier)
          Sets the used data type this ColumnMetaData.
 void setDefaultValue(Object pValue)
          Sets the default value of this column.
 void setDetectedType(int pDetectedType)
          Sets the detected type of this column.
 void setLabel(String pLabel)
          Sets default label.
 void setLinkForeignKey(ForeignKey pForeignKey)
          Sets the foreign key for a server side Droopdown list (automatic linked celleditor).
 void setLinkReference(StorageReferenceDefinition pLinkReference)
          Sets the link reference for a server side Dropdown list (automatic linked celleditor).
 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 setRealQueryColumnName(String pRealQueryColumnName)
          The name the use in the database (real column) to query the column. e.g. w.name alias -> sRealQueryColumnName=w.name, ColumnName = alias.
 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 setSQLTypeName(String pSQLTypeName)
          Sets the SQL type name of this column.
 void setWritable(boolean pWriteable)
          Sets whether this column is writeable.
 String toString()
          
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerColumnMetaData

public ServerColumnMetaData()
Constructs a ServerColumnMetaData with defaults.


ServerColumnMetaData

public ServerColumnMetaData(Name pName)
Constructs a ServerColumnMetaData with a specific name.

Parameters:
pName - the column name
Method Detail

toString

public String toString()

Overrides:
toString in class Object

clone

public ServerColumnMetaData clone()

Overrides:
clone in class Object

getColumnMetaData

public ColumnMetaData getColumnMetaData()
Returns the ColumnMetaData client infos.

Returns:
the ColumnMetaData client infos.

getName

public String getName()
Returns the column name.

Returns:
the column name

getQuotedName

public String getQuotedName()
Returns the quoted column name.

Returns:
the quoted column name

getColumnName

public Name getColumnName()
Returns the name object for that column.

Returns:
the name object for that column.

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(int pTypeIdentifier)
Sets the used data type this ColumnMetaData.

Parameters:
pTypeIdentifier - the type identifier for this ColumnMetaData.

setDataType

public void setDataType(IDataType pDataType)
Sets the used data type this ServerColumnMetaData.

Parameters:
pDataType - the data type for this ServerColumnMetaData.

getDataType

public IDataType getDataType()
Returns the used data type for this ServerColumnMetaData.

Returns:
the java data type class for this ServerColumnMetaData.

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.

getDetectedType

public int getDetectedType()
Returns the detected type of this column.

Returns:
the detected type of this column.

setDetectedType

public void setDetectedType(int pDetectedType)
Sets the detected type of this column.

Parameters:
pDetectedType - the detected type of this column.

getSQLTypeName

public String getSQLTypeName()
Returns the SQL type name of this column.

Returns:
the SQL type name of this column.

setSQLTypeName

public void setSQLTypeName(String pSQLTypeName)
Sets the SQL type name of this column.

Parameters:
pSQLTypeName - the SQL type name of this column.

setWritable

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

Parameters:
pWriteable - 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 pAutoIncrement)
Sets if this ColumnMetaData is an auto increment column.

Parameters:
pAutoIncrement - 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 a server side dropdown list.

setLinkReference

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

Parameters:
pLinkReference - the link reference to set

getLinkForeignKey

public ForeignKey getLinkForeignKey()
Returns the foreign key for a server side Droopdown list (automatic linked celleditor).

Returns:
the foreign key definition

setLinkForeignKey

public void setLinkForeignKey(ForeignKey pForeignKey)
Sets the foreign key for a server side Droopdown list (automatic linked celleditor).

Parameters:
pForeignKey - the foreign key definition

setDefaultValue

public void setDefaultValue(Object pValue)
Sets the default value of this column.

Parameters:
pValue - the default value

getDefaultValue

public Object getDefaultValue()
Gets the default value of this column.

Returns:
the default value or null if the column has no default value

setAllowedValues

public void setAllowedValues(Object[] pValues)
Sets the allowed values for this column.

Parameters:
pValues - the allowed values or null when any value is allowed

getAllowedValues

public Object[] getAllowedValues()
Gets the allowed values for this column.

Returns:
an Object[] with values, possible for the column.

getRealQueryColumnName

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

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

setRealQueryColumnName

public void setRealQueryColumnName(String pRealQueryColumnName)
The name the use in the database (real column) to query the column. e.g. w.name alias -> sRealQueryColumnName=w.name, ColumnName = alias. It sets the real DB column name, which is specified from the developer over the queryColumns to use for query, filter and sort (only Query side)

Parameters:
pRealQueryColumnName - the name the use in the database (real column) to query the column.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.