org.devaki.nextobjects.workspace.models.columns
Class Column

java.lang.Object
  extended byorg.devaki.nextobjects.workspace.models.columns.Column
All Implemented Interfaces:
java.io.Serializable, java.awt.datatransfer.Transferable

public class Column
extends java.lang.Object
implements java.io.Serializable, java.awt.datatransfer.Transferable

This class is responsible for describing a Column object.

Author:
Emmanuel Florent
See Also:
Serialized Form

Constructor Summary
Column(Column pcolumn)
          Construct a new column object by copying another column object
Column(java.lang.String pName, java.lang.String pCode, ColumnType pType, java.lang.String pSize, java.lang.String pDefaultValue, boolean pPrimaryKey, boolean pRequired, boolean pAutoIncrement, boolean pUnique, boolean pIndex, java.lang.String pJavaName, java.lang.String pJavaType, java.lang.String pInheritance, java.lang.String pInputValidator, java.lang.String pJavaNamingMethod, java.lang.String pDescription, BaseClass pParent)
          Construct a new column object
 
Method Summary
 java.lang.String getCode()
          Return the code of the field
 java.lang.String getDefaultValue()
          Return the default value of the field
 java.lang.String getDescription()
          Get description
 CustomTreeNode getDynamicTreeNode()
          Get the CustomTreeNode object associated
static java.awt.datatransfer.DataFlavor getFieldFlavor()
          Get the field flavor
 java.lang.String getInheritance()
          Get inheritance
 java.util.Vector getInheritanceLinks()
          Get inheritance
 java.lang.String getInputValidator()
          Get input validator
 java.lang.String getJavaName()
          Get the Java Name
 java.lang.String getJavaNamingMethod()
          Get the Java Naming Method
 java.lang.String getJavaType()
          Get the preferred Java Type
 java.lang.String getName()
          Return the name of the field
 BaseClass getParent()
          Return the torque-gui related to the current field
 java.lang.String getSize()
          Return the length of the field
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor parFlavor)
          Return the object to be used by the clipboard
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
          Return the flavors
 ColumnType getType()
          Return the type of the field
 boolean isAutoIncrement()
          Return if the field has auto incrementation or not
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor parFlavor)
          Is the data supported by this class
 boolean isForeignKey()
          Check if it is a FK
 boolean isIndex()
          Is the constraint to be indexed
 boolean isPk()
          Return if the field is primary key or not
 boolean isRequired()
          Return if the field is required or not
 boolean isUnique()
          Do the column have a unique constraint
 void lostOwnership(java.awt.datatransfer.Clipboard parClipboard, java.awt.datatransfer.Transferable parTransferable)
          Need to be defined
 void setAutoIncrement(boolean pAutoIncrement)
          Define if the field has auto incrementation
 void setCode(java.lang.String pCode)
          Give a code to the field
 void setDefaultValue(java.lang.String pDefaultValue)
          Give a default value to the field
 void setDescription(java.lang.String pDescription)
          Set description
 void setDynamicTreeNode(CustomTreeNode pNode)
          Defines the CustomTreeNode associated to the current object
 void setForeignKey(boolean b)
          Set if is a FK
 void setIndex(boolean b)
          Set if there is an index to be created for this column
 void setInheritance(java.lang.String pInheritance)
          Set inheritance
 void setInheritanceLinks(java.util.Vector pInheritanceLinks)
          Set inheritance links
 void setInputValidator(java.lang.String pInputValidator)
          Set input validator
 void setJavaName(java.lang.String pJavaName)
          Set the Java Name
 void setJavaNamingMethod(java.lang.String pJavaNamingMethod)
          Set java naming method
 void setJavaType(java.lang.String pJavaType)
          Set the preferred Java Type
 void setName(java.lang.String pName)
          Give a name to the field
 void setParent(BaseClass pParent)
          Set the torque-gui related to the current field
 void setPrimaryKey(boolean pPrimaryKey)
          Define if the field is primary key
 void setRequired(boolean pRequired)
          Define if the field is required
 void setSize(java.lang.String pSize)
          Give a length to the field
 void setType(ColumnType pType)
          Give a type to the field
 void setUnique(boolean b)
          Set if this column is unique in the class.
 java.lang.String toString()
          Returns a string representation of the field
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Column

public Column(java.lang.String pName,
              java.lang.String pCode,
              ColumnType pType,
              java.lang.String pSize,
              java.lang.String pDefaultValue,
              boolean pPrimaryKey,
              boolean pRequired,
              boolean pAutoIncrement,
              boolean pUnique,
              boolean pIndex,
              java.lang.String pJavaName,
              java.lang.String pJavaType,
              java.lang.String pInheritance,
              java.lang.String pInputValidator,
              java.lang.String pJavaNamingMethod,
              java.lang.String pDescription,
              BaseClass pParent)
Construct a new column object

Parameters:
pName - the human readable name
pCode - the code aka id
pType - the type
pSize - the optional length
pDefaultValue - the default value
pPrimaryKey - is PK
pRequired - is Req.
pAutoIncrement - is autoincrmeent
pUnique - is visible
pIndex - is index
pJavaName - java name
pJavaType - java type
pInheritance - the inheritance
pInputValidator - the input validator
pJavaNamingMethod - java naming method
pDescription - the description
pParent - the owner class

Column

public Column(Column pcolumn)
Construct a new column object by copying another column object

Parameters:
pcolumn - the column
Method Detail

toString

public final java.lang.String toString()
Returns a string representation of the field

Returns:
the human readable name

setDescription

public final void setDescription(java.lang.String pDescription)
Set description

Parameters:
pDescription - the description

setJavaNamingMethod

public final void setJavaNamingMethod(java.lang.String pJavaNamingMethod)
Set java naming method

Parameters:
pJavaNamingMethod - the java naming method

setInputValidator

public final void setInputValidator(java.lang.String pInputValidator)
Set input validator

Parameters:
pInputValidator - the input validator

setInheritance

public final void setInheritance(java.lang.String pInheritance)
Set inheritance

Parameters:
pInheritance - the inheritance

setInheritanceLinks

public final void setInheritanceLinks(java.util.Vector pInheritanceLinks)
Set inheritance links

Parameters:
pInheritanceLinks - inheritance links

setJavaType

public final void setJavaType(java.lang.String pJavaType)
Set the preferred Java Type

Parameters:
pJavaType - the java type

setJavaName

public final void setJavaName(java.lang.String pJavaName)
Set the Java Name

Parameters:
pJavaName - the java name

setName

public final void setName(java.lang.String pName)
Give a name to the field

Parameters:
pName - the human readeable name

setCode

public final void setCode(java.lang.String pCode)
Give a code to the field

Parameters:
pCode - the code

setType

public final void setType(ColumnType pType)
Give a type to the field

Parameters:
pType - the data type

setSize

public final void setSize(java.lang.String pSize)
Give a length to the field

Parameters:
pSize - the optional column length

setDefaultValue

public final void setDefaultValue(java.lang.String pDefaultValue)
Give a default value to the field

Parameters:
pDefaultValue - the default value

setPrimaryKey

public final void setPrimaryKey(boolean pPrimaryKey)
Define if the field is primary key

Parameters:
pPrimaryKey - is PK

setRequired

public final void setRequired(boolean pRequired)
Define if the field is required

Parameters:
pRequired - is Req.

setAutoIncrement

public final void setAutoIncrement(boolean pAutoIncrement)
Define if the field has auto incrementation

Parameters:
pAutoIncrement - has auto incrementation

setParent

public final void setParent(BaseClass pParent)
Set the torque-gui related to the current field

Parameters:
pParent - the parent class

setDynamicTreeNode

public final void setDynamicTreeNode(CustomTreeNode pNode)
Defines the CustomTreeNode associated to the current object

Parameters:
pNode - the node

getDescription

public final java.lang.String getDescription()
Get description

Returns:
the description

getJavaNamingMethod

public final java.lang.String getJavaNamingMethod()
Get the Java Naming Method

Returns:
the java naming method

getInputValidator

public final java.lang.String getInputValidator()
Get input validator

Returns:
the input validator

getInheritance

public final java.lang.String getInheritance()
Get inheritance

Returns:
the inheritance

getInheritanceLinks

public final java.util.Vector getInheritanceLinks()
Get inheritance

Returns:
the inheritance links

getJavaType

public final java.lang.String getJavaType()
Get the preferred Java Type

Returns:
the java type

getJavaName

public final java.lang.String getJavaName()
Get the Java Name

Returns:
the java name

getName

public final java.lang.String getName()
Return the name of the field

Returns:
the human readable name

getCode

public final java.lang.String getCode()
Return the code of the field

Returns:
the code, id

getType

public final ColumnType getType()
Return the type of the field

Returns:
the column type

getSize

public final java.lang.String getSize()
Return the length of the field

Returns:
the size for that type

getDefaultValue

public final java.lang.String getDefaultValue()
Return the default value of the field

Returns:
the default value

isPk

public final boolean isPk()
Return if the field is primary key or not

Returns:
i sPK

isRequired

public final boolean isRequired()
Return if the field is required or not

Returns:
isReq.

isAutoIncrement

public final boolean isAutoIncrement()
Return if the field has auto incrementation or not

Returns:
has autoincrementation

getParent

public final BaseClass getParent()
Return the torque-gui related to the current field

Returns:
the owner class

getDynamicTreeNode

public final CustomTreeNode getDynamicTreeNode()
Get the CustomTreeNode object associated

Returns:
the node

getTransferDataFlavors

public final java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Return the flavors

Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable
Returns:
the data flavor

isDataFlavorSupported

public final boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor parFlavor)
Is the data supported by this class

Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable
Parameters:
parFlavor - the data flavor
Returns:
accepted

getTransferData

public final java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor parFlavor)
                                       throws java.awt.datatransfer.UnsupportedFlavorException
Return the object to be used by the clipboard

Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Parameters:
parFlavor - the data flavor
Returns:
the transfer data
Throws:
java.awt.datatransfer.UnsupportedFlavorException - clipboard exception

lostOwnership

public final void lostOwnership(java.awt.datatransfer.Clipboard parClipboard,
                                java.awt.datatransfer.Transferable parTransferable)
Need to be defined

Parameters:
parClipboard - parent clipboard
parTransferable - the transferable object

isForeignKey

public final boolean isForeignKey()
Check if it is a FK

Returns:
is FK

setForeignKey

public final void setForeignKey(boolean b)
Set if is a FK

Parameters:
b - isFK

setIndex

public final void setIndex(boolean b)
Set if there is an index to be created for this column

Parameters:
b - is index

setUnique

public final void setUnique(boolean b)
Set if this column is unique in the class. If a unique constraint is added.

Parameters:
b - isUnique

isUnique

public final boolean isUnique()
Do the column have a unique constraint

Returns:
is Unique

isIndex

public final boolean isIndex()
Is the constraint to be indexed

Returns:
is Indexed

getFieldFlavor

public static java.awt.datatransfer.DataFlavor getFieldFlavor()
Get the field flavor

Returns:
the field flavor


Copyright © 2002-2004 devaki.org. All Rights Reserved.