com.heckmansoft.surjey.model.datastore
Class QuestionTypeDatastore

java.lang.Object
  extended bycom.heckmansoft.surjey.model.datastore.Datastore
      extended bycom.heckmansoft.surjey.model.datastore.QuestionTypeDatastore

public class QuestionTypeDatastore
extends Datastore

Manages object-relational mapping for QuestionType objects.


Constructor Summary
QuestionTypeDatastore()
          Constructor.
 
Method Summary
protected  QuestionType createQuestionType()
          Create a new question type.
protected  ValueObject extract(java.sql.ResultSet results)
          Extract an object from the given result set.
 QuestionType findById(java.lang.String id)
          Finds particular question type.
protected  java.util.List getArgs(ValueObject vo)
          From the given object, get a list of arguments to use for constructing a query or update.
 
Methods inherited from class com.heckmansoft.surjey.model.datastore.Datastore
executeDelete, executeInsert, executeUpdate, extract, extractList, extractSingle, findAll, generateDeleteSQL, generateInsertSQL, generateSelectSQL, generateUpdateSQL, getConnection, getTransaction, insert, insert, populateStatement, remove, remove, remove, selectAll, selectById, selectWhere, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuestionTypeDatastore

public QuestionTypeDatastore()
Constructor.

Method Detail

findById

public QuestionType findById(java.lang.String id)
                      throws DatastoreException
Finds particular question type.

Parameters:
id - Id of the question type to find.
Returns:
The QuestionType instance, or null if no match found
Throws:
DatastoreException

getArgs

protected java.util.List getArgs(ValueObject vo)
From the given object, get a list of arguments to use for constructing a query or update.

Overrides:
getArgs in class Datastore
Parameters:
vo - Object containing data to use.
Returns:
A list of arguments.

extract

protected ValueObject extract(java.sql.ResultSet results)
                       throws DatastoreException
Extract an object from the given result set.

Overrides:
extract in class Datastore
Parameters:
results - The result set.
Returns:
The newly extracted object.
Throws:
DatastoreException

createQuestionType

protected QuestionType createQuestionType()
Create a new question type.

Returns:
newly created question type.