org.edg.info.sqlutil.parsql
Class ColumnDefinition

java.lang.Object
  extended byorg.edg.info.sqlutil.parsql.ColumnDefinition

public class ColumnDefinition
extends java.lang.Object

Definition of a column in an SQL CREATE TABLE statement.


Constructor Summary
ColumnDefinition()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if cd represents exactly the same ColumnDefinition statement as 'this'.
 java.lang.String getName()
          Returns the name.
 java.lang.String getType()
          Returns the type.
 boolean isEquivalentTo(ColumnDefinition cd)
          Returns true if the given ColumnDefinition is equivalent to (in type terms) this ColumnDefinition.
 boolean isNotNull()
          Returns the notNull flag.
 boolean isPrimaryKey()
          Returns the primaryKey flag.
 void setName(java.lang.String name)
          Sets the name.
 void setNotNull(boolean notNull)
          Sets the notNull flag.
 void setPrimaryKey(boolean primaryKey)
          Sets the primaryKey flag.
 void setType(java.lang.String type)
          Sets the type.
 java.lang.String toString()
          Returns object as a string.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColumnDefinition

public ColumnDefinition()
Method Detail

setName

public void setName(java.lang.String name)
Sets the name.

Parameters:
name - The name to set

getName

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

Returns:
Column name.

setNotNull

public void setNotNull(boolean notNull)
Sets the notNull flag.

Parameters:
notNull - The notNull to set

isNotNull

public boolean isNotNull()
Returns the notNull flag.

Returns:
The notNull flag.

setPrimaryKey

public void setPrimaryKey(boolean primaryKey)
Sets the primaryKey flag.

Parameters:
primaryKey - The primaryKey flag to set

isPrimaryKey

public boolean isPrimaryKey()
Returns the primaryKey flag.

Returns:
The primaryKey flag

setType

public void setType(java.lang.String type)
Sets the type.

Parameters:
type - The type to set

getType

public java.lang.String getType()
Returns the type.

Returns:
The column type.

equals

public boolean equals(java.lang.Object obj)
Returns true if cd represents exactly the same ColumnDefinition statement as 'this'. Overrides Object#equals(Object).

Parameters:
obj - Object for comparison.
Returns:
True if this object matches the given Object.

isEquivalentTo

public boolean isEquivalentTo(ColumnDefinition cd)
Returns true if the given ColumnDefinition is equivalent to (in type terms) this ColumnDefinition.

Parameters:
cd - ColumnDefinition.
Returns:
True if this object is equivalent to the given ColumnDefinition.

toString

public java.lang.String toString()
Returns object as a string.

Returns:
Object as a String.