| Modifier and Type | Method and Description |
|---|---|
static Client |
clientFromRow(java.sql.ResultSet result) |
int |
countAll() |
int |
countCurrentLoans(Client client) |
int |
countFines(Client client) |
int |
countLoans(Client client) |
int |
countVotes(Client client) |
Client |
create(Client client) |
void |
delete(Client client) |
Client[] |
findAll() |
Client |
findByCardID(java.lang.String cardID) |
Client |
findById(int idClient) |
void |
update(Client client) |
java.lang.Boolean |
validSubscription(Client client) |
public static Client clientFromRow(java.sql.ResultSet result) throws java.sql.SQLException
java.sql.SQLExceptionpublic Client create(Client client) throws InternalException, CardIdAlreadyExist
create in interface ClientDAOInternalExceptionCardIdAlreadyExistpublic Client findById(int idClient) throws InternalException, NoClientFoundException
findById in interface ClientDAOInternalExceptionNoClientFoundExceptionpublic Client findByCardID(java.lang.String cardID) throws InternalException, NoClientFoundException
findByCardID in interface ClientDAOcardID - the card ID of the client to findInternalException - if an unexpected error occursNoClientFoundException - if no client with the given card ID was foundpublic Client[] findAll() throws InternalException
findAll in interface ClientDAOInternalExceptionpublic void update(Client client) throws InternalException, CardIdAlreadyExist
update in interface ClientDAOInternalExceptionCardIdAlreadyExistpublic void delete(Client client) throws InternalException
delete in interface ClientDAOInternalExceptionpublic int countLoans(Client client) throws InternalException
countLoans in interface ClientDAOInternalExceptionpublic int countCurrentLoans(Client client) throws InternalException
countCurrentLoans in interface ClientDAOInternalExceptionpublic java.lang.Boolean validSubscription(Client client) throws InternalException
validSubscription in interface ClientDAOInternalExceptionpublic int countAll()
throws InternalException
countAll in interface ClientDAOInternalExceptionpublic int countFines(Client client) throws InternalException
countFines in interface ClientDAOInternalExceptionpublic int countVotes(Client client) throws InternalException
countVotes in interface ClientDAOInternalException