Package io.goobi.viewer.dao.impl
Class JPADAO
java.lang.Object
io.goobi.viewer.dao.impl.JPADAO
- All Implemented Interfaces:
IDAO
JPA-based implementation of
IDAO, providing all database access operations for the viewer.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAnnotation(CrowdsourcingAnnotation annotation) addAnnotation.booleanaddBookmarkList(BookmarkList bookmarkList) addBookmarkList.booleanaddCampaign(Campaign campaign) addCampaign.booleanaddCategory(CMSCategory category) addCategory.booleanaddCMSCollection(CMSCollection collection) addCMSCollection.booleanaddCMSComponent(PersistentCMSComponent persistentCMSComponent) booleanaddCMSMediaItem(CMSMediaItem item) addCMSMediaItem.booleanaddCMSNavigationItem.booleanaddCMSPage(CMSPage page) addCMSPage.booleanaddCMSPageTemplate(CMSPageTemplate template) booleanaddComment(Comment comment) addComment.booleanaddCommentGroup(CommentGroup commentGroup) addCommentGroup.booleanaddCustomWidget(CustomSidebarWidget widget) booleanAdds the given map to the database if no map of the same id already exists.booleanaddHighlight(HighlightData object) booleanaddIpRange(IpRange ipRange) addIpRange.booleanaddLicense(License license) addLicenseType.booleanaddLicenseType(LicenseType licenseType) addLicenseType.booleanaddRecordNote(CMSRecordNote note) Persist a newCMSRecordNote.booleanbooleanaddRole.booleanaddSearch.booleanbooleanaddStaticPage(CMSStaticPage page) addStaticPage.booleanaddTheme(ThemeConfiguration theme) booleanaddTicket(AccessTicket ticket) addTicket.booleanaddTranskribusJob.booleanaddUploadJob(UploadJob uploadJob) addDownloadJob.booleanaddUsageStatistics(DailySessionUsageStatistics statistics) booleanaddUser.booleanaddUserGroup(UserGroup userGroup) addUserGroup.booleanaddUserRole(UserRole userRole) addUserRole.booleanaddViewerMessage(ViewerMessage message) intchangeCampaignStatisticContributors(User fromUser, User toUser) ReplacedfromUserwithtoUserin the lists of annotators and reviewers an all campaign statistics.intchangeCommentsOwner(User fromUser, User toUser) Changes ownership of all comments fromfromUsertotoUser.booleanvoidclear()Currently noop since no persistence entity manager is kept.voidclose(EntityManager em) Operation to call after a query or other kind of transaction is complete.booleancolumnsExists(String tableName, String columnName) columnsExists.voidCallEntityTransaction.commit()on the current transaction of the given EntityManager.voidCommits a persistence context transaction.longcountCommentsForWork.static StringcreateCMSPageFilter(Map<String, Object> params, String pageParameter, List<Long> allowedTemplates, List<String> allowedSubthemes, List<String> allowedCategoryIds) createCMSPageFilter.booleandeleteAnnotation(CrowdsourcingAnnotation annotation) deleteAnnotation.booleandeleteBookmarkList(BookmarkList bookmarkList) deleteBookmarkList.booleandeleteCampaign(Campaign campaign) deleteCampaign.intDeletes given user from the lists of annotators and reviewers an all campaign statistics.booleandeleteCategory(CMSCategory category) deleteCategory.booleandeleteClientApplication(long id) booleandeleteCMSArchiveConfig.booleandeleteCMSCollection(CMSCollection collection) deleteCMSCollection.booleandeleteCMSComponent(PersistentCMSComponent component) booleandeleteCMSContent(CMSContent content) booleandeleteCMSMediaItem.booleandeleteCMSNavigationItem.booleandeleteCMSPage(CMSPage page) deleteCMSPage.booleandeleteComment(Comment comment) deleteComment.booleandeleteCommentGroup(CommentGroup commentGroup) deleteCommentGroup.intdeleteComments(String pi, User owner) booleanbooleandeleteGeoMap(GeoMap map) Deletes the givenGeoMapfrom the database.booleandeleteHighlight(Long id) booleandeleteIpRange(IpRange ipRange) deleteIpRange.booleandeleteLicense(License license) deleteLicenseType.booleandeleteLicenseType(LicenseType licenseType) deleteLicenseType.booleanDeletes an existingCMSRecordNote.booleanbooleandeleteRole(Role role) deleteRole.booleandeleteSearch(Search search) deleteSearch.booleandeleteSlider(CMSSlider slider) booleandeleteStaticPage.booleandeleteTheme(ThemeConfiguration theme) booleandeleteTicket(AccessTicket ticket) deleteTicket.booleandeleteTranskribusJob.booleandeleteUploadJob(UploadJob uploadJob) deleteDownloadJob.booleandeleteUsageStatistics(long id) booleandeleteUser(User user) deleteUser.booleandeleteUserGroup(UserGroup userGroup) deleteUserGroup.booleandeleteUserRole(UserRole userRole) deleteUserRole.booleandeleteViewerMessage(ViewerMessage message) intintexecuteUpdate(String query) longgetActiveTicketCount(Map<String, String> filters) getActiveTicketCount.getActiveTickets(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getActiveRecordAccessTickets.getAllAnnotations(String sortField, boolean descending) getAllAnnotationsByMotivation(String motivation) getAllBookmarkLists.getAllCampaigns.getAllCategories.getAllCMSCollectionItems.getAllCMSMediaItems.getAllCMSPages.getAllComments.Gets allGeoMaps in database.getAllIpRanges.getAllLicenses.getAllLicenseTypes.getAllMultiRecordNotes(boolean displayedNotesOnly) Get allCMSMultiRecordNotes.Gets all persistedCMSRecordNotes.getAllRoles.getAllSearches.getAllStaticPages.getAllTopCMSNavigationItems.getAllTranskribusJobs.getAllUserGroups.getAllUserRoles.getAllUsers(boolean refresh) getAllUsers.getAnnotation(Long id) Annotations *.longgetAnnotationCount(Map<String, String> filters) getAnnotationCount.longgetAnnotationCountForTarget(String pi, Integer page) getAnnotationCountForTarget.longgetAnnotations(int first, int pageSize, String sortField, boolean descending, String filterString, Map<String, Object> params) getAnnotations(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getAnnotations.getAnnotationsForCampaign(Campaign campaign) getAnnotationsForCampaign.getAnnotationsForCampaignAndTarget(Campaign campaign, String pi, Integer page) getAnnotationsForCampaignAndTarget.getAnnotationsForCampaignAndWork(Campaign campaign, String pi) getAnnotationsForCampaignAndWork.getAnnotationsForTarget(String pi, Integer page) getAnnotationsForTarget.getAnnotationsForTarget(String pi, Integer page, String motivation) getAnnotationsForUserId(Long userId, Integer maxResults, String sortField, boolean descending) getAnnotationsForWork.getBookmarkList(long id) getBookmarkList.getBookmarkList(String name, User user) getBookmarkList.getBookmarkListByShareKey(String shareKey) getBookmarkListByShareKey.longgetBookmarkListCount(User user) Gets number of bookmark lists owned by the given user.getBookmarkLists(User user) getBookmarkLists.getCampaign(Long id) getCampaign.longgetCampaignCount(Map<String, String> filters) getCampaignCount.getCampaignPageStatisticsForRecord.getCampaigns(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getCampaigns.getCampaignStatisticsForRecord(String pi, CrowdsourcingStatus status) getCampaignStatisticsForRecord.getCategory(Long id) getCategory.getCategoryByName(String name) getCategoryByName.getClientApplication(long id) getClientApplicationByClientId(String clientId) longgetCMSArchiveConfigCount(Map<String, String> filters) getCMSArchiveConfigCount.getCMSArchiveConfigs(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getCMSArchiveConfigs.getCMSCollection(String solrField, String solrFieldValue) getCMSCollection.getCMSCollections(String solrField) getCMSCollections.getCMSComponent(Long id) getCMSMediaItem(long id) getCMSMediaItem.getCMSMediaItemByFilename(String filename) getCMSMediaItemByFilename.getCMSMediaItemsByCategory(CMSCategory category) Gets a list of allCMSMediaItems which contain the given category.getCMSNavigationItem(long id) getCMSNavigationItem.getCMSPage(long id) getCMSPage.longgetCMSPageCount(Map<String, String> filters, List<Long> allowedTemplates, List<String> allowedSubthemes, List<String> allowedCategories) getCMSPageCount.longgetCMSPageCountByPropertyValue(String propertyName, String propertyValue) getCmsPageForStaticPage(String pageName) getCmsPageForStaticPage.getCMSPages(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, List<Long> allowedTemplates, List<String> allowedSubthemes, List<String> allowedCategories) getCMSPages.getCMSPagesByCategory(CMSCategory category) getCMSPagesByCategory.getCMSPagesByPropertyValue(String propertyName, String propertyValue) getCMSPagesForRecord(String pi, CMSCategory category) getCMSPagesForRecord.getCMSPagesForSubtheme(String subtheme) getCMSPagesWithRelatedPi(int first, int pageSize, LocalDateTime fromDate, LocalDateTime toDate) getCMSPagesWithRelatedPi.longgetCMSPageWithRelatedPiCount(LocalDateTime fromDate, LocalDateTime toDate) getCMSPageWithRelatedPiCount.getComment(long id) getComment.longgetCommentCount.getCommentGroup(long id) getCommentGroup.getComments(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, Set<String> targetPIs) getComments.getCommentsForPage(String pi, int page) getCommentsForPage.getCommentsForWork.getCommentsOfUser(User user, int maxResults, String sortField, boolean descending) Gets Comments created by a specific user.longgetCoreLicenseTypeCount(Map<String, String> filters) getCoreLicenseTypeCount.getCoreLicenseTypes(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getCoreLicenseTypes.longgetCountMediaItemsUsingCategory(CMSCategory category) longgetCountPagesUsingCategory(CMSCategory category) getCustomWidget(Long id) Get the single storedDisclaimer.Get a newEntityManagerfrom thefactory.Getter for the fieldfactory.getFutureHighlightsForDate(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, LocalDateTime date) Gets theGeoMapof the given mapId.getHighlight(Long id) getHighlights(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getIpRange(long id) getIpRange.getIpRange(String name) getIpRange.longgetIpRangeCount(Map<String, String> filters) getIpRangeCount.getIpRanges(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getIpRanges.getLicense(Long id) getLicense.longgetLicenseCount(LicenseType licenseType) Returns the number of licenses that use the given license type.getLicenses(ILicensee licensee) getLicenses(LicenseType licenseType) getLicenseType(long id) getLicenseType.getLicenseType(String name) getLicenseType.longgetLicenseTypeCount(Map<String, String> filters) getLicenseTypeCount.getLicenseTypes(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getLicenseTypes.getLicenseTypes(List<String> names) Returns all license types that match the given name list.Returns the only existing instance of MaintenanceMode.getNativeQueryResults(String query) getOverridingLicenseType(LicenseType licenseType) getPagesUsingMap(GeoMap map) Returns a list of CMS-pages embedding the given map.Returns a list of CMS-pages embedding the given map in a sidebar widget.getPagesUsingSlider(CMSSlider slider) getPagesWithComments.getPastHighlightsForDate(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, LocalDateTime date) getPublicBookmarkLists.getQuestion(Long id) getQuestion.getRecordLicenseTypes.getRecordNote(Long id) Gets aCMSRecordNoteby its id property.getRecordNotes(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) Gets a paginated list ofCMSRecordNotes.getRecordNotesForPi(String pi, boolean displayedNotesOnly) Gets allCMSRecordNotes for the given pi.getRelatedNavItem(CMSPage page) getRelatedNavItem.getRole(long id) getRole.getRole.longgetRoleCount(Map<String, String> filters) getRoleCount.getRoles.getSearch(long id) getSearch.longgetSearchCount(User owner, Map<String, String> filters) getSearchCount.getSearches(User owner) getSearches.getSearches(User owner, int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getSearches.getStaticPageForCMSPage.getStaticPageForTypeType(PageType pageType) getStaticPageForTypeType.getTicketByPasswordHash(String passwordHash) longgetTranskribusJobs(String pi, String transkribusUserId, JobStatus status) getTranskribusJobs.getUploadJobsForCreatorId(Long creatorId) getUploadJobsWithStatus(JobStatus status) getUsageStatistics(LocalDate date) getUsageStatistics(LocalDate start, LocalDate end) getUser(long id) getUser.getUserByEmail(String email) getUserByEmail.getUserByNickname(String nickname) getUserByNickname.getUserByOpenId(String identifier) getUserByOpenId.longgetUserCount(Map<String, String> filters) getUserCount.getUserGroup(long id) getUserGroup.getUserGroup(String name) getUserGroup.longgetUserGroupCount(Map<String, String> filters) getUserGroupCount.getUserGroups(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getUserGroups.getUserGroups(User owner) getUserGroups.longgetUserRoleCount(UserGroup userGroup, User user, Role role) getUserRoleCount.getUserRoles(UserGroup userGroup, User user, Role role) getUserRoles.getUsers.getUsersByPropertyValue(String propertyName, String propertyValue) getUsersFilterQuery(String param) getViewerMessage(Long id) getViewerMessageByMessageID(String messageId) longgetViewerMessageCount(Map<String, String> filters) getViewerMessageCount.getViewerMessages(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getViewerMessages.voidHandling of exceptions occurred duringIDAO.commitTransaction(EntityManager)Usually callsEntityTransaction.rollback()on the current transaction of the given EntityManager.voidHandling of exceptions occurred duringIDAO.commitTransaction(EntityTransaction).booleanisCMSPagesForRecordHaveUpdates(String pi, CMSCategory category, LocalDateTime fromDate, LocalDateTime toDate) isCMSPagesForRecordHaveUpdates.voidpreQuery()Operation to call before getting an entity manager. currently noopbooleanremoveCMSPageTemplate(CMSPageTemplate template) booleanbooleanbooleansaveCMSArchiveConfig(CMSArchiveConfig config) saveCMSArchiveConfig.booleansaveCookieBanner(CookieBanner banner) booleansaveDisclaimer(Disclaimer disclaimer) booleansaveTermsOfUse(TermsOfUse tou) voidshutdown()shutdown.CallgetTransaction()on the given EntityManager and thenbegin()on the transaction.booleantableExists(String tableName) tableExists.booleanupdateAnnotation(CrowdsourcingAnnotation annotation) updateAnnotation.booleanupdateBookmarkList(BookmarkList bookmarkList) updateBookmarkList.booleanupdateCampaign(Campaign campaign) updateCampaign.booleanupdateCategory(CMSCategory category) updateCategory.booleanupdateCMSCollection(CMSCollection collection) updateCMSCollection.booleanupdateCMSMediaItem.booleanupdateCMSNavigationItem.booleanupdateCMSPage(CMSPage page) updateCMSPage.booleanupdateCMSPageTemplate(CMSPageTemplate template) booleanupdateComment(Comment comment) updateComment.booleanupdateCommentGroup(CommentGroup commentGroup) updateCommentGroup.booleanbooleanupdatedCMSComponent(PersistentCMSComponent persistentCMSComponent) booleanupdateGeoMap(GeoMap map) Updates the givenGeoMapin the database.booleanupdateHighlight(HighlightData object) booleanupdateIpRange(IpRange ipRange) updateIpRange.booleanupdateLicense(License license) updateLicenseType.booleanupdateLicenseType(LicenseType licenseType) updateLicenseType.booleanupdateMaintenanceMode(MaintenanceMode maintenanceMode) updateMaintenanceMode.booleanUpdates an existingCMSRecordNote.booleanbooleanupdateRole(Role role) updateRole.booleanupdateSearch(Search search) updateSearch.booleanupdateSlider(CMSSlider slider) booleanupdateStaticPage.booleanupdateTheme(ThemeConfiguration theme) booleanupdateTicket(AccessTicket ticket) updateTicket.booleanupdateTranskribusJob.booleanupdateUploadJob(UploadJob uploadJob) updateDownloadJob.booleanupdateUsageStatistics(DailySessionUsageStatistics statistics) booleanupdateUser(User user) updateUser.booleanupdateUserGroup(UserGroup userGroup) updateUserGroup.booleanupdateUserRole(UserRole userRole) updateUserRole.booleanupdateViewerMessage(ViewerMessage message)
-
Constructor Details
-
JPADAO
Creates a new JPADAO instance.- Throws:
DAOException- if any.
-
JPADAO
Creates a new JPADAO instance.- Parameters:
inPersistenceUnitName- persistence unit name; uses default when null or empty- Throws:
DAOException- if any.
-
-
Method Details
-
getFactory
Getter for the fieldfactory.- Specified by:
getFactoryin interfaceIDAO- Returns:
- the JPA EntityManagerFactory used by this DAO
-
getEntityManager
Get a newEntityManagerfrom thefactory.- Specified by:
getEntityManagerin interfaceIDAO- Returns:
EntityManagerfor the current thread
-
close
Operation to call after a query or other kind of transaction is complete.- Specified by:
closein interfaceIDAO- Parameters:
em- entity manager to close- Throws:
DAOException
-
startTransaction
CallgetTransaction()on the given EntityManager and thenbegin()on the transaction.- Specified by:
startTransactionin interfaceIDAO- Parameters:
em- the EntityManager whose transaction is started- Returns:
- the transaction gotten from the entity manager
-
commitTransaction
Commits a persistence context transaction. Only to be used following astartTransaction(EntityManager)call- Specified by:
commitTransactionin interfaceIDAO- Parameters:
et- the active entity transaction to commit- Throws:
PersistenceException- if the commit fails
-
commitTransaction
CallEntityTransaction.commit()on the current transaction of the given EntityManager.- Specified by:
commitTransactionin interfaceIDAO- Parameters:
em- EntityManager- Throws:
PersistenceException
-
handleException
Handling of exceptions occurred duringIDAO.commitTransaction(EntityTransaction). Usually callsEntityTransaction.rollback()- Specified by:
handleExceptionin interfaceIDAO- Parameters:
et- EntityTransaction- Throws:
PersistenceException
-
handleException
Handling of exceptions occurred duringIDAO.commitTransaction(EntityManager)Usually callsEntityTransaction.rollback()on the current transaction of the given EntityManager.- Specified by:
handleExceptionin interfaceIDAO- Parameters:
em- EntityManager
-
getAllUsers
getAllUsers.- Specified by:
getAllUsersin interfaceIDAO- Parameters:
refresh- true to bypass cache and reload from database- Returns:
- list of all users in the database
- Throws:
DAOException- if any.
-
getUserCount
getUserCount.- Specified by:
getUserCountin interfaceIDAO- Parameters:
filters- map of field names to filter values- Returns:
- total number of users matching the given filters
- Throws:
DAOException- if any.
-
getUsers
public List<User> getUsers(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetUsers.- Specified by:
getUsersin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of field names to filter values- Returns:
- list of users matching the given criteria
- Throws:
DAOException- if any.
-
getUsersByPropertyValue
public List<User> getUsersByPropertyValue(String propertyName, String propertyValue) throws DAOException - Specified by:
getUsersByPropertyValuein interfaceIDAO- Parameters:
propertyName- name of the user property to filter bypropertyValue- value of the user property to filter by- Returns:
- List if users with matching property name/value pair
- Throws:
DAOException
-
getAdminUsers
- Specified by:
getAdminUsersin interfaceIDAO- Returns:
- List
where User.superuser == true - Throws:
DAOException
-
getUsersFilterQuery
- Parameters:
param- named query parameter placeholder for filter values- Returns:
- Generated query
-
getUser
getUser.- Specified by:
getUserin interfaceIDAO- Parameters:
id- database primary key of the user- Returns:
- the matching user, or null if not found
- Throws:
DAOException- if any.
-
getUserByEmail
getUserByEmail.- Specified by:
getUserByEmailin interfaceIDAO- Parameters:
email- email address of the user to look up- Returns:
- the matching user, or null if not found
- Throws:
DAOException- if any.
-
getUserByOpenId
getUserByOpenId.- Specified by:
getUserByOpenIdin interfaceIDAO- Parameters:
identifier- OpenID identifier of the user to look up- Returns:
- the matching user, or null if not found
- Throws:
DAOException- if any.
-
getUserByNickname
Description copied from interface:IDAOgetUserByNickname.- Specified by:
getUserByNicknamein interfaceIDAO- Parameters:
nickname- user nickname to look up (case-insensitive)- Returns:
- the User with the given nickname, or null if not found or nickname is blank
- Throws:
DAOException- if a database error occurs- See Also:
-
addUser
addUser.- Specified by:
addUserin interfaceIDAO- Parameters:
user- user to persist- Returns:
- true if user was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateUser
updateUser.- Specified by:
updateUserin interfaceIDAO- Parameters:
user- user to update in the database- Returns:
- true if user was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteUser
deleteUser.- Specified by:
deleteUserin interfaceIDAO- Parameters:
user- user to delete from the database- Returns:
- true if user was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getAllUserGroups
getAllUserGroups.- Specified by:
getAllUserGroupsin interfaceIDAO- Returns:
- list of all user groups in the database
- Throws:
DAOException- if any.
-
getUserGroups
public List<UserGroup> getUserGroups(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetUserGroups.- Specified by:
getUserGroupsin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of field names to filter values- Returns:
- list of user groups matching the given criteria
- Throws:
DAOException- if any.
-
getUserGroups
getUserGroups.- Specified by:
getUserGroupsin interfaceIDAO- Parameters:
owner- user who owns the groups to retrieve- Returns:
- list of user groups owned by the given user
- Throws:
DAOException- if any.
-
getUserGroup
getUserGroup.- Specified by:
getUserGroupin interfaceIDAO- Parameters:
id- database primary key of the user group- Returns:
- the matching user group, or null if not found
- Throws:
DAOException- if any.
-
getUserGroup
getUserGroup.- Specified by:
getUserGroupin interfaceIDAO- Parameters:
name- name of the user group to look up- Returns:
- the matching user group, or null if not found
- Throws:
DAOException- if any.
-
addUserGroup
addUserGroup.- Specified by:
addUserGroupin interfaceIDAO- Parameters:
userGroup- user group to persist- Returns:
- true if user group was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateUserGroup
updateUserGroup.- Specified by:
updateUserGroupin interfaceIDAO- Parameters:
userGroup- user group to update in the database- Returns:
- true if user group was updated successfully; false otherwise
- Throws:
DAOException- if any.- See Also:
-
deleteUserGroup
deleteUserGroup.- Specified by:
deleteUserGroupin interfaceIDAO- Parameters:
userGroup- user group to delete from the database- Returns:
- true if user group was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getAllBookmarkLists
getAllBookmarkLists.- Specified by:
getAllBookmarkListsin interfaceIDAO- Returns:
- list of all bookmark lists in the database
- Throws:
DAOException- if any.
-
getPublicBookmarkLists
getPublicBookmarkLists.- Specified by:
getPublicBookmarkListsin interfaceIDAO- Returns:
- list of all publicly visible bookmark lists
- Throws:
DAOException- if any.
-
getBookmarkLists
getBookmarkLists.- Specified by:
getBookmarkListsin interfaceIDAO- Parameters:
user- owner of the bookmark lists to retrieve- Returns:
- list of bookmark lists owned by the given user
- Throws:
DAOException- if any.
-
getBookmarkListCount
Gets number of bookmark lists owned by the given user.- Specified by:
getBookmarkListCountin interfaceIDAO- Parameters:
user- owner of the bookmark lists- Returns:
- number of owned bookmark lists
- Throws:
DAOException
-
getBookmarkList
getBookmarkList.- Specified by:
getBookmarkListin interfaceIDAO- Parameters:
id- database primary key of the bookmark list- Returns:
- the matching bookmark list, or null if not found
- Throws:
DAOException- if any.
-
getBookmarkList
getBookmarkList.- Specified by:
getBookmarkListin interfaceIDAO- Parameters:
name- name of the bookmark list to look upuser- owner of the bookmark list- Returns:
- the matching bookmark list, or null if not found
- Throws:
DAOException- if any.
-
addBookmarkList
addBookmarkList.- Specified by:
addBookmarkListin interfaceIDAO- Parameters:
bookmarkList- bookmark list to persist- Returns:
- true if bookmark list was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateBookmarkList
updateBookmarkList.- Specified by:
updateBookmarkListin interfaceIDAO- Parameters:
bookmarkList- bookmark list to update in the database- Returns:
- true if bookmark list was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteBookmarkList
deleteBookmarkList.- Specified by:
deleteBookmarkListin interfaceIDAO- Parameters:
bookmarkList- bookmark list to delete from the database- Returns:
- true if bookmark list was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getAllRoles
getAllRoles.- Specified by:
getAllRolesin interfaceIDAO- Returns:
- list of all roles in the database
- Throws:
DAOException- if any.
-
getRoles
public List<Role> getRoles(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetRoles.- Specified by:
getRolesin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of field names to filter values- Returns:
- list of roles matching the given criteria
- Throws:
DAOException- if any.
-
getRole
getRole.- Specified by:
getRolein interfaceIDAO- Parameters:
id- database primary key of the role- Returns:
- the matching role, or null if not found
- Throws:
DAOException- if any.
-
getRole
getRole.- Specified by:
getRolein interfaceIDAO- Parameters:
name- name of the role to look up- Returns:
- the matching role, or null if not found
- Throws:
DAOException- if any.
-
addRole
addRole.- Specified by:
addRolein interfaceIDAO- Parameters:
role- role to persist- Returns:
- true if role was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateRole
updateRole.- Specified by:
updateRolein interfaceIDAO- Parameters:
role- role to update in the database- Returns:
- true if role was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteRole
deleteRole.- Specified by:
deleteRolein interfaceIDAO- Parameters:
role- role to delete from the database- Returns:
- true if role was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getAllUserRoles
getAllUserRoles.- Specified by:
getAllUserRolesin interfaceIDAO- Returns:
- list of all user role assignments in the database
- Throws:
DAOException- if any.
-
getUserRoleCount
Description copied from interface:IDAOgetUserRoleCount.- Specified by:
getUserRoleCountin interfaceIDAO- Parameters:
userGroup- user group to filter by, or null to match any groupuser- user to filter by, or null to match any userrole- role to filter by, or null to match any role- Returns:
- the number of user role assignments matching the given filter criteria
- Throws:
DAOException- if a database error occurs- See Also:
-
getUserRoles
getUserRoles.- Specified by:
getUserRolesin interfaceIDAO- Parameters:
userGroup- user group to filter by, or null to ignoreuser- user to filter by, or null to ignorerole- role to filter by, or null to ignore- Returns:
- list of user role assignments matching the given filters
- Throws:
DAOException- if any.
-
addUserRole
addUserRole.- Specified by:
addUserRolein interfaceIDAO- Parameters:
userRole- user role assignment to persist- Returns:
- true if user role was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateUserRole
updateUserRole.- Specified by:
updateUserRolein interfaceIDAO- Parameters:
userRole- user role assignment to update in the database- Returns:
- true if user role was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteUserRole
deleteUserRole.- Specified by:
deleteUserRolein interfaceIDAO- Parameters:
userRole- user role assignment to delete from the database- Returns:
- true if user role was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getAllLicenseTypes
getAllLicenseTypes.- Specified by:
getAllLicenseTypesin interfaceIDAO- Returns:
- list of all license types in the database
- Throws:
DAOException- if any.
-
getRecordLicenseTypes
getRecordLicenseTypes.- Specified by:
getRecordLicenseTypesin interfaceIDAO- Returns:
- list of license types that apply at the record level
- Throws:
DAOException- if any.
-
getLicenseTypes
public List<LicenseType> getLicenseTypes(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetLicenseTypes.- Specified by:
getLicenseTypesin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of field names to filter values- Returns:
- list of license types matching the given criteria
- Throws:
DAOException- if any.
-
getCoreLicenseTypes
public List<LicenseType> getCoreLicenseTypes(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetCoreLicenseTypes.- Specified by:
getCoreLicenseTypesin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of field names to filter values- Returns:
- list of core license types matching the given criteria
- Throws:
DAOException- if any.
-
getLicenseType
getLicenseType.- Specified by:
getLicenseTypein interfaceIDAO- Parameters:
id- database primary key of the license type- Returns:
- the matching license type, or null if not found
- Throws:
DAOException- if any.
-
getLicenseType
getLicenseType.- Specified by:
getLicenseTypein interfaceIDAO- Parameters:
name- name of the license type to look up- Returns:
- the matching license type, or null if not found
- Throws:
DAOException- if any.
-
getLicenseTypes
Description copied from interface:IDAOReturns all license types that match the given name list.- Specified by:
getLicenseTypesin interfaceIDAO- Parameters:
names- list of license type names to retrieve; returns empty list if null or empty- Returns:
- the list of LicenseType objects whose names match the given list, or an empty list if no matches are found
- Throws:
DAOException- if a database error occurs- See Also:
-
getOverridingLicenseType
- Specified by:
getOverridingLicenseTypein interfaceIDAO- Parameters:
licenseType- the license type for which to find overriding license types- Returns:
- the list of license types that override the given license type, or an empty list if none exist
- Throws:
DAOException- if a database error occurs- See Also:
-
addLicenseType
addLicenseType.- Specified by:
addLicenseTypein interfaceIDAO- Parameters:
licenseType- license type to persist- Returns:
- true if license type was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateLicenseType
updateLicenseType.- Specified by:
updateLicenseTypein interfaceIDAO- Parameters:
licenseType- license type to update in the database- Returns:
- true if license type was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteLicenseType
deleteLicenseType.- Specified by:
deleteLicenseTypein interfaceIDAO- Parameters:
licenseType- license type to delete from the database- Returns:
- true if license type was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getAllLicenses
getAllLicenses.- Specified by:
getAllLicensesin interfaceIDAO- Returns:
- list of all licenses in the database
- Throws:
DAOException- if any.
-
getLicense
getLicense.- Specified by:
getLicensein interfaceIDAO- Parameters:
id- database primary key of the license- Returns:
- the matching license, or null if not found
- Throws:
DAOException- if any.
-
getLicenses
- Specified by:
getLicensesin interfaceIDAO- Parameters:
licenseType- the license type whose associated licenses are retrieved; must not be null- Returns:
- the list of License objects associated with the given license type
- Throws:
DAOException- if a database error occurs- See Also:
-
getLicenses
- Specified by:
getLicensesin interfaceIDAO- Parameters:
licensee- licensee (user, group, or IP range) to filter by- Returns:
- List of
Licenses for the given licensee - Throws:
DAOException
-
getLicenseCount
Description copied from interface:IDAOReturns the number of licenses that use the given license type.- Specified by:
getLicenseCountin interfaceIDAO- Parameters:
licenseType- the license type whose associated licenses are counted; must not be null- Returns:
- the number of License objects associated with the given license type
- Throws:
DAOException- if a database error occurs- See Also:
-
addLicense
addLicenseType.- Specified by:
addLicensein interfaceIDAO- Parameters:
license- license to persist- Returns:
- true if license was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateLicense
updateLicenseType.- Specified by:
updateLicensein interfaceIDAO- Parameters:
license- license to update in the database- Returns:
- true if license was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteLicense
deleteLicenseType.- Specified by:
deleteLicensein interfaceIDAO- Parameters:
license- license to delete from the database- Returns:
- true if license was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getTicket
- Specified by:
getTicketin interfaceIDAO- Parameters:
id- database id of the access ticket- Returns:
AccessTicketwith the given id- Throws:
DAOException
-
getTicketByPasswordHash
- Specified by:
getTicketByPasswordHashin interfaceIDAO- Parameters:
passwordHash- password hash of the access ticket- Returns:
AccessTicketwith the given passwordHash- Throws:
DAOException
-
getActiveTicketCount
getActiveTicketCount.- Specified by:
getActiveTicketCountin interfaceIDAO- Parameters:
filters- Selected filters- Returns:
- Number of found rows
- Throws:
DAOException- if any.
-
getActiveTickets
public List<AccessTicket> getActiveTickets(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetActiveRecordAccessTickets.- Specified by:
getActiveTicketsin interfaceIDAO- Parameters:
first- First row indexpageSize- Number of rowssortField- field to sort bydescending- true if descending order requested; false otherwisefilters- Selected filters- Returns:
- list of active access tickets matching the given criteria
- Throws:
DAOException- if any.
-
getTicketRequests
- Specified by:
getTicketRequestsin interfaceIDAO- Returns:
AccessTickets with the requested status- Throws:
DAOException
-
addTicket
addTicket.- Specified by:
addTicketin interfaceIDAO- Parameters:
ticket- access ticket to persist- Returns:
- true if ticket was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateTicket
updateTicket.- Specified by:
updateTicketin interfaceIDAO- Parameters:
ticket- access ticket to update in the database- Returns:
- true if ticket was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteTicket
deleteTicket.- Specified by:
deleteTicketin interfaceIDAO- Parameters:
ticket- access ticket to delete from the database- Returns:
- true if ticket was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getAllIpRanges
getAllIpRanges.- Specified by:
getAllIpRangesin interfaceIDAO- Returns:
- list of all IP ranges in the database
- Throws:
DAOException- if any.
-
getIpRanges
public List<IpRange> getIpRanges(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetIpRanges.- Specified by:
getIpRangesin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of field names to filter values- Returns:
- list of IP ranges matching the given criteria
- Throws:
DAOException- if any.
-
getIpRange
getIpRange.- Specified by:
getIpRangein interfaceIDAO- Parameters:
id- database primary key of the IP range- Returns:
- the matching IP range, or null if not found
- Throws:
DAOException- if any.
-
getIpRange
getIpRange.- Specified by:
getIpRangein interfaceIDAO- Parameters:
name- name of the IP range to look up- Returns:
- the matching IP range, or null if not found
- Throws:
DAOException- if any.
-
addIpRange
addIpRange.- Specified by:
addIpRangein interfaceIDAO- Parameters:
ipRange- IP range to persist- Returns:
- true if IP range was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateIpRange
updateIpRange.- Specified by:
updateIpRangein interfaceIDAO- Parameters:
ipRange- IP range to update in the database- Returns:
- true if IP range was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteIpRange
deleteIpRange.- Specified by:
deleteIpRangein interfaceIDAO- Parameters:
ipRange- IP range to delete from the database- Returns:
- true if IP range was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getAllCommentGroups
- Specified by:
getAllCommentGroupsin interfaceIDAO- Returns:
- the list of all comment groups persisted in the database
- Throws:
DAOException- if a database error occurs- See Also:
-
getCommentGroupUnfiltered
- Specified by:
getCommentGroupUnfilteredin interfaceIDAO- Returns:
- the core (unfiltered) comment group, or null if none exists
- Throws:
DAOException- See Also:
-
getCommentGroup
Description copied from interface:IDAOgetCommentGroup.- Specified by:
getCommentGroupin interfaceIDAO- Parameters:
id- database ID of the comment group to retrieve- Returns:
- the CommentGroup with the given ID, or null if not found
- Throws:
DAOException- if a database error occurs- See Also:
-
addCommentGroup
Description copied from interface:IDAOaddCommentGroup.- Specified by:
addCommentGroupin interfaceIDAO- Parameters:
commentGroup- the comment group to persist in the database- Returns:
- true if the comment group was successfully persisted, false if a persistence error occurred
- Throws:
DAOException- if a database error occurs- See Also:
-
updateCommentGroup
Description copied from interface:IDAOupdateCommentGroup.- Specified by:
updateCommentGroupin interfaceIDAO- Parameters:
commentGroup- the comment group with updated values to merge into the database- Returns:
- true if the comment group was successfully updated, false if a persistence error occurred
- Throws:
DAOException- if a database error occurs- See Also:
-
deleteCommentGroup
Description copied from interface:IDAOdeleteCommentGroup.- Specified by:
deleteCommentGroupin interfaceIDAO- Parameters:
commentGroup- the comment group to remove from the database- Returns:
- true if the comment group was successfully deleted, false if a persistence error occurred
- Throws:
DAOException- if a database error occurs- See Also:
-
getAllComments
getAllComments.- Specified by:
getAllCommentsin interfaceIDAO- Returns:
- list of all comments in the database
- Throws:
DAOException- if any.
-
getComments
public List<Comment> getComments(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, Set<String> targetPIs) throws DAOExceptiongetComments.- Specified by:
getCommentsin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of field names to filter valuestargetPIs- set of persistent identifiers to restrict results to- Returns:
- list of comments matching the given criteria
- Throws:
DAOException- if any.
-
getCommentsOfUser
public List<Comment> getCommentsOfUser(User user, int maxResults, String sortField, boolean descending) throws DAOException Gets Comments created by a specific user.- Specified by:
getCommentsOfUserin interfaceIDAO- Parameters:
user- the creator/owner of the commentmaxResults- maximum number of results to returnsortField- class field to sort results bydescending- set to "true" to sort descending- Returns:
- A list of at most maxResults comments.
- Throws:
DAOException
-
getCommentsForPage
getCommentsForPage.- Specified by:
getCommentsForPagein interfaceIDAO- Parameters:
pi- persistent identifier of the recordpage- page order number within the record- Returns:
- list of comments for the given record page
- Throws:
DAOException- if any.
-
getCommentsForWork
getCommentsForWork.- Specified by:
getCommentsForWorkin interfaceIDAO- Parameters:
pi- persistent identifier of the record- Returns:
- list of all comments for the given record
- Throws:
DAOException- if any.
-
countCommentsForWork
countCommentsForWork.- Specified by:
countCommentsForWorkin interfaceIDAO- Parameters:
pi- persistent identifier of the record- Returns:
- the total number of comments for the record with the given persistent identifier
- Throws:
DAOException- if any.
-
getComment
getComment.- Specified by:
getCommentin interfaceIDAO- Parameters:
id- database primary key of the comment- Returns:
- the matching comment, or null if not found
- Throws:
DAOException- if any.
-
addComment
addComment.- Specified by:
addCommentin interfaceIDAO- Parameters:
comment- comment to persist- Returns:
- true if comment was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateComment
updateComment.- Specified by:
updateCommentin interfaceIDAO- Parameters:
comment- comment to update in the database- Returns:
- true if comment was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteComment
deleteComment.- Specified by:
deleteCommentin interfaceIDAO- Parameters:
comment- comment to delete from the database- Returns:
- true if comment was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
changeCommentsOwner
Changes ownership of all comments fromfromUsertotoUser.- Specified by:
changeCommentsOwnerin interfaceIDAO- Parameters:
fromUser- user whose comments are to be reassignedtoUser- user to reassign the comments to- Returns:
- Number of updated
Comments - Throws:
DAOException- if any.
-
deleteComments
- Specified by:
deleteCommentsin interfaceIDAO- Parameters:
pi- persistent identifier to restrict deletion to comments on a specific record, or null for anyowner- user whose comments should be deleted, or null to delete regardless of owner- Returns:
- the number of comments deleted
- Throws:
DAOException- if a database error occurs- See Also:
-
getPagesWithComments
getPagesWithComments.Gets all page numbers (order) within a work with the given pi which contain comments
- Specified by:
getPagesWithCommentsin interfaceIDAO- Parameters:
pi- persistent identifier of the record- Returns:
- list of page order numbers that have at least one comment in the given record
- Throws:
DAOException- if any.
-
getAllSearches
getAllSearches.- Specified by:
getAllSearchesin interfaceIDAO- Returns:
- list of all saved searches in the database
- Throws:
DAOException- if any.
-
getSearchCount
getSearchCount.- Specified by:
getSearchCountin interfaceIDAO- Parameters:
owner- user who owns the searches, or null for all usersfilters- map of field names to filter values- Returns:
- total number of saved searches matching the given criteria
- Throws:
DAOException- if any.
-
getSearches
public List<Search> getSearches(User owner, int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetSearches.- Specified by:
getSearchesin interfaceIDAO- Parameters:
owner- user who owns the searches, or null for all usersfirst- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of field names to filter values- Returns:
- list of saved searches matching the given criteria
- Throws:
DAOException- if any.
-
getSearches
getSearches.- Specified by:
getSearchesin interfaceIDAO- Parameters:
owner- user whose saved searches to retrieve- Returns:
- list of saved searches owned by the given user
- Throws:
DAOException- if any.
-
getSearch
getSearch.- Specified by:
getSearchin interfaceIDAO- Parameters:
id- database primary key of the search- Returns:
- the matching saved search, or null if not found
- Throws:
DAOException- if any.
-
addSearch
addSearch.- Specified by:
addSearchin interfaceIDAO- Parameters:
search- saved search to persist- Returns:
- true if search was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateSearch
updateSearch.- Specified by:
updateSearchin interfaceIDAO- Parameters:
search- saved search to update in the database- Returns:
- true if search was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteSearch
deleteSearch.- Specified by:
deleteSearchin interfaceIDAO- Parameters:
search- saved search to delete from the database- Returns:
- true if search was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getUploadJobsWithStatus
- Specified by:
getUploadJobsWithStatusin interfaceIDAO- Parameters:
status-JobStatus- Returns:
- List of
UploadJobs with given status - Throws:
DAOException
-
getUploadJobsForCreatorId
- Specified by:
getUploadJobsForCreatorIdin interfaceIDAO- Parameters:
creatorId- User id of the creator- Returns:
UploadJobs belonging to user with given ID- Throws:
DAOException- if any.
-
addUploadJob
addDownloadJob.- Specified by:
addUploadJobin interfaceIDAO- Parameters:
uploadJob- upload job to persist- Returns:
- true if upload job was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateUploadJob
updateDownloadJob.- Specified by:
updateUploadJobin interfaceIDAO- Parameters:
uploadJob- upload job to update in the database- Returns:
- true if upload job was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteUploadJob
deleteDownloadJob.- Specified by:
deleteUploadJobin interfaceIDAO- Parameters:
uploadJob- upload job to delete from the database- Returns:
- true if upload job was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getAllCMSPages
getAllCMSPages.- Specified by:
getAllCMSPagesin interfaceIDAO- Returns:
- list of all CMS pages in the database
- Throws:
DAOException- if any.
-
getCmsPageForStaticPage
getCmsPageForStaticPage.- Specified by:
getCmsPageForStaticPagein interfaceIDAO- Parameters:
pageName- static page name identifying the CMS page- Returns:
- the CMS page associated with the given static page name, or null if not found
- Throws:
DAOException- if any.
-
getCMSPages
public List<CMSPage> getCMSPages(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, List<Long> allowedTemplates, List<String> allowedSubthemes, List<String> allowedCategories) throws DAOExceptiongetCMSPages.- Specified by:
getCMSPagesin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of field names to filter valuesallowedTemplates- list of template IDs the user is allowed to seeallowedSubthemes- list of subtheme identifiers the user is allowed to seeallowedCategories- list of category names the user is allowed to see- Returns:
- list of CMS pages matching the given filters and permissions
- Throws:
DAOException- if any.
-
getCMSPagesWithRelatedPi
public List<CMSPage> getCMSPagesWithRelatedPi(int first, int pageSize, LocalDateTime fromDate, LocalDateTime toDate) throws DAOException getCMSPagesWithRelatedPi.- Specified by:
getCMSPagesWithRelatedPiin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnfromDate- lower bound of the date range filter, or nulltoDate- upper bound of the date range filter, or null- Returns:
- list of CMS pages that have a related persistent identifier within the given date range
- Throws:
DAOException- if any.
-
isCMSPagesForRecordHaveUpdates
public boolean isCMSPagesForRecordHaveUpdates(String pi, CMSCategory category, LocalDateTime fromDate, LocalDateTime toDate) throws DAOException isCMSPagesForRecordHaveUpdates.- Specified by:
isCMSPagesForRecordHaveUpdatesin interfaceIDAO- Parameters:
pi- persistent identifier of the recordcategory- category to filter CMS pages by, or null for all categoriesfromDate- lower bound of the date range filter, or nulltoDate- upper bound of the date range filter, or null- Returns:
- true if any CMS pages for the record have been updated within the given date range; false otherwise
- Throws:
DAOException- if any.
-
getCMSPageWithRelatedPiCount
public long getCMSPageWithRelatedPiCount(LocalDateTime fromDate, LocalDateTime toDate) throws DAOException getCMSPageWithRelatedPiCount.- Specified by:
getCMSPageWithRelatedPiCountin interfaceIDAO- Parameters:
fromDate- lower bound of the date range filter, or nulltoDate- upper bound of the date range filter, or null- Returns:
- total number of CMS pages with a related persistent identifier within the given date range
- Throws:
DAOException- if any.
-
getCMSPageDefaultViewForRecord
- Specified by:
getCMSPageDefaultViewForRecordin interfaceIDAO- Parameters:
pi- Record identifier- Returns:
CMSPage- Throws:
DAOException
-
getCMSPageAccessConditions
- Specified by:
getCMSPageAccessConditionsin interfaceIDAO- Returns:
- List
- Throws:
DAOException
-
getCMSPage
getCMSPage.- Specified by:
getCMSPagein interfaceIDAO- Parameters:
id- database primary key of the CMS page- Returns:
- the matching CMS page, or null if not found
- Throws:
DAOException- if any.
-
addCMSPage
addCMSPage.- Specified by:
addCMSPagein interfaceIDAO- Parameters:
page- CMS page to persist- Returns:
- true if CMS page was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateCMSPage
updateCMSPage.- Specified by:
updateCMSPagein interfaceIDAO- Parameters:
page- CMS page to update in the database- Returns:
- true if CMS page was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteCMSPage
deleteCMSPage.- Specified by:
deleteCMSPagein interfaceIDAO- Parameters:
page- CMS page to delete from the database- Returns:
- true if CMS page was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteCMSComponent
- Specified by:
deleteCMSComponentin interfaceIDAO- Throws:
DAOException
-
deleteCMSContent
- Specified by:
deleteCMSContentin interfaceIDAO- Throws:
DAOException
-
addCMSComponent
- Specified by:
addCMSComponentin interfaceIDAO- Throws:
DAOException
-
updatedCMSComponent
public boolean updatedCMSComponent(PersistentCMSComponent persistentCMSComponent) throws DAOException - Specified by:
updatedCMSComponentin interfaceIDAO- Throws:
DAOException
-
getCMSComponent
- Specified by:
getCMSComponentin interfaceIDAO- Throws:
DAOException
-
getAllCMSMediaItems
getAllCMSMediaItems.- Specified by:
getAllCMSMediaItemsin interfaceIDAO- Returns:
- list of all CMS media items in the database
- Throws:
DAOException- if any.
-
getAllCMSCollectionItems
getAllCMSCollectionItems.- Specified by:
getAllCMSCollectionItemsin interfaceIDAO- Returns:
- list of all CMS media items that represent collections
- Throws:
DAOException- if any.
-
getCMSMediaItemByFilename
getCMSMediaItemByFilename.- Specified by:
getCMSMediaItemByFilenamein interfaceIDAO- Parameters:
filename- filename of the CMS media item to look up- Returns:
- the matching CMS media item, or null if not found
- Throws:
DAOException- if any.
-
getCMSMediaItem
getCMSMediaItem.- Specified by:
getCMSMediaItemin interfaceIDAO- Parameters:
id- database primary key of the CMS media item- Returns:
- the matching CMS media item, or null if not found
- Throws:
DAOException- if any.
-
addCMSMediaItem
addCMSMediaItem.- Specified by:
addCMSMediaItemin interfaceIDAO- Parameters:
item- CMS media item to persist- Returns:
- true if CMS media item was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateCMSMediaItem
updateCMSMediaItem.- Specified by:
updateCMSMediaItemin interfaceIDAO- Parameters:
item- CMS media item to update in the database- Returns:
- true if CMS media item was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteCMSMediaItem
deleteCMSMediaItem.- Specified by:
deleteCMSMediaItemin interfaceIDAO- Parameters:
item- CMS media item to delete from the database- Returns:
- true if CMS media item was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getCMSMediaItemsByCategory
Gets a list of allCMSMediaItems which contain the given category.- Specified by:
getCMSMediaItemsByCategoryin interfaceIDAO- Parameters:
category- category to filter media items by- Returns:
- all containing cmsPages
- Throws:
DAOException
-
getAllTranskribusJobs
getAllTranskribusJobs.- Specified by:
getAllTranskribusJobsin interfaceIDAO- Returns:
- list of all Transkribus jobs in the database
- Throws:
DAOException- if any.
-
getTranskribusJobs
public List<TranskribusJob> getTranskribusJobs(String pi, String transkribusUserId, JobStatus status) throws DAOException getTranskribusJobs.- Specified by:
getTranskribusJobsin interfaceIDAO- Parameters:
pi- persistent identifier of the record, or null to ignoretranskribusUserId- Transkribus user ID to filter by, or null to ignorestatus- job status to filter by, or null to ignore- Returns:
- list of Transkribus jobs matching the given filters
- Throws:
DAOException- if any.
-
addTranskribusJob
addTranskribusJob.- Specified by:
addTranskribusJobin interfaceIDAO- Parameters:
job- Transkribus job to persist- Returns:
- true if job added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateTranskribusJob
updateTranskribusJob.- Specified by:
updateTranskribusJobin interfaceIDAO- Parameters:
job- Transkribus job to update in the database- Returns:
- true if job updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteTranskribusJob
deleteTranskribusJob.- Specified by:
deleteTranskribusJobin interfaceIDAO- Parameters:
job- Transkribus job to delete from the database- Returns:
- true if job deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getAllCampaigns
getAllCampaigns.- Specified by:
getAllCampaignsin interfaceIDAO- Returns:
- list of all crowdsourcing campaigns in the database
- Throws:
DAOException- if any.
-
getCampaignCount
getCampaignCount.- Specified by:
getCampaignCountin interfaceIDAO- Parameters:
filters- map of field names to filter values- Returns:
- total number of crowdsourcing campaigns matching the given filters
- Throws:
DAOException- if any.
-
getCampaigns
public List<Campaign> getCampaigns(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetCampaigns.- Specified by:
getCampaignsin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of field names to filter values- Returns:
- list of crowdsourcing campaigns matching the given criteria
- Throws:
DAOException- if any.
-
getCampaign
getCampaign.- Specified by:
getCampaignin interfaceIDAO- Parameters:
id- database primary key of the campaign- Returns:
- the matching campaign, or null if not found
- Throws:
DAOException- if any.
-
getQuestion
getQuestion.- Specified by:
getQuestionin interfaceIDAO- Parameters:
id- database primary key of the question- Returns:
- the matching campaign question, or null if not found
- Throws:
DAOException- if any.
-
getCampaignStatisticsForRecord
public List<CampaignRecordStatistic> getCampaignStatisticsForRecord(String pi, CrowdsourcingStatus status) throws DAOException getCampaignStatisticsForRecord.- Specified by:
getCampaignStatisticsForRecordin interfaceIDAO- Parameters:
pi- persistent identifier of the recordstatus- crowdsourcing status to filter by, or null for any status- Returns:
- list of campaign record statistics for the given record
- Throws:
DAOException- if any.
-
getCampaignPageStatisticsForRecord
public List<CampaignRecordPageStatistic> getCampaignPageStatisticsForRecord(String pi, CrowdsourcingStatus status) throws DAOException getCampaignPageStatisticsForRecord.- Specified by:
getCampaignPageStatisticsForRecordin interfaceIDAO- Parameters:
pi- persistent identifier of the recordstatus- crowdsourcing status to filter by, or null for any status- Returns:
- list of campaign page statistics for the given record
- Throws:
DAOException- if any.
-
addCampaign
addCampaign.- Specified by:
addCampaignin interfaceIDAO- Parameters:
campaign- crowdsourcing campaign to persist- Returns:
- true if campaign added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateCampaign
updateCampaign.- Specified by:
updateCampaignin interfaceIDAO- Parameters:
campaign- crowdsourcing campaign to update in the database- Returns:
- true if campaign updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteCampaign
deleteCampaign.- Specified by:
deleteCampaignin interfaceIDAO- Parameters:
campaign- crowdsourcing campaign to delete from the database- Returns:
- true if campaign deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteCampaignStatisticsForUser
Description copied from interface:IDAODeletes given user from the lists of annotators and reviewers an all campaign statistics.- Specified by:
deleteCampaignStatisticsForUserin interfaceIDAO- Parameters:
user- the user whose campaign statistics entries are deleted- Returns:
- the total number of database rows deleted across all statistic tables
- Throws:
DAOException- See Also:
-
changeCampaignStatisticContributors
Description copied from interface:IDAOReplacedfromUserwithtoUserin the lists of annotators and reviewers an all campaign statistics.- Specified by:
changeCampaignStatisticContributorsin interfaceIDAO- Parameters:
fromUser- the user whose campaign statistic entries are replacedtoUser- the user who replaces fromUser in all campaign statistic entries- Returns:
- the total number of database rows updated across all statistic tables
- Throws:
DAOException- if a database error occurs- See Also:
-
checkAvailability
public boolean checkAvailability()- Specified by:
checkAvailabilityin interfaceIDAO- Returns:
- true if accessible; false otherwise
-
clear
public void clear()Currently noop since no persistence entity manager is kept. -
shutdown
public void shutdown()shutdown. -
preQuery
Operation to call before getting an entity manager. currently noop- Throws:
DAOException- if any.
-
getUserGroupCount
getUserGroupCount.- Specified by:
getUserGroupCountin interfaceIDAO- Parameters:
filters- map of field names to filter values- Returns:
- total number of user groups matching the given filters
- Throws:
DAOException- if any.
-
getRoleCount
getRoleCount.- Specified by:
getRoleCountin interfaceIDAO- Parameters:
filters- map of field names to filter values- Returns:
- total number of roles matching the given filters
- Throws:
DAOException- if any.
-
getLicenseTypeCount
getLicenseTypeCount.- Specified by:
getLicenseTypeCountin interfaceIDAO- Parameters:
filters- map of field names to filter values- Returns:
- total number of license types matching the given filters
- Throws:
DAOException- if any.
-
getCoreLicenseTypeCount
getCoreLicenseTypeCount.- Specified by:
getCoreLicenseTypeCountin interfaceIDAO- Parameters:
filters- map of field names to filter values- Returns:
- total number of core license types matching the given filters
- Throws:
DAOException- if any.
-
getIpRangeCount
getIpRangeCount.- Specified by:
getIpRangeCountin interfaceIDAO- Parameters:
filters- map of field names to filter values- Returns:
- total number of IP ranges matching the given filters
- Throws:
DAOException- if any.
-
getCommentCount
public long getCommentCount(Map<String, String> filters, User owner, Set<String> targetPIs) throws DAOExceptiongetCommentCount.- Specified by:
getCommentCountin interfaceIDAO- Parameters:
filters- map of field names to filter valuesowner- user who owns the comments, or null for all userstargetPIs- set of persistent identifiers to restrict results to- Returns:
- Number of rows that match the criteria
- Throws:
DAOException- if any.
-
getCMSPageCount
public long getCMSPageCount(Map<String, String> filters, List<Long> allowedTemplates, List<String> allowedSubthemes, List<String> allowedCategories) throws DAOExceptiongetCMSPageCount.- Specified by:
getCMSPageCountin interfaceIDAO- Parameters:
filters- map of field names to filter valuesallowedTemplates- list of template IDs the user is allowed to seeallowedSubthemes- list of subtheme identifiers the user is allowed to seeallowedCategories- list of category names the user is allowed to see- Returns:
- total number of CMS pages matching the given filters and permissions
- Throws:
DAOException- if any.
-
getCMSPageCountByPropertyValue
public long getCMSPageCountByPropertyValue(String propertyName, String propertyValue) throws DAOException - Specified by:
getCMSPageCountByPropertyValuein interfaceIDAO- Parameters:
propertyName- name of the CMS page property to filter bypropertyValue- value of the CMS page property to filter by- Returns:
- long
- Throws:
DAOException- if a database error occurs
-
getCMSPagesByPropertyValue
public List<CMSPage> getCMSPagesByPropertyValue(String propertyName, String propertyValue) throws DAOException - Specified by:
getCMSPagesByPropertyValuein interfaceIDAO- Parameters:
propertyName- name of the CMS page property to filter bypropertyValue- value of the CMS page property to filter by- Returns:
- List
- Throws:
DAOException- if a database error occurs
-
getAllStaticPages
getAllStaticPages.- Specified by:
getAllStaticPagesin interfaceIDAO- Returns:
- list of all CMS static page mappings in the database
- Throws:
DAOException- if any.
-
addStaticPage
addStaticPage.- Specified by:
addStaticPagein interfaceIDAO- Parameters:
page- static page to persist- Returns:
- true if page added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateStaticPage
updateStaticPage.- Specified by:
updateStaticPagein interfaceIDAO- Parameters:
page- static page to update in the database- Returns:
- true if page updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteStaticPage
deleteStaticPage.- Specified by:
deleteStaticPagein interfaceIDAO- Parameters:
page- static page to delete from the database- Returns:
- true if page deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getStaticPageForCMSPage
public List<CMSStaticPage> getStaticPageForCMSPage(CMSPage page) throws DAOException, NonUniqueResultException getStaticPageForCMSPage.- Specified by:
getStaticPageForCMSPagein interfaceIDAO- Parameters:
page- CMS page whose static page mappings to retrieve- Returns:
- list of static page mappings associated with the given CMS page
- Throws:
DAOException- if any.NonUniqueResultException
-
getStaticPageForTypeType
getStaticPageForTypeType.- Specified by:
getStaticPageForTypeTypein interfaceIDAO- Parameters:
pageType- viewer page type to look up the static page mapping for- Returns:
- the CMS static page mapped to the given page type, or empty if none exists
- Throws:
DAOException- if any.
-
getCmsArchiveConfigForArchive
- Specified by:
getCmsArchiveConfigForArchivein interfaceIDAO- Parameters:
pi- Archive record identifier- Returns:
- Optional
for the given pi; null if none found - Throws:
DAOException
-
getCMSArchiveConfigs
public List<CMSArchiveConfig> getCMSArchiveConfigs(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetCMSArchiveConfigs.- Specified by:
getCMSArchiveConfigsin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of column filter values- Returns:
- List
- Throws:
DAOException- if any.
-
getCMSArchiveConfigCount
getCMSArchiveConfigCount.- Specified by:
getCMSArchiveConfigCountin interfaceIDAO- Parameters:
filters- Selected filters- Returns:
- Number of found rows
- Throws:
DAOException- if any.
-
saveCMSArchiveConfig
saveCMSArchiveConfig.- Specified by:
saveCMSArchiveConfigin interfaceIDAO- Parameters:
config- CMS archive configuration to persist or update- Returns:
- true if archive config was saved successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteCMSArchiveConfig
deleteCMSArchiveConfig.- Specified by:
deleteCMSArchiveConfigin interfaceIDAO- Parameters:
config- CMS archive configuration to delete from the database- Returns:
- true if archive config was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getCMSCollections
getCMSCollections.- Specified by:
getCMSCollectionsin interfaceIDAO- Parameters:
solrField- Solr field name identifying the collection type- Returns:
- list of CMS collections for the given Solr field
- Throws:
DAOException- if any.
-
addCMSCollection
addCMSCollection.- Specified by:
addCMSCollectionin interfaceIDAO- Parameters:
collection- CMS collection to persist- Returns:
- true if CMS collection was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateCMSCollection
updateCMSCollection.- Specified by:
updateCMSCollectionin interfaceIDAO- Parameters:
collection- CMS collection to update in the database- Returns:
- true if CMS collection was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
getCMSCollection
getCMSCollection.- Specified by:
getCMSCollectionin interfaceIDAO- Parameters:
solrField- Solr field name identifying the collection typesolrFieldValue- Solr field value identifying the collection- Returns:
- the matching CMS collection, or null if not found
- Throws:
DAOException- if any.
-
deleteCMSCollection
deleteCMSCollection.- Specified by:
deleteCMSCollectionin interfaceIDAO- Parameters:
collection- CMS collection to delete from the database- Returns:
- true if CMS collection was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getCMSPagesByCategory
getCMSPagesByCategory.- Specified by:
getCMSPagesByCategoryin interfaceIDAO- Parameters:
category- category to filter CMS pages by- Returns:
- list of CMS pages that have the given category assigned
- Throws:
DAOException- if any.
-
getCMSPagesForSubtheme
- Specified by:
getCMSPagesForSubthemein interfaceIDAO- Parameters:
subtheme- subtheme identifier to filter CMS pages by- Returns:
- List of
CMSPages that use given subtheme - Throws:
DAOException
-
getCMSPagesForRecord
getCMSPagesForRecord.- Specified by:
getCMSPagesForRecordin interfaceIDAO- Parameters:
pi- persistent identifier of the recordcategory- category to filter CMS pages by, or null for all categories- Returns:
- list of CMS pages associated with the given record
- Throws:
DAOException- if any.
-
createCMSPageFilter
public static String createCMSPageFilter(Map<String, Object> params, String pageParameter, List<Long> allowedTemplates, List<String> allowedSubthemes, List<String> allowedCategoryIds) throws AccessDeniedExceptioncreateCMSPageFilter.- Parameters:
params- query parameter map to populate with named parameter valuespageParameter- JPQL alias for the CMS page entity in the queryallowedTemplates- template IDs the user may view; null means no restrictionallowedSubthemes- subtheme discriminator values the user may view; null means no restrictionallowedCategoryIds- category IDs the user may view; null means no restriction- Returns:
- the JPQL WHERE clause fragment restricting CMS page visibility, possibly empty
- Throws:
AccessDeniedException- if any.
-
getAllCategories
getAllCategories.- Specified by:
getAllCategoriesin interfaceIDAO- Returns:
- list of all CMS categories in the database
- Throws:
DAOException- if any.
-
getCountPagesUsingCategory
- Specified by:
getCountPagesUsingCategoryin interfaceIDAO- Parameters:
category- category to count CMS pages for- Returns:
- Number of existing CMS pages having the given category
- Throws:
DAOException
-
getCountMediaItemsUsingCategory
- Specified by:
getCountMediaItemsUsingCategoryin interfaceIDAO- Parameters:
category- category to count CMS media items for- Returns:
- Number of existing CMS media items having the given category
- Throws:
DAOException
-
addCategory
addCategory.Persist a new
CMSCategoryobject- Specified by:
addCategoryin interfaceIDAO- Parameters:
category- CMS category to persist- Returns:
- true if category added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateCategory
updateCategory.Update an existing
CMSCategoryobject in the persistence context- Specified by:
updateCategoryin interfaceIDAO- Parameters:
category- CMS category to update in the database- Returns:
- true if category updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteCategory
deleteCategory.Delete a
CMSCategoryobject from the persistence context- Specified by:
deleteCategoryin interfaceIDAO- Parameters:
category- CMS category to delete from the database- Returns:
- true if category deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getCategoryByName
getCategoryByName.Search the persistence context for a
CMSCategorywith the given name.- Specified by:
getCategoryByNamein interfaceIDAO- Parameters:
name- name of the category to look up- Returns:
- the matching CMS category, or null if not found
- Throws:
DAOException- if any.
-
getCategory
getCategory.Search the persistence context for a
CMSCategorywith the given unique id.- Specified by:
getCategoryin interfaceIDAO- Parameters:
id- database primary key of the category- Returns:
- the matching CMS category, or null if not found
- Throws:
DAOException- if any.
-
tableExists
tableExists.Check if the database contains a table of the given name. Used by backward-compatibility routines
- Specified by:
tableExistsin interfaceIDAO- Parameters:
tableName- name of the database table to check- Returns:
- true if the table exists; false otherwise
- Throws:
SQLExceptionDAOException
-
columnsExists
columnsExists.Check if the database contains a column in a table with the given names. Used by backward-compatibility routines
- Specified by:
columnsExistsin interfaceIDAO- Parameters:
tableName- name of the database table to checkcolumnName- name of the column to check for existence- Returns:
- true if the column exists in the table; false otherwise
- Throws:
SQLException- if any.DAOException
-
getAnnotation
Annotations *.- Specified by:
getAnnotationin interfaceIDAO- Parameters:
id- database primary key of the annotation- Returns:
- the matching crowdsourcing annotation, or null if not found
- Throws:
DAOException- if any.
-
getAnnotationsForCampaign
public List<CrowdsourcingAnnotation> getAnnotationsForCampaign(Campaign campaign) throws DAOException getAnnotationsForCampaign.- Specified by:
getAnnotationsForCampaignin interfaceIDAO- Parameters:
campaign- campaign whose annotations to retrieve- Returns:
- list of crowdsourcing annotations for the given campaign
- Throws:
DAOException- if any.
-
getAnnotationsForWork
getAnnotationsForWork.Get all annotations associated with the work of the given pi
- Specified by:
getAnnotationsForWorkin interfaceIDAO- Parameters:
pi- persistent identifier of the record- Returns:
- list of crowdsourcing annotations for the given record
- Throws:
DAOException- if any.
-
getAllAnnotations
public List<CrowdsourcingAnnotation> getAllAnnotations(String sortField, boolean descending) throws DAOException - Specified by:
getAllAnnotationsin interfaceIDAO- Parameters:
sortField- field to sort bydescending- true for descending sort order- Returns:
- List of all existing
CrowdsourcingAnnotations, optionally sorted by given sortField - Throws:
DAOException
-
getTotalAnnotationCount
- Specified by:
getTotalAnnotationCountin interfaceIDAO- Returns:
- Number of all existing
CrowdsourcingAnnotations - Throws:
DAOException
-
getAllAnnotationsByMotivation
public List<CrowdsourcingAnnotation> getAllAnnotationsByMotivation(String motivation) throws DAOException - Specified by:
getAllAnnotationsByMotivationin interfaceIDAO- Parameters:
motivation- annotation motivation value to filter by- Returns:
- List of
CrowdsourcingAnnotations matching given commenting - Throws:
DAOException
-
getAnnotationCountForWork
- Specified by:
getAnnotationCountForWorkin interfaceIDAO- Parameters:
pi- persistent identifier of the record- Returns:
- Number of existing annotations for the given pi
- Throws:
DAOException
-
getAnnotationsForTarget
public List<CrowdsourcingAnnotation> getAnnotationsForTarget(String pi, Integer page) throws DAOException getAnnotationsForTarget.- Specified by:
getAnnotationsForTargetin interfaceIDAO- Parameters:
pi- persistent identifier of the recordpage- page order number within the record, or null for all pages- Returns:
- list of crowdsourcing annotations targeting the given record page
- Throws:
DAOException- if any.
-
getAnnotationsForTarget
public List<CrowdsourcingAnnotation> getAnnotationsForTarget(String pi, Integer page, String motivation) throws DAOException - Specified by:
getAnnotationsForTargetin interfaceIDAO- Throws:
DAOException
-
getAnnotationCountForTarget
getAnnotationCountForTarget.- Specified by:
getAnnotationCountForTargetin interfaceIDAO- Parameters:
pi- persistent identifier of the recordpage- page order number within the record, or null for all pages- Returns:
- total number of crowdsourcing annotations for the given record page
- Throws:
DAOException- if any.
-
getAnnotationsForCampaignAndWork
public List<CrowdsourcingAnnotation> getAnnotationsForCampaignAndWork(Campaign campaign, String pi) throws DAOException getAnnotationsForCampaignAndWork.- Specified by:
getAnnotationsForCampaignAndWorkin interfaceIDAO- Parameters:
campaign- campaign whose annotations to retrievepi- persistent identifier of the record- Returns:
- list of crowdsourcing annotations for the given campaign and record
- Throws:
DAOException- if any.
-
getAnnotationsForCampaignAndTarget
public List<CrowdsourcingAnnotation> getAnnotationsForCampaignAndTarget(Campaign campaign, String pi, Integer page) throws DAOException getAnnotationsForCampaignAndTarget.- Specified by:
getAnnotationsForCampaignAndTargetin interfaceIDAO- Parameters:
campaign- campaign whose annotations to retrievepi- persistent identifier of the recordpage- page order number within the record, or null for all pages- Returns:
- list of crowdsourcing annotations for the given campaign and record page
- Throws:
DAOException- if any.
-
getAnnotationsForUserId
public List<CrowdsourcingAnnotation> getAnnotationsForUserId(Long userId, Integer maxResults, String sortField, boolean descending) throws DAOException - Specified by:
getAnnotationsForUserIdin interfaceIDAO- Parameters:
userId- database id of the annotation creatormaxResults- maximum number of results to returnsortField- field to sort bydescending- true for descending sort order- Returns:
- List of
CrowdsourcingAnnotations for the given userId - Throws:
DAOException
-
getAnnotations
public List<CrowdsourcingAnnotation> getAnnotations(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetAnnotations.- Specified by:
getAnnotationsin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of field names to filter values- Returns:
- list of crowdsourcing annotations matching the given criteria
- Throws:
DAOException- if any.
-
getAnnotations
public List<CrowdsourcingAnnotation> getAnnotations(int first, int pageSize, String sortField, boolean descending, String filterString, Map<String, Object> params) throws DAOException- Specified by:
getAnnotationsin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilterString- JPQL WHERE clause fragment for additional filteringparams- named parameters for the filterString clause- Returns:
- List of
CrowdsourcingAnnotations matching given filters - Throws:
DAOException
-
getAnnotationCount
getAnnotationCount.- Specified by:
getAnnotationCountin interfaceIDAO- Parameters:
filters- map of field names to filter values- Returns:
- total number of crowdsourcing annotations matching the given filters
- Throws:
DAOException- if any.
-
addAnnotation
addAnnotation.- Specified by:
addAnnotationin interfaceIDAO- Parameters:
annotation- crowdsourcing annotation to persist- Returns:
- true if annotation was added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateAnnotation
updateAnnotation.- Specified by:
updateAnnotationin interfaceIDAO- Parameters:
annotation- crowdsourcing annotation to update in the database- Returns:
- true if annotation was updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteAnnotation
deleteAnnotation.- Specified by:
deleteAnnotationin interfaceIDAO- Parameters:
annotation- crowdsourcing annotation to delete from the database- Returns:
- true if annotation was deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getGeoMap
Gets theGeoMapof the given mapId.- Specified by:
getGeoMapin interfaceIDAO- Parameters:
mapId- database id of the geo map- Returns:
- The GeoMap of the given id or else null
- Throws:
DAOException- if a database error occurs
-
getAllGeoMaps
Gets allGeoMaps in database.- Specified by:
getAllGeoMapsin interfaceIDAO- Returns:
- A list of all stored GeoMaps
- Throws:
DAOException
-
addGeoMap
Adds the given map to the database if no map of the same id already exists.- Specified by:
addGeoMapin interfaceIDAO- Parameters:
map- geo map to add- Returns:
- true if successful
- Throws:
DAOException
-
updateGeoMap
Updates the givenGeoMapin the database.- Specified by:
updateGeoMapin interfaceIDAO- Parameters:
map- geo map to update- Returns:
- true if successful
- Throws:
DAOException
-
deleteGeoMap
Deletes the givenGeoMapfrom the database.- Specified by:
deleteGeoMapin interfaceIDAO- Parameters:
map- geo map to delete- Returns:
- true if successful
- Throws:
DAOException
-
getPagesUsingMap
Returns a list of CMS-pages embedding the given map.- Specified by:
getPagesUsingMapin interfaceIDAO- Parameters:
map- geo map to find embedding pages for- Returns:
- List of
CMSPages that use given map - Throws:
DAOException
-
getPagesUsingMapInSidebar
Returns a list of CMS-pages embedding the given map in a sidebar widget.- Specified by:
getPagesUsingMapInSidebarin interfaceIDAO- Parameters:
map- geo map to find embedding sidebar pages for- Returns:
- List of
CMSPages that use given map in sidebar - Throws:
DAOException
-
saveTermsOfUse
- Specified by:
saveTermsOfUsein interfaceIDAO- Throws:
DAOException
-
getTermsOfUse
- Specified by:
getTermsOfUsein interfaceIDAO- Throws:
DAOException
-
resetUserAgreementsToTermsOfUse
- Specified by:
resetUserAgreementsToTermsOfUsein interfaceIDAO- Throws:
DAOException
-
getRecordNotes
public List<CMSRecordNote> getRecordNotes(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptionGets a paginated list ofCMSRecordNotes.- Specified by:
getRecordNotesin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of column filter values- Returns:
- List of
CMSPages that match the given filters - Throws:
DAOException
-
getAllRecordNotes
Gets all persistedCMSRecordNotes.- Specified by:
getAllRecordNotesin interfaceIDAO- Returns:
- List of all existing
CMSSingleRecordNotes - Throws:
DAOException
-
getRecordNotesForPi
public List<CMSSingleRecordNote> getRecordNotesForPi(String pi, boolean displayedNotesOnly) throws DAOException Gets allCMSRecordNotes for the given pi.- Specified by:
getRecordNotesForPiin interfaceIDAO- Parameters:
pi- The pi of the record.displayedNotesOnly- set to true to only return notes withCMSRecordNote.isDisplayNote()set to true- Returns:
- List of
CMSSingleRecordNotes for the given pi - Throws:
DAOException
-
getAllMultiRecordNotes
public List<CMSMultiRecordNote> getAllMultiRecordNotes(boolean displayedNotesOnly) throws DAOException Get allCMSMultiRecordNotes. To find notes relating to record, all notes must be check for matching query- Specified by:
getAllMultiRecordNotesin interfaceIDAO- Parameters:
displayedNotesOnly- if true, only return notes marked as displayed- Returns:
- List of all existing
CMSSingleRecordNotes, optionaly filtered by displayed only - Throws:
DAOException
-
getRecordNote
Gets aCMSRecordNoteby its id property.- Specified by:
getRecordNotein interfaceIDAO- Parameters:
id- database id of the record note- Returns:
CMSSingleRecordNotewith the given id- Throws:
DAOException- if a database error occurs
-
addRecordNote
Persist a newCMSRecordNote.- Specified by:
addRecordNotein interfaceIDAO- Parameters:
note- record note to add- Returns:
- true if note added successfully; false otherwise
- Throws:
DAOException- if a database error occurs
-
updateRecordNote
Updates an existingCMSRecordNote.- Specified by:
updateRecordNotein interfaceIDAO- Parameters:
note- record note to update- Returns:
- true if note updated successfully; false otherwise
- Throws:
DAOException- if a database error occurs
-
deleteRecordNote
Deletes an existingCMSRecordNote.- Specified by:
deleteRecordNotein interfaceIDAO- Parameters:
note- record note to delete- Returns:
- true if note deleted successfully; false otherwise
- Throws:
DAOException- if a database error occurs
-
getAllSliders
- Specified by:
getAllSlidersin interfaceIDAO- Throws:
DAOException
-
getSlider
- Specified by:
getSliderin interfaceIDAO- Throws:
DAOException
-
addSlider
- Specified by:
addSliderin interfaceIDAO- Throws:
DAOException
-
updateSlider
- Specified by:
updateSliderin interfaceIDAO- Throws:
DAOException
-
deleteSlider
- Specified by:
deleteSliderin interfaceIDAO- Throws:
DAOException
-
getPagesUsingSlider
- Specified by:
getPagesUsingSliderin interfaceIDAO- Throws:
DAOException
-
getConfiguredThemes
- Specified by:
getConfiguredThemesin interfaceIDAO- Throws:
DAOException
-
getTheme
- Specified by:
getThemein interfaceIDAO- Throws:
DAOException
-
addTheme
- Specified by:
addThemein interfaceIDAO- Throws:
DAOException
-
updateTheme
- Specified by:
updateThemein interfaceIDAO- Throws:
DAOException
-
deleteTheme
- Specified by:
deleteThemein interfaceIDAO- Throws:
DAOException
-
getAllCustomWidgets
- Specified by:
getAllCustomWidgetsin interfaceIDAO- Throws:
DAOException
-
getCustomWidget
- Specified by:
getCustomWidgetin interfaceIDAO- Throws:
DAOException
-
addCustomWidget
- Specified by:
addCustomWidgetin interfaceIDAO- Throws:
DAOException
-
updateCustomWidget
- Specified by:
updateCustomWidgetin interfaceIDAO- Throws:
DAOException
-
deleteCustomWidget
- Specified by:
deleteCustomWidgetin interfaceIDAO- Throws:
DAOException
-
getPagesUsingWidget
- Specified by:
getPagesUsingWidgetin interfaceIDAO- Throws:
DAOException
-
getCookieBanner
- Specified by:
getCookieBannerin interfaceIDAO- Throws:
DAOException
-
saveCookieBanner
- Specified by:
saveCookieBannerin interfaceIDAO- Throws:
DAOException
-
saveDisclaimer
- Specified by:
saveDisclaimerin interfaceIDAO- Throws:
DAOException
-
getDisclaimer
Get the single storedDisclaimer. May return null if no disclaimer has been persisted yet- Specified by:
getDisclaimerin interfaceIDAO- Returns:
- the disclaimer or null
- Throws:
DAOException
-
getNumRecordsWithComments
- Specified by:
getNumRecordsWithCommentsin interfaceIDAO- Throws:
DAOException
-
getNativeQueryResults
- Specified by:
getNativeQueryResultsin interfaceIDAO- Throws:
DAOException
-
executeUpdate
- Specified by:
executeUpdatein interfaceIDAO- Throws:
DAOException
-
getAllClientApplications
- Specified by:
getAllClientApplicationsin interfaceIDAO- Throws:
DAOException
-
getClientApplication
- Specified by:
getClientApplicationin interfaceIDAO- Throws:
DAOException
-
getClientApplicationByClientId
- Specified by:
getClientApplicationByClientIdin interfaceIDAO- Throws:
DAOException
-
saveClientApplication
- Specified by:
saveClientApplicationin interfaceIDAO- Throws:
DAOException
-
deleteClientApplication
- Specified by:
deleteClientApplicationin interfaceIDAO- Throws:
DAOException
-
getAllUsageStatistics
- Specified by:
getAllUsageStatisticsin interfaceIDAO- Throws:
DAOException
-
getUsageStatistics
- Specified by:
getUsageStatisticsin interfaceIDAO- Throws:
DAOException
-
getUsageStatistics
public List<DailySessionUsageStatistics> getUsageStatistics(LocalDate start, LocalDate end) throws DAOException - Specified by:
getUsageStatisticsin interfaceIDAO- Throws:
DAOException
-
addUsageStatistics
- Specified by:
addUsageStatisticsin interfaceIDAO- Throws:
DAOException
-
updateUsageStatistics
- Specified by:
updateUsageStatisticsin interfaceIDAO- Throws:
DAOException
-
deleteUsageStatistics
- Specified by:
deleteUsageStatisticsin interfaceIDAO- Throws:
DAOException
-
getAllCMSPageTemplates
- Specified by:
getAllCMSPageTemplatesin interfaceIDAO- Throws:
DAOException
-
getCMSPageTemplate
- Specified by:
getCMSPageTemplatein interfaceIDAO- Throws:
DAOException
-
addCMSPageTemplate
- Specified by:
addCMSPageTemplatein interfaceIDAO- Throws:
DAOException
-
updateCMSPageTemplate
- Specified by:
updateCMSPageTemplatein interfaceIDAO- Throws:
DAOException
-
removeCMSPageTemplate
- Specified by:
removeCMSPageTemplatein interfaceIDAO- Throws:
DAOException
-
addViewerMessage
- Specified by:
addViewerMessagein interfaceIDAO- Throws:
DAOException
-
deleteViewerMessage
- Specified by:
deleteViewerMessagein interfaceIDAO- Throws:
DAOException
-
getViewerMessage
- Specified by:
getViewerMessagein interfaceIDAO- Throws:
DAOException
-
updateViewerMessage
- Specified by:
updateViewerMessagein interfaceIDAO- Throws:
DAOException
-
getViewerMessageByMessageID
- Specified by:
getViewerMessageByMessageIDin interfaceIDAO- Throws:
DAOException
-
deleteViewerMessagesBefore
- Specified by:
deleteViewerMessagesBeforein interfaceIDAO- Throws:
DAOException
-
getViewerMessages
public List<ViewerMessage> getViewerMessages(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptionDescription copied from interface:IDAOgetViewerMessages.- Specified by:
getViewerMessagesin interfaceIDAO- Parameters:
first- index of first result (pagination)pageSize- max number of results to returnsortField- field to sort bydescending- true for descending sort orderfilters- map of field names to filter values- Returns:
- list of viewer messages matching the given criteria
- Throws:
DAOException- if any.
-
getViewerMessageCount
getViewerMessageCount.- Specified by:
getViewerMessageCountin interfaceIDAO- Parameters:
filters- map of field names to filter values- Returns:
- total number of viewer messages matching the given filters
- Throws:
DAOException- if any.
-
getRecurringTaskTriggers
- Specified by:
getRecurringTaskTriggersin interfaceIDAO- Throws:
DAOException
-
getRecurringTaskTrigger
- Specified by:
getRecurringTaskTriggerin interfaceIDAO- Throws:
DAOException
-
getRecurringTaskTriggerForTask
- Specified by:
getRecurringTaskTriggerForTaskin interfaceIDAO- Throws:
DAOException
-
addRecurringTaskTrigger
- Specified by:
addRecurringTaskTriggerin interfaceIDAO- Throws:
DAOException
-
updateRecurringTaskTrigger
- Specified by:
updateRecurringTaskTriggerin interfaceIDAO- Throws:
DAOException
-
deleteRecurringTaskTrigger
- Specified by:
deleteRecurringTaskTriggerin interfaceIDAO- Throws:
DAOException
-
addHighlight
- Specified by:
addHighlightin interfaceIDAO- Throws:
DAOException
-
updateHighlight
- Specified by:
updateHighlightin interfaceIDAO- Throws:
DAOException
-
deleteHighlight
- Specified by:
deleteHighlightin interfaceIDAO- Throws:
DAOException
-
getHighlight
- Specified by:
getHighlightin interfaceIDAO- Throws:
DAOException
-
getAllHighlights
- Specified by:
getAllHighlightsin interfaceIDAO- Throws:
DAOException
-
getHighlightsForDate
- Specified by:
getHighlightsForDatein interfaceIDAO- Throws:
DAOException
-
getPastHighlightsForDate
public List<HighlightData> getPastHighlightsForDate(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, LocalDateTime date) throws DAOException- Specified by:
getPastHighlightsForDatein interfaceIDAO- Throws:
DAOException
-
getFutureHighlightsForDate
public List<HighlightData> getFutureHighlightsForDate(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, LocalDateTime date) throws DAOException- Specified by:
getFutureHighlightsForDatein interfaceIDAO- Throws:
DAOException
-
getHighlights
public List<HighlightData> getHighlights(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOException- Specified by:
getHighlightsin interfaceIDAO- Throws:
DAOException
-
getMaintenanceMode
Returns the only existing instance of MaintenanceMode.- Specified by:
getMaintenanceModein interfaceIDAO- Returns:
- the singleton MaintenanceMode entity, or null if not yet persisted
- Throws:
DAOException- if any.
-
updateMaintenanceMode
updateMaintenanceMode.- Specified by:
updateMaintenanceModein interfaceIDAO- Parameters:
maintenanceMode- maintenance mode entity to update in the database- Returns:
- true if maintenance mode was updated successfully; false otherwise
- Throws:
DAOException- if any.
-