Class ClientStorage
java.lang.Object
org.exoplatform.timetracker.storage.ClientStorage
Storage service to access / load and save Clients. This service will be
used , as well, to convert from JPA entity to DTO.
- Version:
- $Id: $Id
- Author:
- medamine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcountClients.createClient(Client client) createClient.voiddeleteClient(long clientId) deleteClient.getClientById(long ClientId) getClientById.getClients.toDTO(ClientEntity clientEntity) toDTO.toEntity.updateClient(Client client) updateClient.
-
Constructor Details
-
ClientStorage
Constructor for ClientStorage.
- Parameters:
clientDAO- aClientDAOobject.
-
-
Method Details
-
createClient
createClient.
-
updateClient
updateClient.
-
deleteClient
public void deleteClient(long clientId) throws org.gatein.api.EntityNotFoundException deleteClient.
- Parameters:
clientId- a long.- Throws:
org.gatein.api.EntityNotFoundException- if any.
-
getClientById
getClientById.
- Parameters:
ClientId- a long.- Returns:
- a
Clientobject.
-
getClients
getClients.
- Returns:
- a
Listobject.
-
countClients
public long countClients()countClients.
- Returns:
- a long.
-
toDTO
toDTO.
- Parameters:
clientEntity- aClientEntityobject.- Returns:
- a
Clientobject.
-
toEntity
toEntity.
- Parameters:
client- aClientobject.- Returns:
- a
ClientEntityobject.
-