deegree 2.5 (2011/06/29 09:44 build-8-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 java.lang.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(java.lang.String table, java.lang.String field, int type)
          Creates a new instance of MappingField from the given parameters with no automatic generation of values.
MappingField(java.lang.String table, java.lang.String field, int type, boolean auto)
          Creates a new instance of MappingField from the given parameters.
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.lang.String getField()
          Returns the name of the backend's (e.g. database) field.
 java.lang.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(java.lang.String table)
          Sets the table to the given table name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MappingField

public MappingField(java.lang.String table,
                    java.lang.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(java.lang.String table,
                    java.lang.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 java.lang.String getTable()
Returns the name of the backend's (e.g. database) table.

Returns:
the table name

setTable

public void setTable(java.lang.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 java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

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

deegree 2.5 (2011/06/29 09:44 build-8-official)

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