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.SQLException
public Loan create(Loan loan) throws InternalException
create
in interface LoanDAO
InternalException
public Loan[] findByCardId(java.lang.String idCard) throws InternalException, NoClientFoundException
findByCardId
in interface LoanDAO
InternalException
NoClientFoundException
public Loan[] findAll() throws InternalException
findAll
in interface LoanDAO
InternalException
public Loan getLatestLoanByItemId(int idItem) throws InternalException, NoLoanFoundException, NoLibraryItemFoundException
getLatestLoanByItemId
in interface LoanDAO
InternalException
NoLoanFoundException
NoLibraryItemFoundException
public int countAll() throws InternalException
countAll
in interface LoanDAO
InternalException
public Loan[] findCurrentLoans(java.lang.String idCard) throws InternalException
findCurrentLoans
in interface LoanDAO
InternalException