Package com.logicaldoc.report
Interface ReportDAO
- All Superinterfaces:
com.logicaldoc.core.PersistentObjectDAO<Report>
- All Known Implementing Classes:
HibernateReportDAO
DAO for
Report handling.- Since:
- 7.3.1
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanZombies(long tenantId) Cleans the status of zombie reportsfindByName(String name, long tenantId) Finds the report with the given namefindByUser(long userId) Finds the reports accessible by the given userfindZombies(long tenantId) Retrieves all the reports that are running for more than one hourstatic ReportDAOget()Gets the object available in the application contextSet<com.logicaldoc.core.security.Permission> getAllowedPermissions(long reportId, long userId) Finds all permissions of a user enabled on the specified reportbooleanisReadAllowed(long reportId, long userId) This method is looking up for read rights for a report and an userbooleanisWriteAllowed(long reportId, long userId) This method is looking up for writing rights for a report and an uservoidStores the report and it's design fileMethods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, initialize, isMariaDB, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, store
-
Method Details
-
get
Gets the object available in the application context- Returns:
- the instance of this object in the application context
-
store
Stores the report and it's design file- Parameters:
report- the report to storedesign- the file containing the report's design- Throws:
com.logicaldoc.core.PersistenceException- error at data layer
-
findByName
Finds the report with the given name- Parameters:
name- unique name of the reporttenantId- identifier of the tenant- Returns:
- the found report
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
findByUser
Finds the reports accessible by the given user- Parameters:
userId- identifier of the user- Returns:
- the found reports
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
findZombies
Retrieves all the reports that are running for more than one hour- Parameters:
tenantId- identifier of the tenant- Returns:
- list of reports
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
cleanZombies
void cleanZombies(long tenantId) throws com.logicaldoc.core.PersistenceException Cleans the status of zombie reports- Parameters:
tenantId- identifier of the tenant- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
isWriteAllowed
boolean isWriteAllowed(long reportId, long userId) throws com.logicaldoc.core.PersistenceException This method is looking up for writing rights for a report and an user- Parameters:
reportId- ID of the reportuserId- ID of the user- Returns:
- id the user has write permission
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
isReadAllowed
boolean isReadAllowed(long reportId, long userId) throws com.logicaldoc.core.PersistenceException This method is looking up for read rights for a report and an user- Parameters:
reportId- ID of the noteuserId- ID of the user- Returns:
- if the user can access the note
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
getAllowedPermissions
Set<com.logicaldoc.core.security.Permission> getAllowedPermissions(long reportId, long userId) throws com.logicaldoc.core.PersistenceException Finds all permissions of a user enabled on the specified report- Parameters:
reportId- ID of the reportuserId- ID of the user- Returns:
- Collection of enabled permissions
- Throws:
com.logicaldoc.core.PersistenceException- error at data layer
-