com.sibvisions.rad.persist.jdbc
Class ServerColumnMetaData

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

public class ServerColumnMetaData
extends java.lang.Object
implements java.lang.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.
ServerColumnMetaData(Name pName, ColumnMetaData pColumnMetaData)
          Constructs a ServerColumnMetaData with a specific name and Column MetaData.
 
Method Summary
 ServerColumnMetaData clone()
          
 java.lang.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()
          It gets the corresponding IDataType to the meta data column.
 java.lang.Object getDefaultValue()
          Gets the default value of this column.
 int getDetectedType()
          Returns the detected type of this column.
 java.lang.String getLabel()
          Returns the default label.
 StorageReferenceDefinition getLinkReference()
          Returns the link reference for a server side dropdown list (automatic linked celleditor).
 java.lang.String getName()
          Returns the column name.
 int getPrecision()
          Returns the precision/size of this column.
 java.lang.String getQuotedName()
          Returns the quoted column name.
 java.lang.String getRealQueryColumnName()
          Returns the used name in the database (real column) for the query column.
 int getScale()
          Returns the scale of this column.
 int getSQLType()
          Returns the SQL type of this column.
 java.lang.String getSQLTypeName()
          Returns the SQL type name of this column.
 int getTypeIdentifier()
          Returns the used data type for this ServerColumnMetaData.
 boolean isAutoIncrement()
          Returns true if this ColumnMetaData is an auto increment column.
 boolean isCalculated()
          Returns whether this column is writeable.
 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(java.lang.Object[] pValues)
          Sets the allowed values for this column.
 void setAutoIncrement(boolean pAutoIncrement)
          Sets if this ColumnMetaData is an auto increment column.
 void setCalculated(boolean pCalculated)
          Sets whether this column is calculated.
 void setColumnMetaData(ColumnMetaData pColumnMetaData)
          Sets the ColumnMetaData client infos.
 void setDefaultValue(java.lang.Object pValue)
          Sets the default value of this column.
 void setDetectedType(int pDetectedType)
          Sets the detected type of this column.
 void setLabel(java.lang.String pLabel)
          Sets default label.
 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(java.lang.String pRealQueryColumnName)
          The name the use in the database (real column) to query the column.
 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(java.lang.String pSQLTypeName)
          Sets the SQL type name of this column.
 void setTypeIdentifier(int pTypeIdentifier)
          Sets the used data type this ColumnMetaData.
 void setWritable(boolean pWriteable)
          Sets whether this column is writeable.
 java.lang.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

ServerColumnMetaData

public ServerColumnMetaData(Name pName,
                            ColumnMetaData pColumnMetaData)
Constructs a ServerColumnMetaData with a specific name and Column MetaData.

Parameters:
pName - the column name
pColumnMetaData - the column metaData
Method Detail

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

clone

public ServerColumnMetaData clone()

Overrides:
clone in class java.lang.Object

getColumnMetaData

public ColumnMetaData getColumnMetaData()
Returns the ColumnMetaData client infos.

Returns:
the ColumnMetaData client infos.

setColumnMetaData

public void setColumnMetaData(ColumnMetaData pColumnMetaData)
Sets the ColumnMetaData client infos.

Parameters:
pColumnMetaData - the ColumnMetaData client infos.

getDataType

public IDataType getDataType()
It gets the corresponding IDataType to the meta data column.

Returns:
to the meta data column the corresponding IDataType.

getName

public java.lang.String getName()
Returns the column name.

Returns:
the column name

getQuotedName

public java.lang.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 java.lang.String getLabel()
Returns the default label.

Returns:
the default label.

setLabel

public void setLabel(java.lang.String pLabel)
Sets default label.

Parameters:
pLabel - the default label. to set

setTypeIdentifier

public void setTypeIdentifier(int pTypeIdentifier)
Sets the used data type this ColumnMetaData.

Parameters:
pTypeIdentifier - the type identifier for this ColumnMetaData.

getTypeIdentifier

public int getTypeIdentifier()
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 java.lang.String getSQLTypeName()
Returns the SQL type name of this column.

Returns:
the SQL type name of this column.

setSQLTypeName

public void setSQLTypeName(java.lang.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.

setCalculated

public void setCalculated(boolean pCalculated)
Sets whether this column is calculated.

Parameters:
pCalculated - true if column is calculated.

isCalculated

public boolean isCalculated()
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

setDefaultValue

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

Parameters:
pValue - the default value

getDefaultValue

public java.lang.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(java.lang.Object[] pValues)
Sets the allowed values for this column.

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

getAllowedValues

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

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

getRealQueryColumnName

public java.lang.String getRealQueryColumnName()
Returns the used name in the database (real column) for the query column.

Returns:
the name for the query column.

setRealQueryColumnName

public void setRealQueryColumnName(java.lang.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.