| Constructor and Description |
|---|
PostgresLoanDAO(java.sql.Connection connection) |
| Modifier and Type | Method and Description |
|---|---|
int |
countAll() |
Loan |
create(Loan loan) |
Loan[] |
findAll() |
Loan[] |
findByCardId(java.lang.String idCard) |
Loan[] |
findCurrentLoans(java.lang.String idCard) |
Loan |
getLatestLoanByItemId(int idItem) |
static Loan |
loanFromRow(java.sql.ResultSet resultSet) |
public static Loan loanFromRow(java.sql.ResultSet resultSet) throws java.sql.SQLException
java.sql.SQLExceptionpublic Loan create(Loan loan) throws InternalException
create in interface LoanDAOInternalExceptionpublic Loan[] findByCardId(java.lang.String idCard) throws InternalException, NoClientFoundException
findByCardId in interface LoanDAOInternalExceptionNoClientFoundExceptionpublic Loan[] findAll() throws InternalException
findAll in interface LoanDAOInternalExceptionpublic Loan getLatestLoanByItemId(int idItem) throws InternalException, NoLoanFoundException, NoLibraryItemFoundException
getLatestLoanByItemId in interface LoanDAOInternalExceptionNoLoanFoundExceptionNoLibraryItemFoundExceptionpublic int countAll()
throws InternalException
countAll in interface LoanDAOInternalExceptionpublic Loan[] findCurrentLoans(java.lang.String idCard) throws InternalException
findCurrentLoans in interface LoanDAOInternalException