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

org.deegree.io.datastore.schema.content
Class MappingField

java.lang.Object
  extended by org.deegree.io.datastore.schema.content.MappingField
All Implemented Interfaces:
SimpleContent
Direct Known Subclasses:
MappingGeometryField

public class MappingField
extends Object
implements SimpleContent

Encapsulates a field of the backend (e.g. an SQL table column).

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
MappingField(String table, String field, int type)
          Creates a new instance of MappingField from the given parameters with no automatic generation of values.
MappingField(String table, String field, int type, boolean auto)
          Creates a new instance of MappingField from the given parameters.
 
Method Summary
 boolean equals(Object other)
           
 String getField()
          Returns the name of the backend's (e.g. database) field.
 String getTable()
          Returns the name of the backend's (e.g. database) table.
 int getType()
          Returns the SQL type code of the field.
 boolean isAuto()
          Returns whether the backend generates the value automatically on insert.
 boolean isNumeric()
          Returns true if the field has a numerical type.
 boolean isSortable()
          Returns true, because a db field is (in general) suitable as a sort criterion.
 boolean isUpdateable()
          Returns true, because a db field may be updated.
 void setTable(String table)
          Sets the table to the given table name.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MappingField

public MappingField(String table,
                    String field,
                    int type,
                    boolean auto)
Creates a new instance of MappingField from the given parameters.

Parameters:
table -
field -
type - type code
auto -
See Also:
Types

MappingField

public MappingField(String table,
                    String field,
                    int type)
Creates a new instance of MappingField from the given parameters with no automatic generation of values.

Parameters:
table -
field -
type -
See Also:
Types
Method Detail

isUpdateable

public boolean isUpdateable()
Returns true, because a db field may be updated.

Specified by:
isUpdateable in interface SimpleContent
Returns:
true, because a db field may be updated

isSortable

public boolean isSortable()
Returns true, because a db field is (in general) suitable as a sort criterion.

Specified by:
isSortable in interface SimpleContent
Returns:
true, because a db field is (in general) suitable as a sort criterion

getTable

public String getTable()
Returns the name of the backend's (e.g. database) table.

Returns:
the table name

setTable

public void setTable(String table)
Sets the table to the given table name. This is currently needed, as MappedGMLSchema must be able to resolve unspecified (null) table names.

Parameters:
table - table name to set

getField

public String getField()
Returns the name of the backend's (e.g. database) field.

Returns:
the field name

getType

public int getType()
Returns the SQL type code of the field.

Returns:
the SQL type code
See Also:
Types

isAuto

public boolean isAuto()
Returns whether the backend generates the value automatically on insert.

Returns:
true, if a value for this field is generated automatically, false otherwise

isNumeric

public boolean isNumeric()
Returns true if the field has a numerical type.

Returns:
true if the field has a numerical type, false otherwise
See Also:
Types

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class 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