public class PostgresLibraryItemDAO extends java.lang.Object implements LibraryItemDAO
| Constructor and Description |
|---|
PostgresLibraryItemDAO(java.sql.Connection connection) |
| Modifier and Type | Method and Description |
|---|---|
int |
countAll() |
LibraryItem |
create(LibraryItem libraryItem) |
void |
delete(LibraryItem libraryItem) |
LibraryItem[] |
findAll() |
LibraryItem |
findById(int libraryItem) |
java.lang.String[] |
getCastings() |
java.lang.String[] |
getCategories() |
static LibraryItem |
libraryItemFromRow(java.sql.ResultSet result) |
void |
update(LibraryItem libraryItem) |
void |
updateBooking(LibraryItem libraryItem) |
public PostgresLibraryItemDAO(java.sql.Connection connection)
public static LibraryItem libraryItemFromRow(java.sql.ResultSet result) throws java.sql.SQLException
java.sql.SQLExceptionpublic LibraryItem create(LibraryItem libraryItem) throws InternalException
create in interface LibraryItemDAOInternalExceptionpublic LibraryItem[] findAll() throws InternalException
findAll in interface LibraryItemDAOInternalExceptionpublic LibraryItem findById(int libraryItem) throws InternalException, NoLibraryItemFoundException
findById in interface LibraryItemDAOInternalExceptionNoLibraryItemFoundExceptionpublic void update(LibraryItem libraryItem) throws InternalException
update in interface LibraryItemDAOInternalExceptionpublic void delete(LibraryItem libraryItem) throws InternalException
delete in interface LibraryItemDAOInternalExceptionpublic void updateBooking(LibraryItem libraryItem) throws InternalException
updateBooking in interface LibraryItemDAOInternalExceptionpublic java.lang.String[] getCategories()
throws InternalException
getCategories in interface LibraryItemDAOInternalExceptionpublic java.lang.String[] getCastings()
throws InternalException
getCastings in interface LibraryItemDAOInternalExceptionpublic int countAll()
throws InternalException
countAll in interface LibraryItemDAOInternalException