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.manager
Class SurveyManager

    java.lang.Object
      com.heckmansoft.surjey.model.datastore.Datastore
          com.heckmansoft.surjey.model.datastore.SurveyDatastore
              com.heckmansoft.surjey.model.manager.SurveyManager

public class SurveyManager
extends SurveyDatastore

Manages Survey objects.

Constructor Summary
`SurveyManager()` Constructor.

Method Summary
`Survey` | `createSurvey()` Create a new survey.
`ValueObjectList` | `getSections(java.lang.String id)` Get all sections for survey with given id
`boolean` | `insert(Survey survey)` Creates a managed Survey instance from survey.
`boolean` | `remove(java.lang.String id)` Removes survey with given id.
`boolean` | `remove(Survey survey)` Removes given survey.
`boolean` | `update(Survey survey)` Updates a particular survey.

Methods inherited from class com.heckmansoft.surjey.model.datastore.SurveyDatastore
`extract, findById, getArgs`

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, 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

### SurveyManager

    public SurveyManager()

  Constructor.

Method Detail

### insert

    public boolean insert(Survey survey)
                   throws DatastoreException

  Creates a managed Survey instance from survey. Creates all subordinate sections as well.

  Parameters:
    `survey` - A survey instance
  Returns:
    true if managed Survey instance was created successfully
  Throws:
    `DatastoreException`

### update

    public boolean update(Survey survey)
                   throws DatastoreException

  Updates a particular survey. Updates all subordinate sections as well.

  Parameters:
    `survey` - Survey instance containing updated data.
  Returns:
    true if survey is found and updated.
  Throws:
    `DatastoreException`

### remove

    public boolean remove(Survey survey)
                   throws DatastoreException

  Removes given survey.

  Parameters:
    `survey` - Survey to be removed.
  Returns:
    true if a matching survey is found and removed
  Throws:
    `DatastoreException`

### remove

    public boolean remove(java.lang.String id)
                   throws DatastoreException

  Removes survey with given id.

  Overrides:
    `remove` in class `Datastore`
  Parameters:
    `id` - Id of survey to be removed.
  Returns:
    true if a matching survey is found and removed
  Throws:
    `DatastoreException`

### getSections

    public ValueObjectList getSections(java.lang.String id)
                                throws DatastoreException

  Get all sections for survey with given id

  Parameters:
    `id` - Id of survey to find sections for.
  Returns:
    List of sections
  Throws:
    `DatastoreException`

### createSurvey

    public Survey createSurvey()

  Create a new survey.

  Overrides:
    `createSurvey` in class `SurveyDatastore`
  Returns:
    newly created survey.

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