public interface AuthorDAO
Modifier and Type | Method and Description |
---|---|
Long |
findAuthorByFirstLastName(Author author)
Finds the id of the given
Author object in the database,
using the firstName and lastName properties
to lookup the record. |
void |
insert(Author author)
Inserts the given author into the database.
|
void |
setAuthorIds(ArrayList authors)
Walks input ArrayList, looking up and setting ID properties for
each Author in the list.
|
void insert(Author author) throws LibraryException
Inserts the given author into the database. Has the side effect of
setting the id
field of author
to the
sequentially generated ID of the new record.
First checks to see if an author with the same
firstName
and lastName
as author
exists. If so, no insert is performed; but author.id
is
updated to the id of the previously existing record.
LibraryException
- if a data access error occursvoid setAuthorIds(ArrayList authors) throws LibraryException
authors
- = ArrayList of AuthorsLibraryException
Long findAuthorByFirstLastName(Author author) throws LibraryException
Author
object in the database,
using the firstName
and lastName
properties
to lookup the record.author
- Author to lookup by nameLibraryException
Copyright © 2003-2017 The Virtual Library Team. All Rights Reserved.