deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.io.datastore.sql.transaction.insert
Class InsertField

java.lang.Object
  extended by org.deegree.io.datastore.sql.transaction.insert.InsertField
Direct Known Subclasses:
InsertGeometryField

public class InsertField
extends Object

A field of an InsertRow.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Constructor Summary
InsertField(InsertRow row, String columnName, InsertField referencedField)
          Creates a new InsertField instance.
InsertField(InsertRow row, String columnName, int sqlType, Object value, boolean isPK)
          Creates a new InsertField instance.
 
Method Summary
(package private)  void addReferencingField(InsertField referencingField)
           
 String getColumnName()
          Returns the name of the column that this InsertField represents.
 InsertField getReferencedField()
          Returns the InsertField that this InsertField references.
(package private)  InsertRow getReferencedRow()
          Returns the InsertRow that is referenced by this InsertField.
(package private)  Collection<InsertField> getReferencingFields()
          Returns all fields that reference this field.
(package private)  Collection<InsertRow> getReferencingRows()
          Returns all rows that reference this field.
 InsertRow getRow()
          Returns the InsertRow that this InsertField belongs to.
 int getSQLType()
          Returns the sql type code for the column.
 String getTable()
          Returns the name of the table that this InsertField belongs to.
 Object getValue()
          Returns the value to be inserted.
 boolean isPK()
          Returns whether this InsertField is a primary key of the table.
 void relinkField(InsertField field)
          Sets this InsertField to be a reference to the given InsertField.
 void removeReferencingField(InsertField referencingField)
          Removes the given InsertField from the list of references to this InsertField.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InsertField

InsertField(InsertRow row,
            String columnName,
            int sqlType,
            Object value,
            boolean isPK)
Creates a new InsertField instance.

Parameters:
row -
columnName -
sqlType -
value -
isPK -

InsertField

InsertField(InsertRow row,
            String columnName,
            InsertField referencedField)
Creates a new InsertField instance.

Parameters:
row -
columnName -
referencedField -
Method Detail

getRow

public InsertRow getRow()
Returns the InsertRow that this InsertField belongs to.

Returns:
the InsertRow that this InsertField belongs to

getTable

public String getTable()
Returns the name of the table that this InsertField belongs to.

Returns:
the name of the table that this InsertField belongs to

isPK

public boolean isPK()
Returns whether this InsertField is a primary key of the table.

Returns:
true, if this InsertField is a primary key of the table, false otherwise

getColumnName

public String getColumnName()
Returns the name of the column that this InsertField represents.

Returns:
the name of the column that this InsertField represents

getSQLType

public int getSQLType()
Returns the sql type code for the column.

Returns:
the sql type code for the column

getValue

public Object getValue()
Returns the value to be inserted.

Returns:
the value to be inserted

getReferencedField

public InsertField getReferencedField()
Returns the InsertField that this InsertField references.

Returns:
the referenced InsertField or null, if no field is referenced

getReferencedRow

InsertRow getReferencedRow()
Returns the InsertRow that is referenced by this InsertField.

Returns:
the referenced InsertRow

relinkField

public void relinkField(InsertField field)
Sets this InsertField to be a reference to the given InsertField.

Parameters:
field -

addReferencingField

void addReferencingField(InsertField referencingField)
Parameters:
referencingField -

removeReferencingField

public void removeReferencingField(InsertField referencingField)
Removes the given InsertField from the list of references to this InsertField.

Parameters:
referencingField -

getReferencingFields

Collection<InsertField> getReferencingFields()
Returns all fields that reference this field.

Returns:
all fields that reference this field

getReferencingRows

Collection<InsertRow> getReferencingRows()
Returns all rows that reference this field.

Returns:
all rows that reference this field

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org