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 SectionManager

    java.lang.Object
      com.heckmansoft.surjey.model.datastore.Datastore
          com.heckmansoft.surjey.model.datastore.SectionDatastore
              com.heckmansoft.surjey.model.manager.SectionManager

public class SectionManager
extends SectionDatastore

Manages Section objects.

Constructor Summary
`SectionManager()`

Method Summary
`Section` | `createSection()` Create a new section.
`Section` | `createSection(java.lang.String surveyId)` Create a new section.
`ValueObjectList` | `getQuestions(java.lang.String id)` For a given section id, get the subordinate questions.
`boolean` | `insert(Section section)` Creates a particular section.
`boolean` | `remove(Section section)` Removes given section.
`boolean` | `remove(java.lang.String id)` Removes section with given id.
`boolean` | `removeBySurveyId(java.lang.String id)` Removes all sections for a given survey.
`boolean` | `update(Section section)` Updates a particular section.

Methods inherited from class com.heckmansoft.surjey.model.datastore.SectionDatastore
`extract, findById, findBySurveyId, 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

### SectionManager

    public SectionManager()

Method Detail

### insert

    public boolean insert(Section section)
                   throws DatastoreException

  Creates a particular section.

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

### update

    public boolean update(Section section)
                   throws DatastoreException

  Updates a particular section.

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

### removeBySurveyId

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

  Removes all sections for a given survey.

  Overrides:
    `removeBySurveyId` in class `SectionDatastore`
  Parameters:
    `id` - Id of survey for which sections are to be removed
  Returns:
    true if all matching sections are found and removed
  Throws:
    `DatastoreException`

### remove

    public boolean remove(Section section)
                   throws DatastoreException

  Removes given section.

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

### remove

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

  Removes section with given id.

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

### getQuestions

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

  For a given section id, get the subordinate questions.

  Parameters:
    `id` - Section id to get the questions for.
  Returns:
    List of questions in section
  Throws:
    `DatastoreException`

### createSection

    public Section createSection()

  Create a new section.

  Overrides:
    `createSection` in class `SectionDatastore`
  Returns:
    newly created section.

### createSection

    public Section createSection(java.lang.String surveyId)
                          throws DatastoreException

  Create a new section.

  Returns:
    newly created section.
  Throws:
    `DatastoreException`

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