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.SQLException
public Client create(Client client) throws InternalException, CardIdAlreadyExist
create
in interface ClientDAO
InternalException
CardIdAlreadyExist
public Client findById(int idClient) throws InternalException, NoClientFoundException
findById
in interface ClientDAO
InternalException
NoClientFoundException
public Client findByCardID(java.lang.String cardID) throws InternalException, NoClientFoundException
findByCardID
in interface ClientDAO
cardID
- 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 ClientDAO
InternalException
public void update(Client client) throws InternalException, CardIdAlreadyExist
update
in interface ClientDAO
InternalException
CardIdAlreadyExist
public void delete(Client client) throws InternalException
delete
in interface ClientDAO
InternalException
public int countLoans(Client client) throws InternalException
countLoans
in interface ClientDAO
InternalException
public int countCurrentLoans(Client client) throws InternalException
countCurrentLoans
in interface ClientDAO
InternalException
public java.lang.Boolean validSubscription(Client client) throws InternalException
validSubscription
in interface ClientDAO
InternalException
public int countAll() throws InternalException
countAll
in interface ClientDAO
InternalException
public int countFines(Client client) throws InternalException
countFines
in interface ClientDAO
InternalException
public int countVotes(Client client) throws InternalException
countVotes
in interface ClientDAO
InternalException