org.jcoderz.phoenix.sqlparser
Class ColumnSpec

java.lang.Object
  extended by org.jcoderz.phoenix.sqlparser.ColumnSpec

public class ColumnSpec
extends Object

Author:
Albrecht Messner

Constructor Summary
ColumnSpec()
           
 
Method Summary
 void addAttribute(ColumnAttribute attr)
          Adds an attribute to this column spec.
 void addDatatypeAttribute(ColumnAttribute attr)
          Adds an attribute to the datatype of this colspec.
 String getAnnotation()
           
 List getAttributes()
          Returns a list of all attributes of this colspec.
 String getColumnName()
          Returns the name of this column.
 String getColumnType()
          Returns the data type for this column.
 String getCurrencyColumn()
           
 List getDatatypeAttributes()
          Returns the datatype attributes of this colspec.
 String getJavaType()
          Returns the java type to which this column maps.
 String getLoadMethod()
          Returns the method used when loading the custom type from the db.
 String getPeriodEndDateColumn()
           
 String getPeriodFieldName()
           
 String getStoreMethod()
          Returns the method used when storing the type to the db.
 String getWeblogicColumnType()
           
 boolean isNotNull()
          Returns whether this column is not null.
 boolean isPeriodDefined()
           
 boolean isPrimaryKey()
          Returns whether this column is primary key.
 boolean isSkipInInterface()
           
 boolean isUnique()
           
 boolean isWeblogicColumnTypeDefined()
           
 void setAnnotation(String annotation)
           
 void setColumnName(String string)
          Sets the name of this column.
 void setColumnType(String string)
          Sets the data type for this column.
 void setCurrencyColumn(String currencyColumn)
           
 void setIsPeriodDefined(boolean periodDefined)
           
 void setJavaType(String type)
          Sets the java type for this column.
 void setLoadMethod(String methodName)
          Sets the method used when loading the custom type from the db.
 void setNotNull(boolean b)
          Set whether this column is not null.
 void setPeriodEndDateColumn(String endDateColumn)
           
 void setPeriodFieldName(String periodFieldName)
           
 void setPrimaryKey(boolean b)
          Set whether this column is primary key or not.
 void setSkipInInterface(boolean b)
           
 void setStoreMethod(String methodName)
          Sets the method used when storing the type to the db.
 void setUnique(boolean isUnique)
           
 void setWeblogicColumnType(String weblogicColumnType)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColumnSpec

public ColumnSpec()
Method Detail

getColumnName

public final String getColumnName()
Returns the name of this column.

Returns:
the name of this column

setColumnName

public final void setColumnName(String string)
Sets the name of this column.

Parameters:
string - the name of this column

getColumnType

public final String getColumnType()
Returns the data type for this column.

Returns:
the data type for this column

setColumnType

public final void setColumnType(String string)
Sets the data type for this column.

Parameters:
string - the data type

getAttributes

public final List getAttributes()
Returns a list of all attributes of this colspec. The elements of this list are of type ColumnAttribute.

Returns:
a list of all attributes of this colspec

addAttribute

public final void addAttribute(ColumnAttribute attr)
Adds an attribute to this column spec.

Parameters:
attr - the attribute to add

addDatatypeAttribute

public final void addDatatypeAttribute(ColumnAttribute attr)
Adds an attribute to the datatype of this colspec.

Parameters:
attr - the datatype attribute that should be added

getDatatypeAttributes

public final List getDatatypeAttributes()
Returns the datatype attributes of this colspec.

Returns:
a list of datatype attributes

getJavaType

public final String getJavaType()
Returns the java type to which this column maps.

Returns:
the java type to which this column maps

setJavaType

public final void setJavaType(String type)
Sets the java type for this column.

Parameters:
type - the java type for this column

getLoadMethod

public final String getLoadMethod()
Returns the method used when loading the custom type from the db.

Returns:
the method used when loading the custom type from the db

setLoadMethod

public final void setLoadMethod(String methodName)
Sets the method used when loading the custom type from the db.

Parameters:
methodName - the method used when loading the custom type from the db

getStoreMethod

public final String getStoreMethod()
Returns the method used when storing the type to the db.

Returns:
the method used when storing the type to the db

setStoreMethod

public final void setStoreMethod(String methodName)
Sets the method used when storing the type to the db.

Parameters:
methodName - the method used when storing the type to the db

isNotNull

public final boolean isNotNull()
Returns whether this column is not null.

Returns:
true if this column is not null, false otherwise

setNotNull

public final void setNotNull(boolean b)
Set whether this column is not null.

Parameters:
b - flag indicating whether this column is not null

isPrimaryKey

public final boolean isPrimaryKey()
Returns whether this column is primary key.

Returns:
true if this column is primary key, false otherwise

setPrimaryKey

public final void setPrimaryKey(boolean b)
Set whether this column is primary key or not.

Parameters:
b - flag indicating whether this column is primary key

isUnique

public boolean isUnique()
Returns:
Returns the isUnique.

setUnique

public void setUnique(boolean isUnique)
Parameters:
isUnique - The isUnique to set.

toString

public final String toString()

Overrides:
toString in class Object

setAnnotation

public void setAnnotation(String annotation)

getAnnotation

public String getAnnotation()

getCurrencyColumn

public String getCurrencyColumn()
Returns:
Returns the currencyColumn.

setCurrencyColumn

public void setCurrencyColumn(String currencyColumn)
Parameters:
currencyColumn - The currencyColumn to set.

isPeriodDefined

public boolean isPeriodDefined()

setIsPeriodDefined

public void setIsPeriodDefined(boolean periodDefined)

getPeriodFieldName

public String getPeriodFieldName()

setPeriodFieldName

public void setPeriodFieldName(String periodFieldName)

getPeriodEndDateColumn

public String getPeriodEndDateColumn()

setPeriodEndDateColumn

public void setPeriodEndDateColumn(String endDateColumn)

isSkipInInterface

public boolean isSkipInInterface()

setSkipInInterface

public void setSkipInInterface(boolean b)

getWeblogicColumnType

public String getWeblogicColumnType()

setWeblogicColumnType

public void setWeblogicColumnType(String weblogicColumnType)

isWeblogicColumnTypeDefined

public boolean isWeblogicColumnTypeDefined()


Copyright 2007 The jCoderZ Project.