Class SettingsStorage
java.lang.Object
org.exoplatform.timetracker.storage.SettingsStorage
Storage service to access / load and save Codes. This service will be used ,
as well, to convert from JPA entity to DTO.
- Version:
- $Id: $Id
- Author:
- medamine
-
Constructor Summary
ConstructorsConstructorDescriptionSettingsStorage(WorkTimeDAO workTimeDAO, LocationDAO locationDAO, OfficeDAO officeDAO) Constructor for SettingsStorage. -
Method Summary
Modifier and TypeMethodDescriptionlongcountLocations.longcountOffices.longcountWorkTimes.createLocation(Location location) createLocation.createOffice(Office office) createOffice.createWorkTime(WorkTime workTime) createWorkTime.voiddeleteLocation(String code) deleteLocation.voiddeleteOffice(String code) deleteOffice.voiddeleteWorkTime(long workTimeId) deleteWorkTime.getLocationByCode(String code) getLocationById.getLocations.getOfficeByCode(String code) getOfficeById.getOffices.getWorkTimeById(long WorkTimeId) getWorkTimeById.getWorkTimes.toLocationDTO(LocationEntity locationEntity) toLocationDTO.toLocationEntity(Location location) toLocationEntity.toOfficeDTO(OfficeEntity officeEntity) toOfficeDTO.toOfficeEntity(Office office) toOfficeEntity.toWorkTimeDTO(WorkTimeEntity workTimeEntity) toWorkTimeDTO.toWorkTimeEntity(WorkTime workTime) toWorkTimeEntity.updateLocation(Location location) updateLocation.updateOffice(Office office) updateOffice.updateWorkTime(WorkTime workTime) updateWorkTime.
-
Constructor Details
-
SettingsStorage
Constructor for SettingsStorage.
- Parameters:
workTimeDAO- aWorkTimeDAOobject.locationDAO- aLocationDAOobject.officeDAO- aOfficeDAOobject.
-
-
Method Details
-
createWorkTime
createWorkTime.
-
updateWorkTime
updateWorkTime.
-
deleteWorkTime
public void deleteWorkTime(long workTimeId) throws org.gatein.api.EntityNotFoundException deleteWorkTime.
- Parameters:
workTimeId- a long.- Throws:
org.gatein.api.EntityNotFoundException- if any.
-
getWorkTimeById
getWorkTimeById.
- Parameters:
WorkTimeId- a long.- Returns:
- a
WorkTimeobject.
-
getWorkTimes
getWorkTimes.
- Returns:
- a
Listobject.
-
countWorkTimes
public long countWorkTimes()countWorkTimes.
- Returns:
- a long.
-
toWorkTimeDTO
toWorkTimeDTO.
- Parameters:
workTimeEntity- aWorkTimeEntityobject.- Returns:
- a
WorkTimeobject.
-
toWorkTimeEntity
toWorkTimeEntity.
- Parameters:
workTime- aWorkTimeobject.- Returns:
- a
WorkTimeEntityobject.
-
createLocation
createLocation.
-
updateLocation
updateLocation.
-
deleteLocation
deleteLocation.
- Parameters:
code- a String.- Throws:
org.gatein.api.EntityNotFoundException- if any.
-
getLocationByCode
getLocationById.
- Parameters:
code- a String.- Returns:
- a
Locationobject.
-
getLocations
getLocations.
- Returns:
- a
Listobject.
-
countLocations
public long countLocations()countLocations.
- Returns:
- a long.
-
toLocationDTO
toLocationDTO.
- Parameters:
locationEntity- aLocationEntityobject.- Returns:
- a
Locationobject.
-
toLocationEntity
toLocationEntity.
- Parameters:
location- aLocationobject.- Returns:
- a
LocationEntityobject.
-
createOffice
createOffice.
-
updateOffice
updateOffice.
-
deleteOffice
deleteOffice.
- Parameters:
code- a String.- Throws:
org.gatein.api.EntityNotFoundException- if any.
-
getOfficeByCode
getOfficeById.
- Parameters:
code- a long.- Returns:
- a
Officeobject.
-
getOffices
getOffices.
- Returns:
- a
Listobject.
-
countOffices
public long countOffices()countOffices.
- Returns:
- a long.
-
toOfficeDTO
toOfficeDTO.
- Parameters:
officeEntity- aOfficeEntityobject.- Returns:
- a
Officeobject.
-
toOfficeEntity
toOfficeEntity.
- Parameters:
office- aOfficeobject.- Returns:
- a
OfficeEntityobject.
-