Package de.xima.fc.dao.impl
Class ProjektZaehlerDatenDao
- java.lang.Object
-
- de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
-
- de.xima.fc.dao.impl.GenericDao<ProjektZaehlerDaten>
-
- de.xima.fc.dao.impl.ProjektZaehlerDatenDao
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<ProjektZaehlerDaten,Long,IEntityContext>,IGenericDao<ProjektZaehlerDaten>,IProjektZaehlerDatenDao
public class ProjektZaehlerDatenDao extends GenericDao<ProjektZaehlerDaten> implements IProjektZaehlerDatenDao
-
-
Constructor Summary
Constructors Constructor Description ProjektZaehlerDatenDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProjektZaehlerDatencreate(IEntityContext ec, long projektId, Date date)ProjektZaehlerDatencreate(IEntityContext ec, Projekt projekt, Date date)intdeleteByProject(IEntityContext ec, Date start, Date end, Long projectId)Deletes the statistics of the project with the provided ID, optionally filtered by the provided date range.org.apache.commons.lang3.tuple.Pair<Date,Date>findActivityDateRange(IEntityContext ec, String toOneAttr, Long toOneId)Does a look-up for the date of the first and the date of the last 'ProjektZaehlerDaten' record, optionally filtered by Mandant or project.List<ProjektZaehlerDaten>getAllByDateInterval(IEntityContext ec, Date start, Date end)Loads project statistics for the system scope (all Mandants) for a certain date interval.List<ProjektZaehlerDaten>getAllByMandant(IEntityContext ec, Date start, Date end, Mandant mandant)Loads project statistics for the projects of a certain Mandant for a certain date interval.List<ProjektZaehlerDaten>getAllByMandant(IEntityContext ec, Date start, Date end, Long mandantId)Loads project statistics for the projects of a certain Mandant for a certain date interval.List<ProjektZaehlerDaten>getAllByProjekt(IEntityContext ec, Date start, Date end, Projekt projekt)Loads project statistics for a certain project and a certain date interval.List<ProjektZaehlerDaten>getAllByProjekt(IEntityContext ec, Date start, Date end, Long projektId)Loads project statistics for a certain project and a certain date interval.ProjektZaehlerDatengetByDate(IEntityContext ec, long projektId, Date date)ProjektZaehlerDatengetByDate(IEntityContext ec, Projekt projekt, Date date)-
Methods inherited from class de.xima.fc.dao.impl.GenericDao
getEntityRefs, getPostActionHook, getPreActionHook, read
-
Methods inherited from class de.xima.cmn.dao.AbstractDao
all, bulkDelete, bulkUpdate, cb, checkLockingVersion, cq, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, notifyListener, notifyListener, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao
all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from interface de.xima.fc.dao.interfaces.IGenericDao
count, createOrUpdate, findAll, findSingle, getEntityRefs, read
-
-
-
-
Method Detail
-
create
public ProjektZaehlerDaten create(IEntityContext ec, long projektId, Date date)
- Specified by:
createin interfaceIProjektZaehlerDatenDao
-
create
public ProjektZaehlerDaten create(IEntityContext ec, Projekt projekt, Date date)
- Specified by:
createin interfaceIProjektZaehlerDatenDao
-
getByDate
public ProjektZaehlerDaten getByDate(IEntityContext ec, long projektId, Date date)
- Specified by:
getByDatein interfaceIProjektZaehlerDatenDao
-
getByDate
public ProjektZaehlerDaten getByDate(IEntityContext ec, Projekt projekt, Date date)
- Specified by:
getByDatein interfaceIProjektZaehlerDatenDao
-
getAllByDateInterval
public List<ProjektZaehlerDaten> getAllByDateInterval(IEntityContext ec, Date start, Date end)
Description copied from interface:IProjektZaehlerDatenDaoLoads project statistics for the system scope (all Mandants) for a certain date interval.- Specified by:
getAllByDateIntervalin interfaceIProjektZaehlerDatenDao- Parameters:
ec- the entity context to usestart- start date of the desired interval (inclusive), must not be nullend- end date of the desired interval (also inclusive), must not be null- Returns:
- an unmodifiable list containing the queried project statistics, ascendingly sorted by
ProjektZaehlerDaten.ATTR_DATUMandProjektZaehlerDaten.ATTR_STUNDE. - Since:
- 8.5.5
-
getAllByMandant
public List<ProjektZaehlerDaten> getAllByMandant(IEntityContext ec, Date start, Date end, Mandant mandant)
Description copied from interface:IProjektZaehlerDatenDaoLoads project statistics for the projects of a certain Mandant for a certain date interval.- Specified by:
getAllByMandantin interfaceIProjektZaehlerDatenDao- Parameters:
ec- the entity context to usestart- start date of the desired interval (inclusive), must not be nullend- end date of the desired interval (also inclusive), must not be nullmandant- the Mandant to get the statistics for- Returns:
- the queried project statistics
-
getAllByMandant
public List<ProjektZaehlerDaten> getAllByMandant(IEntityContext ec, Date start, Date end, Long mandantId)
Description copied from interface:IProjektZaehlerDatenDaoLoads project statistics for the projects of a certain Mandant for a certain date interval.- Specified by:
getAllByMandantin interfaceIProjektZaehlerDatenDao- Parameters:
ec- the entity context to usestart- start date of the desired interval (inclusive), must not be nullend- end date of the desired interval (also inclusive), must not be nullmandantId- ID of the Mandant to get the statistics for- Returns:
- an unmodifiable list with the desired project statistics.
-
getAllByProjekt
public List<ProjektZaehlerDaten> getAllByProjekt(IEntityContext ec, Date start, Date end, Projekt projekt)
Description copied from interface:IProjektZaehlerDatenDaoLoads project statistics for a certain project and a certain date interval.- Specified by:
getAllByProjektin interfaceIProjektZaehlerDatenDao- Parameters:
ec- the entity context to usestart- start date of the desired interval (inclusive), must not be nullend- end date of the desired interval (also inclusive), must not be nullprojekt- the project to get the statistics for- Returns:
- an unmodifiable list with the desired project statistics.
-
getAllByProjekt
public List<ProjektZaehlerDaten> getAllByProjekt(IEntityContext ec, Date start, Date end, Long projektId)
Description copied from interface:IProjektZaehlerDatenDaoLoads project statistics for a certain project and a certain date interval.- Specified by:
getAllByProjektin interfaceIProjektZaehlerDatenDao- Parameters:
ec- the entity context to usestart- start date of the desired interval (inclusive), must not be nullend- end date of the desired interval (also inclusive), must not be nullprojektId- ID of the project to get the statistics for- Returns:
- an unmodifiable list with the desired project statistics.
-
findActivityDateRange
public org.apache.commons.lang3.tuple.Pair<Date,Date> findActivityDateRange(IEntityContext ec, String toOneAttr, Long toOneId)
Description copied from interface:IProjektZaehlerDatenDaoDoes a look-up for the date of the first and the date of the last 'ProjektZaehlerDaten' record, optionally filtered by Mandant or project. If the 'toOneAttribute' parameter is null, no filtering will be applied.- Specified by:
findActivityDateRangein interfaceIProjektZaehlerDatenDao- Parameters:
ec- the entity context to usetoOneAttr- the name of the attribute to filter by (e.g.IProjektDependent.ATTR_PROJEKT)toOneId- the ID belonging to the related 'toOneAttribute' parameter (e.g. the project's ID)- Returns:
- the requested date pair or null, if there're no related records
-
deleteByProject
public int deleteByProject(IEntityContext ec, Date start, Date end, Long projectId)
Description copied from interface:IProjektZaehlerDatenDaoDeletes the statistics of the project with the provided ID, optionally filtered by the provided date range.- Specified by:
deleteByProjectin interfaceIProjektZaehlerDatenDao- Parameters:
ec- the entity context to usestart- start date of the desired interval (inclusive), may be nullend- end date of the desired interval (also inclusive), may be nullprojectId- ID of the project whose statistics are to be deleted, must not be null- Returns:
- the number of deleted statistics records
-
-