gov.usda.gdpc.database
Class StringDatabaseMapping

java.lang.Object
  extended bygov.usda.gdpc.database.AbstractDatabaseMapping
      extended bygov.usda.gdpc.database.SimpleDatabaseMapping
          extended bygov.usda.gdpc.database.StringDatabaseMapping
All Implemented Interfaces:
DatabaseMapping
Direct Known Subclasses:
PanzeaLocalityDatabaseMapping, PanzeaLocusDatabaseMapping, PanzeaOntologyDatabaseMapping

public class StringDatabaseMapping
extends SimpleDatabaseMapping

Author:
terryc

Field Summary
 
Fields inherited from class gov.usda.gdpc.database.SimpleDatabaseMapping
myDBTable, myField
 
Fields inherited from class gov.usda.gdpc.database.AbstractDatabaseMapping
myProperty
 
Constructor Summary
StringDatabaseMapping(Property property, java.lang.String dbtable, java.lang.String field)
          StringDatabaseMapping Constructor.
 
Method Summary
 java.lang.String getSQLSubString(Filter filter, ExtraInfo extraInfo)
          Gets the SQL sub-string based on the given filter.
 java.lang.String toString()
          Returns the string representation of this database mapping.
 
Methods inherited from class gov.usda.gdpc.database.SimpleDatabaseMapping
equals, getDBTable, getDistinctSQL, getField, getJavaObjects
 
Methods inherited from class gov.usda.gdpc.database.AbstractDatabaseMapping
getProperty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringDatabaseMapping

public StringDatabaseMapping(Property property,
                             java.lang.String dbtable,
                             java.lang.String field)
StringDatabaseMapping Constructor. This represents a simple string mapping from a property to a field in a database table.

Parameters:
property - associated property. null is creating a mapping to use for matching against a property map.
dbtable - database table
field - database field from table
Method Detail

getSQLSubString

public java.lang.String getSQLSubString(Filter filter,
                                        ExtraInfo extraInfo)
Gets the SQL sub-string based on the given filter.

Specified by:
getSQLSubString in interface DatabaseMapping
Overrides:
getSQLSubString in class SimpleDatabaseMapping
Parameters:
filter - filter
extraInfo - this is not used by this database mapping
Returns:
SQL sub-string

toString

public java.lang.String toString()
Returns the string representation of this database mapping.

Overrides:
toString in class SimpleDatabaseMapping
Returns:
string representation