gov.usda.gdpc.panzea
Class PanzeaGenotypeExperimentDatabaseMapping

java.lang.Object
  extended bygov.usda.gdpc.database.AbstractDatabaseMapping
      extended bygov.usda.gdpc.database.SimpleDatabaseMapping
          extended bygov.usda.gdpc.panzea.PanzeaGenotypeExperimentDatabaseMapping
All Implemented Interfaces:
DatabaseMapping

public class PanzeaGenotypeExperimentDatabaseMapping
extends SimpleDatabaseMapping

Author:
terryc

Field Summary
static int ALIGN_INDEX
           
static int POLY_INDEX
           
 
Fields inherited from class gov.usda.gdpc.database.SimpleDatabaseMapping
myDBTable, myField
 
Fields inherited from class gov.usda.gdpc.database.AbstractDatabaseMapping
myProperty
 
Constructor Summary
PanzeaGenotypeExperimentDatabaseMapping(Property property, java.lang.String dbtable, java.lang.String field)
          PanzeaGenotypeExperimentDatabaseMapping Constructor.
 
Method Summary
 java.util.List getJavaObjects(java.sql.ResultSet rs, ExtraInfo extraInfo)
          Gets the data from the given result set as Java objects.
 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
 
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
 

Field Detail

POLY_INDEX

public static final int POLY_INDEX
See Also:
Constant Field Values

ALIGN_INDEX

public static final int ALIGN_INDEX
See Also:
Constant Field Values
Constructor Detail

PanzeaGenotypeExperimentDatabaseMapping

public PanzeaGenotypeExperimentDatabaseMapping(Property property,
                                               java.lang.String dbtable,
                                               java.lang.String field)
PanzeaGenotypeExperimentDatabaseMapping Constructor. This is a specific simple database mapping that takes advantage of the where the data originated (polymorphism or alignment).

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

getJavaObjects

public java.util.List getJavaObjects(java.sql.ResultSet rs,
                                     ExtraInfo extraInfo)
                              throws java.sql.SQLException
Gets the data from the given result set as Java objects. The actual type of objects returned will match what's specified by the property associated with this mapping.

Specified by:
getJavaObjects in interface DatabaseMapping
Overrides:
getJavaObjects in class SimpleDatabaseMapping
Parameters:
rs - result set
extraInfo - this is extra information used by the database mapping to decide whether this is an alignment or a polymorphism.
Returns:
list of converted data
Throws:
java.sql.SQLException

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 extra information used by the database mapping to decide whether this is an alignment or a polymorphism.
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