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.SQLException
public LibraryItem create(LibraryItem libraryItem) throws InternalException
create
in interface LibraryItemDAO
InternalException
public LibraryItem[] findAll() throws InternalException
findAll
in interface LibraryItemDAO
InternalException
public LibraryItem findById(int libraryItem) throws InternalException, NoLibraryItemFoundException
findById
in interface LibraryItemDAO
InternalException
NoLibraryItemFoundException
public void update(LibraryItem libraryItem) throws InternalException
update
in interface LibraryItemDAO
InternalException
public void delete(LibraryItem libraryItem) throws InternalException
delete
in interface LibraryItemDAO
InternalException
public void updateBooking(LibraryItem libraryItem) throws InternalException
updateBooking
in interface LibraryItemDAO
InternalException
public java.lang.String[] getCategories() throws InternalException
getCategories
in interface LibraryItemDAO
InternalException
public java.lang.String[] getCastings() throws InternalException
getCastings
in interface LibraryItemDAO
InternalException
public int countAll() throws InternalException
countAll
in interface LibraryItemDAO
InternalException