public interface SubjectDAO
Modifier and Type | Method and Description |
---|---|
Long |
getSubjectIdByDescription(Subject subject) |
ArrayList |
getSubjects()
Retrieves all subjects from the database
|
Subject |
insert(Subject subject)
Inserts *this* into the database.
|
void |
setSubjectIds(ArrayList subjects)
Walks input ArrayList pf
Subject instances, looking up and
setting ID properties for each Subject in the list. |
Subject insert(Subject subject) throws LibraryException
LibraryException
void setSubjectIds(ArrayList subjects) throws LibraryException
Subject
instances, looking up and
setting ID properties for each Subject in the list. Lookup is based on
the description property. If a Subject is not found, a new entry is
inserted into the database and the ID of the newly created record is
assigned to the instance.subjects
- = ArrayList of SubjectsLibraryException
- if the list contains objects that are not
Subject instances or a data access error occursArrayList getSubjects() throws LibraryException
LibraryException
Long getSubjectIdByDescription(Subject subject) throws LibraryException
LibraryException
Copyright © 2003-2017 The Virtual Library Team. All Rights Reserved.