Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.heckmansoft.surjey.model.datastore
Class ResponseDatastore

    java.lang.Object
      com.heckmansoft.surjey.model.datastore.Datastore
          com.heckmansoft.surjey.model.datastore.ResponseDatastore

Direct Known Subclasses:
  ResponseManager

public class ResponseDatastore
extends Datastore

Manages object-relational mapping for Response objects.

Constructor Summary
`ResponseDatastore()` Constructor.

Method Summary
`protected Response` | `createResponse()` Create a new response.
`protected ValueObject` | `extract(java.sql.ResultSet results)` Extract an object from the given result set.
`Response` | `findById(java.lang.String id)` Finds a particular response.
`java.util.List` | `findBySurveyIdAndAddress(java.lang.String surveyId, java.lang.String address)` Finds a particular response.
`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

### ResponseDatastore

    public ResponseDatastore()

  Constructor.

Method Detail

### findById

    public Response findById(java.lang.String id)
                      throws DatastoreException

  Finds a particular response.

  Parameters:
    `id` - Id of the response to find.
  Returns:
    A Response instance, or null if no response found
  Throws:
    `DatastoreException`

### findBySurveyIdAndAddress

    public java.util.List findBySurveyIdAndAddress(java.lang.String surveyId,
                                                   java.lang.String address)
                                            throws DatastoreException

  Finds a particular response.

  Parameters:
    `surveyId` - Survey id of the survey for which to find responses.
    `address` - Address of the respondent for which to find responses.
  Returns:
    A List of Response instances
  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`

### createResponse

    protected Response createResponse()

  Create a new response.

  Returns:
    newly created response.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD