org.apache.ws.jaxme.sqls.impl
Class AbstractColumn

java.lang.Object
  extended by org.apache.ws.jaxme.sqls.impl.AbstractColumn
All Implemented Interfaces:
BinaryColumn, Column, StringColumn
Direct Known Subclasses:
ColumnImpl, VirtualColumn

public abstract class AbstractColumn
extends java.lang.Object
implements Column, StringColumn, BinaryColumn

Author:
Jochen Wiedmann

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.ws.jaxme.sqls.Column
Column.Name, Column.Type
 
Nested classes/interfaces inherited from interface org.apache.ws.jaxme.sqls.Column
Column.Name, Column.Type
 
Nested classes/interfaces inherited from interface org.apache.ws.jaxme.sqls.Column
Column.Name, Column.Type
 
Constructor Summary
protected AbstractColumn(Column.Name pName, Column.Type pType)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.Object getCustomData()
          Allows the user to retrieve application specific data, which has previously been attached to the column.
 java.lang.Long getLength()
          If the column has fixed length: Returns the columns length.
 Column.Name getName()
          Returns the columns name.
 Column.Type getType()
          Returns the columns type.
 boolean hasFixedLength()
          Returns whether the column has fixed or variable length.
 int hashCode()
           
 boolean isBinaryColumn()
          Returns whether this Column may be casted to a BinaryColumn.
 boolean isNullable()
          Returns whether the column is nullable.
 boolean isStringColumn()
          Returns whether this Column may be casted to a StringColumn.
 void setCustomData(java.lang.Object pCustomData)
          Allows the user to attach application specific data to the column.
 void setLength(long pLength)
          Shortcut for setLength(new Integer(pLength)).
 void setLength(java.lang.Long pLength)
          If the column has fixed length: Sets the columns length.
 void setNullable(boolean pNullable)
          Sets whether the column is nullable.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.ws.jaxme.sqls.Column
getQName, getTable, isPrimaryKeyPart, isVirtual
 
Methods inherited from interface org.apache.ws.jaxme.sqls.Column
getQName, getTable, isPrimaryKeyPart, isVirtual
 
Methods inherited from interface org.apache.ws.jaxme.sqls.Column
getQName, getTable, isPrimaryKeyPart, isVirtual
 

Constructor Detail

AbstractColumn

protected AbstractColumn(Column.Name pName,
                         Column.Type pType)
Method Detail

getName

public Column.Name getName()
Description copied from interface: Column

Returns the columns name.

Specified by:
getName in interface Column

getType

public Column.Type getType()
Description copied from interface: Column

Returns the columns type.

Specified by:
getType in interface Column

isNullable

public boolean isNullable()
Description copied from interface: Column

Returns whether the column is nullable. By default columns are not nullable.

Specified by:
isNullable in interface Column

setNullable

public void setNullable(boolean pNullable)
Description copied from interface: Column

Sets whether the column is nullable. By default columns are not nullable.

Specified by:
setNullable in interface Column

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

hasFixedLength

public boolean hasFixedLength()
Description copied from interface: BinaryColumn

Returns whether the column has fixed or variable length.

Specified by:
hasFixedLength in interface BinaryColumn
Specified by:
hasFixedLength in interface StringColumn

isStringColumn

public boolean isStringColumn()
Description copied from interface: Column

Returns whether this Column may be casted to a StringColumn.

Specified by:
isStringColumn in interface Column

isBinaryColumn

public boolean isBinaryColumn()
Description copied from interface: Column

Returns whether this Column may be casted to a BinaryColumn.

Specified by:
isBinaryColumn in interface Column

setLength

public void setLength(java.lang.Long pLength)
Description copied from interface: BinaryColumn

If the column has fixed length: Sets the columns length. Otherwise sets the columns maximum length.

Specified by:
setLength in interface BinaryColumn
Specified by:
setLength in interface StringColumn

setLength

public void setLength(long pLength)
Description copied from interface: BinaryColumn

Shortcut for setLength(new Integer(pLength)).

Specified by:
setLength in interface BinaryColumn
Specified by:
setLength in interface StringColumn

getLength

public java.lang.Long getLength()
Description copied from interface: BinaryColumn

If the column has fixed length: Returns the columns length. Otherwise returns the columns maximum length.

Specified by:
getLength in interface BinaryColumn
Specified by:
getLength in interface StringColumn

getCustomData

public java.lang.Object getCustomData()
Description copied from interface: Column

Allows the user to retrieve application specific data, which has previously been attached to the column.

Specified by:
getCustomData in interface Column

setCustomData

public void setCustomData(java.lang.Object pCustomData)
Description copied from interface: Column

Allows the user to attach application specific data to the column.

Specified by:
setCustomData in interface Column