Interface IDAO
- All Known Implementing Classes:
JPADAO
IDAO interface.
-
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) booleanaddDownloadJob(DownloadJob downloadJob) addDownloadJob.booleanAdd the given map to the database if no map of the same id already existsbooleanaddHighlight(HighlightData object) booleanaddIpRange(IpRange ipRange) addIpRange.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.booleanvoidclose(jakarta.persistence.EntityManager em) Either close the given EntityManager or do some other post query/transaction handling for the given EntityManager.booleancolumnsExists(String tableName, String columnName) columnsExists.voidcommitTransaction(jakarta.persistence.EntityManager em) CallEntityTransaction.commit()on the current transaction of the given EntityManagervoidcommitTransaction(jakarta.persistence.EntityTransaction et) CallEntityTransaction.commit()on the given transactionbooleandeleteAnnotation(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) booleandeleteCMSCollection(CMSCollection collection) deleteCMSCollection.booleandeleteCMSComponent(PersistentCMSComponent persistentCMSComponent) booleandeleteCMSContent(CMSContent content) booleandeleteCMSMediaItem.booleandeleteCMSNavigationItem.booleandeleteCMSPage(CMSPage page) deleteCMSPage.booleandeleteComment(Comment comment) deleteComment.booleandeleteCommentGroup(CommentGroup commentGroup) deleteCommentGroup.intdeleteComments(String pi, User owner) booleanbooleandeleteDownloadJob(DownloadJob downloadJob) deleteDownloadJob.booleandeleteGeoMap(GeoMap map) Delete the givenGeoMapfrom the databasebooleandeleteHighlight(Long id) booleandeleteIpRange(IpRange ipRange) deleteIpRange.booleandeleteLicenseType(LicenseType licenseType) deleteLicenseType.booleanDeletes an existingCMSRecordNotebooleanbooleandeleteRole(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 string) longgetActiveTicketCount(Map<String, String> filters) getActiveTicketCount.getActiveTickets(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getActiveRecordAccessTickets.getAllAnnotations(String sortField, boolean sortDescending) getAllAnnotationsByMotivation(String commenting) getAllBookmarkLists.getAllCampaigns.getAllCategories.getAllCMSCollectionItems.getAllCMSMediaItems.getAllCMSPages.getAllComments.getAllDownloadJobs.Get allGeoMaps in databasegetAllIpRanges.getAllLicenses.getAllLicenseTypes.getAllMultiRecordNotes(boolean displayedNotesOnly) Get allCMSMultiRecordNotes.Get all persistedCMSRecordNotesgetAllRoles.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> filterParams) 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) Get number of bookmark lists owned by the given usergetBookmarkLists(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) getCMSCollection(String solrField, String solrFieldValue) getCMSCollection.getCMSCollections(String solrField) getCMSCollections.getCMSComponent(Long id) getCMSMediaItem(long id) getCMSMediaItem.getCMSMediaItemByFilename(String string) getCMSMediaItemByFilename.getCMSMediaItemsByCategory(CMSCategory category) Get a list of allCMSMediaItems which contain the given categorygetCMSNavigationItem(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) Get Comments created by a specific userlonggetCoreLicenseTypeCount(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.getDownloadJob(long id) getDownloadJob.getDownloadJobByIdentifier(String identifier) getDownloadJobByIdentifier.getDownloadJobByMetadata(String type, String pi, String logId) getDownloadJobByMetadata.getDownloadJobsForPi.jakarta.persistence.EntityManagerGet an EntityManager for a query or transaction.jakarta.persistence.EntityManagerFactoryGet the EntityManagerFactory created when initializing the class.getFutureHighlightsForDate(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, LocalDateTime date) Get theGeoMapof the given mapIdgetHighlight(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(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) Return a list of CMS-pages embedding the given mapReturn a list of CMS-pages embedding the given map in a sidebar widgetgetPagesUsingSlider(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) Get aCMSRecordNoteby its id propertygetRecordNotes(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) Get a paginated list ofCMSRecordNotesgetRecordNotesForPi(String pi, boolean displayedNotesOnly) Get allCMSRecordNotes for the given pigetRelatedNavItem(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) getViewerMessage(Long id) longgetViewerMessageCount(Map<String, String> filters) getViewerMessageCount.getViewerMessages(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getViewerMessages.voidhandleException(jakarta.persistence.EntityManager em) Handling of exceptions occurred duringcommitTransaction(EntityManager)Usually callsEntityTransaction.rollback()on the current transaction of the given EntityManagervoidhandleException(jakarta.persistence.EntityTransaction et) Handling of exceptions occurred duringcommitTransaction(EntityTransaction).booleanisCMSPagesForRecordHaveUpdates(String pi, CMSCategory category, LocalDateTime fromDate, LocalDateTime toDate) isCMSPagesForRecordHaveUpdates.booleanremoveCMSPageTemplate(CMSPageTemplate template) booleanbooleanbooleansaveCookieBanner(CookieBanner banner) booleansaveDisclaimer(Disclaimer disclaimer) booleansaveTermsOfUse(TermsOfUse tou) voidshutdown()shutdown.jakarta.persistence.EntityTransactionstartTransaction(jakarta.persistence.EntityManager em) CallgetTransaction()on the given EntityManager and thenbegin()on the transactionbooleantableExists(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) booleanupdateDownloadJob(DownloadJob downloadJob) updateDownloadJob.booleanupdateGeoMap(GeoMap map) Update the givenGeoMapin the databasebooleanupdateHighlight(HighlightData object) booleanupdateIpRange(IpRange ipRange) updateIpRange.booleanupdateLicenseType(LicenseType licenseType) updateLicenseType.booleanupdateMaintenanceMode(MaintenanceMode maintenanceMode) updateMaintenanceMode.booleanUpdates an existingCMSRecordNotebooleanbooleanupdateRole(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)
-
Method Details
-
tableExists
tableExists.
- Parameters:
tableName- aStringobject.- Returns:
- a boolean.
- Throws:
SQLException- if any.DAOException
-
columnsExists
columnsExists.
- Parameters:
tableName- aStringobject.columnName- aStringobject.- Returns:
- a boolean.
- Throws:
SQLException- if any.DAOException
-
getAllUsers
getAllUsers.
- Parameters:
refresh- a boolean.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getUserCount
getUserCount.
- Parameters:
filters- aMapobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getUsers
List<User> getUsers(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetUsers.
- Parameters:
first- a int.pageSize- a int.sortField- aStringobject.descending- a boolean.filters- aMapobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getUsersByPropertyValue
- Parameters:
propertyName-propertyValue-- Returns:
- List if users with matching property name/value pair
- Throws:
DAOException
-
getAdminUsers
- Returns:
- List
where User.superuser == true - Throws:
DAOException
-
getUser
getUser.
- Parameters:
id- a long.- Returns:
- a
Userobject. - Throws:
DAOException- if any.
-
getUserByEmail
getUserByEmail.
- Parameters:
email- aStringobject.- Returns:
- a
Userobject. - Throws:
DAOException- if any.
-
getUserByOpenId
getUserByOpenId.
- Parameters:
identifier- aStringobject.- Returns:
- a
Userobject. - Throws:
DAOException- if any.
-
getUserByNickname
getUserByNickname.
- Parameters:
nickname- aStringobject.- Returns:
- a
Userobject. - Throws:
DAOException- if any.
-
addUser
addUser.
- Parameters:
user- aUserobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateUser
updateUser.
- Parameters:
user- aUserobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteUser
deleteUser.
- Parameters:
user- aUserobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getAllUserGroups
getAllUserGroups.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getUserGroupCount
getUserGroupCount.
- Parameters:
filters- aMapobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getUserGroups
List<UserGroup> getUserGroups(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetUserGroups.
- Parameters:
first- a int.pageSize- a int.sortField- aStringobject.descending- a boolean.filters- aMapobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getUserGroups
getUserGroups.
- Parameters:
owner- aUserobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getUserGroup
getUserGroup.
- Parameters:
id- a long.- Returns:
- a
UserGroupobject. - Throws:
DAOException- if any.
-
getUserGroup
getUserGroup.
- Parameters:
name- aStringobject.- Returns:
- a
UserGroupobject. - Throws:
DAOException- if any.
-
addUserGroup
addUserGroup.
- Parameters:
userGroup- aUserGroupobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateUserGroup
updateUserGroup.
- Parameters:
userGroup- aUserGroupobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteUserGroup
deleteUserGroup.
- Parameters:
userGroup- aUserGroupobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getAllBookmarkLists
getAllBookmarkLists.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getPublicBookmarkLists
getPublicBookmarkLists.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getBookmarkLists
getBookmarkLists.
- Parameters:
user- aUserobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getBookmarkListCount
Get number of bookmark lists owned by the given user- Parameters:
user-- Returns:
- number of owned bookmark lists
- Throws:
DAOException
-
getBookmarkList
getBookmarkList.
- Parameters:
id- a long.- Returns:
- a
BookmarkListobject. - Throws:
DAOException- if any.
-
getBookmarkList
getBookmarkList.
- Parameters:
name- aStringobject.user- aUserobject.- Returns:
- a
BookmarkListobject. - Throws:
DAOException- if any.
-
addBookmarkList
addBookmarkList.
- Parameters:
bookmarkList- aBookmarkListobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateBookmarkList
updateBookmarkList.
- Parameters:
bookmarkList- aBookmarkListobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteBookmarkList
deleteBookmarkList.
- Parameters:
bookmarkList- aBookmarkListobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getAllRoles
getAllRoles.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getRoleCount
getRoleCount.
- Parameters:
filters- aMapobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getRoles
List<Role> getRoles(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetRoles.
- Parameters:
first- a int.pageSize- a int.sortField- aStringobject.descending- a boolean.filters- aMapobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getRole
getRole.
- Parameters:
id- a long.- Returns:
- a
Roleobject. - Throws:
DAOException- if any.
-
getRole
getRole.
- Parameters:
name- aStringobject.- Returns:
- a
Roleobject. - Throws:
DAOException- if any.
-
addRole
addRole.
- Parameters:
role- aRoleobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateRole
updateRole.
- Parameters:
role- aRoleobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteRole
deleteRole.
- Parameters:
role- aRoleobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getAllUserRoles
getAllUserRoles.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getUserRoleCount
getUserRoleCount.
- Parameters:
userGroup- aUserGroupobject.user- aUserobject.role- aRoleobject.- Returns:
- Row count
- Throws:
DAOException- if any.
-
getUserRoles
getUserRoles.
- Parameters:
userGroup- aUserGroupobject.user- aUserobject.role- aRoleobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
addUserRole
addUserRole.
- Parameters:
userRole- aUserRoleobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateUserRole
updateUserRole.
- Parameters:
userRole- aUserRoleobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteUserRole
deleteUserRole.
- Parameters:
userRole- aUserRoleobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getAllLicenseTypes
getAllLicenseTypes.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getLicenseTypeCount
getLicenseTypeCount.
- Parameters:
filters- aMapobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getCoreLicenseTypeCount
getCoreLicenseTypeCount.
- Parameters:
filters- aMapobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getRecordLicenseTypes
getRecordLicenseTypes.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getLicenseTypes
List<LicenseType> getLicenseTypes(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetLicenseTypes.
- Parameters:
first- a int.pageSize- a int.sortField- aStringobject.descending- a boolean.filters- aMapobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCoreLicenseTypes
List<LicenseType> getCoreLicenseTypes(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetCoreLicenseTypes.
- Parameters:
first- a int.pageSize- a int.sortField- aStringobject.descending- a boolean.filters- aMapobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getLicenseType
getLicenseType.
- Parameters:
id- a long.- Returns:
- a
LicenseTypeobject. - Throws:
DAOException- if any.
-
getLicenseType
getLicenseType.
- Parameters:
name- aStringobject.- Returns:
- a
LicenseTypeobject. - Throws:
DAOException- if any.
-
getLicenseTypes
Returns all license types that match the given name list.- Parameters:
names-- Returns:
- a
LicenseTypeobject. - Throws:
DAOException- in case of errors
-
getOverridingLicenseType
- Parameters:
licenseType-- Returns:
- List of license types overriding given licenseType
- Throws:
DAOException
-
addLicenseType
addLicenseType.
- Parameters:
licenseType- aLicenseTypeobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateLicenseType
updateLicenseType.
- Parameters:
licenseType- aLicenseTypeobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteLicenseType
deleteLicenseType.
- Parameters:
licenseType- aLicenseTypeobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getAllLicenses
getAllLicenses.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getLicense
getLicense.
- Parameters:
id- a long.- Returns:
- a
Licenseobject. - Throws:
DAOException- if any.
-
getLicenses
- Parameters:
licenseType-- Returns:
- List of
LicenseExceptions of the given licenseType - Throws:
DAOException
-
getLicenseCount
Returns the number of licenses that use the given license type.- Parameters:
licenseType-- Returns:
- Number of existing
Licenses of the given licenseType - Throws:
DAOException
-
getTicket
- Parameters:
id-- Returns:
AccessTicketwith the given id- Throws:
DAOException
-
getTicketByPasswordHash
- Parameters:
passwordHash-- Returns:
AccessTicketwith the given passwordHash- Throws:
DAOException
-
getActiveTicketCount
getActiveTicketCount.
- Parameters:
filters- Selected filters- Returns:
- Number of found rows
- Throws:
DAOException- if any.
-
getActiveTickets
List<AccessTicket> getActiveTickets(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetActiveRecordAccessTickets.
- Parameters:
first- First row indexpageSize- Number of rowssortField- aStringobject.descending- true if descending order requested; false otherwisefilters- Selected filters- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getTicketRequests
- Returns:
AccessTickets with the requested status- Throws:
DAOException
-
addTicket
addTicket.
- Parameters:
ticket- aAccessTicketobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateTicket
updateTicket.
- Parameters:
ticket- aAccessTicketobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteTicket
deleteTicket.
- Parameters:
ticket- aAccessTicketobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getAllIpRanges
getAllIpRanges.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getIpRangeCount
getIpRangeCount.
- Parameters:
filters- aMapobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getIpRanges
List<IpRange> getIpRanges(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetIpRanges.
- Parameters:
first- a int.pageSize- a int.sortField- aStringobject.descending- a boolean.filters- aMapobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getIpRange
getIpRange.
- Parameters:
id- a long.- Returns:
- a
IpRangeobject. - Throws:
DAOException- if any.
-
getIpRange
getIpRange.
- Parameters:
name- aStringobject.- Returns:
- a
IpRangeobject. - Throws:
DAOException- if any.
-
addIpRange
addIpRange.
- Parameters:
ipRange- aIpRangeobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateIpRange
updateIpRange.
- Parameters:
ipRange- aIpRangeobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteIpRange
deleteIpRange.
- Parameters:
ipRange- aIpRangeobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getAllCommentGroups
- Returns:
- All existing
CommentGroups - Throws:
DAOException
-
getCommentGroupUnfiltered
- Returns:
CommentGroup- Throws:
DAOException
-
getCommentGroup
getCommentGroup.
- Parameters:
id- a long.- Returns:
- a
CommentGroupobject. - Throws:
DAOException- if any.
-
addCommentGroup
addCommentGroup.
- Parameters:
commentGroup- aCommentGroupobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateCommentGroup
updateCommentGroup.
- Parameters:
commentGroup- aCommentGroupobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteCommentGroup
deleteCommentGroup.
- Parameters:
commentGroup- aCommentGroupobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getAllComments
getAllComments.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCommentCount
long getCommentCount(Map<String, String> filters, User owner, Set<String> targetPIs) throws DAOExceptiongetCommentCount.
- Parameters:
filters- aMapobject.owner-targetPIs-- Returns:
- Number of rows that match the criteria
- Throws:
DAOException- if any.
-
getComments
List<Comment> getComments(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, Set<String> targetPIs) throws DAOExceptiongetComments.
- Parameters:
first- a int.pageSize- a int.sortField- aStringobject.descending- a boolean.filters- aMapobject.targetPIs-- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCommentsOfUser
List<Comment> getCommentsOfUser(User user, int maxResults, String sortField, boolean descending) throws DAOException Get Comments created by a specific user- 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.
- Parameters:
pi- aStringobject.page- a int.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCommentsForWork
getCommentsForWork.
- Parameters:
pi- aStringobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getComment
getComment.
- Parameters:
id- a long.- Returns:
- a
Commentobject. - Throws:
DAOException- if any.
-
addComment
addComment.
- Parameters:
comment- aCommentobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateComment
updateComment.
- Parameters:
comment- aCommentobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteComment
deleteComment.
- Parameters:
comment- aCommentobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteComments
- Parameters:
pi- Record identifierowner- Comment creator- Returns:
- Number of affected rows
- Throws:
DAOException- if any.
-
changeCommentsOwner
Changes ownership of all comments fromfromUsertotoUser.- Parameters:
fromUser-toUser-- Returns:
- Number of updated
Comments - Throws:
DAOException- if any.
-
getAllSearches
getAllSearches.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getSearchCount
getSearchCount.
- Parameters:
owner- aUserobject.filters- aMapobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getSearches
List<Search> getSearches(User owner, int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetSearches.
- Parameters:
owner- aUserobject.first- a int.pageSize- a int.sortField- aStringobject.descending- a boolean.filters- aMapobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getSearches
getSearches.
- Parameters:
owner- aUserobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getSearch
getSearch.
- Parameters:
id- a long.- Returns:
- a
Searchobject. - Throws:
DAOException- if any.
-
addSearch
addSearch.
- Parameters:
search- aSearchobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateSearch
updateSearch.
- Parameters:
search- aSearchobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteSearch
deleteSearch.
- Parameters:
search- aSearchobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getAllDownloadJobs
getAllDownloadJobs.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getDownloadJobsForPi
getDownloadJobsForPi.
- Parameters:
pi- Record identifier- Returns:
- List of
DownloadJobs for given record identfier - Throws:
DAOException
-
getDownloadJob
getDownloadJob.
- Parameters:
id- a long.- Returns:
- a
DownloadJobobject. - Throws:
DAOException- if any.
-
getDownloadJobByIdentifier
getDownloadJobByIdentifier.
- Parameters:
identifier- aStringobject.- Returns:
- a
DownloadJobobject. - Throws:
DAOException- if any.
-
getDownloadJobByMetadata
getDownloadJobByMetadata.
- Parameters:
type- aStringobject.pi- aStringobject.logId- aStringobject.- Returns:
- a
DownloadJobobject. - Throws:
DAOException- if any.
-
addDownloadJob
addDownloadJob.
- Parameters:
downloadJob- aDownloadJobobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateDownloadJob
updateDownloadJob.
- Parameters:
downloadJob- aDownloadJobobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteDownloadJob
deleteDownloadJob.
- Parameters:
downloadJob- aDownloadJobobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getUploadJobsWithStatus
- Parameters:
status-JobStatus- Returns:
- List of
UploadJobs with given status - Throws:
DAOException
-
getUploadJobsForCreatorId
- Parameters:
creatorId- User id of the creator- Returns:
UploadJobs belonging to user with given ID- Throws:
DAOException- if any.
-
addUploadJob
addDownloadJob.
- Parameters:
uploadJob- aDownloadJobobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateUploadJob
updateDownloadJob.
- Parameters:
uploadJob- aDownloadJobobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteUploadJob
deleteDownloadJob.
- Parameters:
uploadJob- aDownloadJobobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getAllCMSPages
getAllCMSPages.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCmsPageForStaticPage
getCmsPageForStaticPage.
- Parameters:
pageName- aStringobject.- Returns:
- a
CMSPageobject. - Throws:
DAOException- if any.
-
getCMSPageCount
long getCMSPageCount(Map<String, String> filters, List<Long> allowedTemplates, List<String> allowedSubthemes, List<String> allowedCategories) throws DAOExceptiongetCMSPageCount.
- Parameters:
filters- aMapobject.allowedTemplates- aListobject.allowedSubthemes- aListobject.allowedCategories- aListobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getCMSPageCountByPropertyValue
- Parameters:
propertyName-propertyValue-- Returns:
- long
- Throws:
DAOException
-
getCMSPagesByPropertyValue
List<CMSPage> getCMSPagesByPropertyValue(String propertyName, String propertyValue) throws DAOException - Parameters:
propertyName-propertyValue-- Returns:
- List
- Throws:
DAOException
-
getCMSPages
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.
-
getCMSPagesByCategory
getCMSPagesByCategory.
- Parameters:
category- aCMSCategoryobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCMSPagesForRecord
getCMSPagesForRecord.
- Parameters:
pi- aStringobject.category- aCMSCategoryobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCMSPagesWithRelatedPi
List<CMSPage> getCMSPagesWithRelatedPi(int first, int pageSize, LocalDateTime fromDate, LocalDateTime toDate) throws DAOException getCMSPagesWithRelatedPi.
- Parameters:
first- a int.pageSize- a int.fromDate- aLocalDateTimeobject.toDate- aLocalDateTimeobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
isCMSPagesForRecordHaveUpdates
boolean isCMSPagesForRecordHaveUpdates(String pi, CMSCategory category, LocalDateTime fromDate, LocalDateTime toDate) throws DAOException isCMSPagesForRecordHaveUpdates.
- Parameters:
pi- aStringobject.category- aCMSCategoryobject.fromDate- aLocalDateTimeobject.toDate- aLocalDateTimeobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getCMSPageWithRelatedPiCount
getCMSPageWithRelatedPiCount.
- Parameters:
fromDate- aLocalDateTimeobject.toDate- aLocalDateTimeobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getCMSPageDefaultViewForRecord
- Parameters:
pi- Record identifier- Returns:
CMSPage- Throws:
DAOException
-
getCMSPageAccessConditions
- Returns:
- List
- Throws:
DAOException
-
getCMSPage
getCMSPage.
- Parameters:
id- a long.- Returns:
- a
CMSPageobject. - Throws:
DAOException- if any.
-
addCMSPage
addCMSPage.
- Parameters:
page- aCMSPageobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateCMSPage
updateCMSPage.
- Parameters:
page- aCMSPageobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteCMSPage
deleteCMSPage.
- Parameters:
page- aCMSPageobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getAllCMSPageTemplates
- Throws:
DAOException
-
getCMSPageTemplate
- Throws:
DAOException
-
addCMSPageTemplate
- Throws:
DAOException
-
updateCMSPageTemplate
- Throws:
DAOException
-
removeCMSPageTemplate
- Throws:
DAOException
-
getAllCMSMediaItems
getAllCMSMediaItems.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getAllCMSCollectionItems
getAllCMSCollectionItems.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCMSMediaItem
getCMSMediaItem.
- Parameters:
id- a long.- Returns:
- a
CMSMediaItemobject. - Throws:
DAOException- if any.
-
getCMSMediaItemByFilename
getCMSMediaItemByFilename.
- Parameters:
string- aStringobject.- Returns:
- a
CMSMediaItemobject. - Throws:
DAOException- if any.
-
addCMSMediaItem
addCMSMediaItem.
- Parameters:
item- aCMSMediaItemobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateCMSMediaItem
updateCMSMediaItem.
- Parameters:
item- aCMSMediaItemobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteCMSMediaItem
deleteCMSMediaItem.
- Parameters:
item- aCMSMediaItemobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getCMSMediaItemsByCategory
Get a list of allCMSMediaItems which contain the given category- Parameters:
category-- Returns:
- all containing cmsPages
- Throws:
DAOException
-
getAllStaticPages
getAllStaticPages.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
addStaticPage
addStaticPage.
- Parameters:
page- aCMSStaticPageobject.- Returns:
- true if page added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateStaticPage
updateStaticPage.
- Parameters:
page- aCMSStaticPageobject.- Returns:
- true if page updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteStaticPage
deleteStaticPage.
- Parameters:
page- aCMSStaticPageobject.- Returns:
- true if page deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getStaticPageForCMSPage
getStaticPageForCMSPage.
- Parameters:
page- aCMSPageobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getStaticPageForTypeType
getStaticPageForTypeType.
- Parameters:
pageType- aPageTypeobject.- Returns:
- a
Optionalobject. - Throws:
DAOException- if any.
-
getAllCategories
getAllCategories.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCountPagesUsingCategory
- Parameters:
category-- Returns:
- Number of existing CMS pages having the given category
- Throws:
DAOException
-
getCountMediaItemsUsingCategory
- Parameters:
category-- Returns:
- Number of existing CMS media items having the given category
- Throws:
DAOException
-
addCategory
addCategory.
- Parameters:
category- aCMSCategoryobject.- Returns:
- true if category added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateCategory
updateCategory.
- Parameters:
category- aCMSCategoryobject.- Returns:
- true if category updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteCategory
deleteCategory.
- Parameters:
category- aCMSCategoryobject.- Returns:
- true if category deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getCategoryByName
getCategoryByName.
- Parameters:
name- aStringobject.- Returns:
- a
CMSCategoryobject. - Throws:
DAOException- if any.
-
getCategory
getCategory.
- Parameters:
id- aLongobject.- Returns:
- a
CMSCategoryobject. - Throws:
DAOException- if any.
-
getAllTranskribusJobs
getAllTranskribusJobs.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getTranskribusJobs
List<TranskribusJob> getTranskribusJobs(String pi, String transkribusUserId, JobStatus status) throws DAOException getTranskribusJobs.
- Parameters:
pi- aStringobject.transkribusUserId- aStringobject.status- aJobStatusobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
addTranskribusJob
addTranskribusJob.
- Parameters:
job- aTranskribusJobobject.- Returns:
- true if job added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateTranskribusJob
updateTranskribusJob.
- Parameters:
job- aTranskribusJobobject.- Returns:
- true if job updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteTranskribusJob
deleteTranskribusJob.
- Parameters:
job- aTranskribusJobobject.- Returns:
- true if job deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
getAllCampaigns
getAllCampaigns.
- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCampaignCount
getCampaignCount.
- Parameters:
filters- aMapobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getCampaign
getCampaign.
- Parameters:
id- aLongobject.- Returns:
- a
Campaignobject. - Throws:
DAOException- if any.
-
getQuestion
getQuestion.
- Parameters:
id- aLongobject.- Returns:
- a
Questionobject. - Throws:
DAOException- if any.
-
getCampaigns
List<Campaign> getCampaigns(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetCampaigns.
- Parameters:
first- a int.pageSize- a int.sortField- aStringobject.descending- a boolean.filters- aMapobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCampaignStatisticsForRecord
List<CampaignRecordStatistic> getCampaignStatisticsForRecord(String pi, CrowdsourcingStatus status) throws DAOException getCampaignStatisticsForRecord.
- Parameters:
pi- aStringobject.status- aCrowdsourcingStatusobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCampaignPageStatisticsForRecord
List<CampaignRecordPageStatistic> getCampaignPageStatisticsForRecord(String pi, CrowdsourcingStatus status) throws DAOException getCampaignPageStatisticsForRecord.
- Parameters:
pi- aStringobject.status- aCrowdsourcingStatusobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
addCampaign
addCampaign.
- Parameters:
campaign- aCampaignobject.- Returns:
- true if campaign added successfully; false otherwise
- Throws:
DAOException- if any.
-
updateCampaign
updateCampaign.
- Parameters:
campaign- aCampaignobject.- Returns:
- true if campaign updated successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteCampaign
deleteCampaign.
- Parameters:
campaign- aCampaignobject.- Returns:
- true if campaign deleted successfully; false otherwise
- Throws:
DAOException- if any.
-
deleteCampaignStatisticsForUser
Deletes given user from the lists of annotators and reviewers an all campaign statistics.- Parameters:
user-- Returns:
- Number of affected campaigns
- Throws:
DAOException
-
changeCampaignStatisticContributors
ReplacedfromUserwithtoUserin the lists of annotators and reviewers an all campaign statistics.- Parameters:
fromUser-toUser-- Returns:
- Number of updated rows
- Throws:
DAOException
-
checkAvailability
boolean checkAvailability()- Returns:
- true if accessible; false otherwise
-
shutdown
void shutdown()shutdown.
-
getPagesWithComments
getPagesWithComments.
- Parameters:
pi- aStringobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getCMSCollections
getCMSCollections.
- Parameters:
solrField- aStringobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
addCMSCollection
addCMSCollection.
- Parameters:
collection- aCMSCollectionobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateCMSCollection
updateCMSCollection.
- Parameters:
collection- aCMSCollectionobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteCMSCollection
deleteCMSCollection.
- Parameters:
collection- aCMSCollectionobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getCMSCollection
getCMSCollection.
- Parameters:
solrField- aStringobject.solrFieldValue- aStringobject.- Returns:
- a
CMSCollectionobject. - Throws:
DAOException- if any.
-
getAnnotation
Annotations *- Parameters:
id- aLongobject.- Returns:
- a
CrowdsourcingAnnotationobject. - Throws:
DAOException- if any.
-
getAnnotationsForCampaign
getAnnotationsForCampaign.
- Parameters:
campaign- aCampaignobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getAnnotationsForWork
getAnnotationsForWork.
- Parameters:
pi- aStringobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getAnnotationCountForWork
- Parameters:
pi-- Returns:
- Number of existing annotations for the given pi
- Throws:
DAOException
-
getAnnotationsForCampaignAndWork
List<CrowdsourcingAnnotation> getAnnotationsForCampaignAndWork(Campaign campaign, String pi) throws DAOException getAnnotationsForCampaignAndWork.
- Parameters:
campaign- aCampaignobject.pi- aStringobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getAnnotationsForTarget
getAnnotationsForTarget.
- Parameters:
pi- aStringobject.page- aIntegerobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getAnnotationsForTarget
List<CrowdsourcingAnnotation> getAnnotationsForTarget(String pi, Integer page, String motivation) throws DAOException - Throws:
DAOException
-
getAnnotationsForUserId
List<CrowdsourcingAnnotation> getAnnotationsForUserId(Long userId, Integer maxResults, String sortField, boolean descending) throws DAOException - Parameters:
userId-maxResults-sortField-descending-- Returns:
- List of
CrowdsourcingAnnotations for the given userId - Throws:
DAOException
-
getAnnotations
List<CrowdsourcingAnnotation> getAnnotations(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetAnnotations.
- Parameters:
first- a int.pageSize- a int.sortField- aStringobject.descending- a boolean.filters- aMapobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getAnnotationCount
getAnnotationCount.
- Parameters:
filters- aMapobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getAnnotationCountForTarget
getAnnotationCountForTarget.
- Parameters:
pi- aStringobject.page- aIntegerobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getAnnotationsForCampaignAndTarget
List<CrowdsourcingAnnotation> getAnnotationsForCampaignAndTarget(Campaign campaign, String pi, Integer page) throws DAOException getAnnotationsForCampaignAndTarget.
- Parameters:
campaign- aCampaignobject.pi- aStringobject.page- aIntegerobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
addAnnotation
addAnnotation.
- Parameters:
annotation- aCrowdsourcingAnnotationobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
updateAnnotation
updateAnnotation.
- Parameters:
annotation- aCrowdsourcingAnnotationobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
deleteAnnotation
deleteAnnotation.
- Parameters:
annotation- aCrowdsourcingAnnotationobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getGeoMap
Get theGeoMapof the given mapId- Parameters:
mapId-- Returns:
- The GeoMap of the given id or else null
- Throws:
DAOException
-
getAllGeoMaps
Get allGeoMaps in database- Returns:
- A list of all stored GeoMaps
- Throws:
DAOException
-
addGeoMap
Add the given map to the database if no map of the same id already exists- Parameters:
map-- Returns:
- true if successful
- Throws:
DAOException
-
updateGeoMap
Update the givenGeoMapin the database- Parameters:
map-- Returns:
- true if successful
- Throws:
DAOException
-
deleteGeoMap
Delete the givenGeoMapfrom the database- Parameters:
map-- Returns:
- true if successful
- Throws:
DAOException
-
getPagesUsingMap
Return a list of CMS-pages embedding the given map- Parameters:
map-- Returns:
- List of
CMSPages that use given map - Throws:
DAOException
-
getPagesUsingMapInSidebar
Return a list of CMS-pages embedding the given map in a sidebar widget- Parameters:
map-- Returns:
- List of
CMSPages that use given map in sidebar - Throws:
DAOException
-
getCMSPagesForSubtheme
- Parameters:
subtheme-- Returns:
- List of
CMSPages that use given subtheme - Throws:
DAOException
-
getRecordNotes
List<CMSRecordNote> getRecordNotes(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptionGet a paginated list ofCMSRecordNotes- Parameters:
first-pageSize-sortField-descending-filters-- Returns:
- List of
CMSPages that match the given filters - Throws:
DAOException
-
getRecordNotesForPi
List<CMSSingleRecordNote> getRecordNotesForPi(String pi, boolean displayedNotesOnly) throws DAOException Get allCMSRecordNotes for the given pi- 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
Get allCMSMultiRecordNotes. To find notes relating to record, all notes must be check for matching query- Parameters:
displayedNotesOnly-- Returns:
- List of all existing
CMSSingleRecordNotes, optionaly filtered by displayed only - Throws:
DAOException
-
getAllRecordNotes
Get all persistedCMSRecordNotes- Returns:
- List of all existing
CMSSingleRecordNotes - Throws:
DAOException
-
getRecordNote
Get aCMSRecordNoteby its id property- Parameters:
id-- Returns:
CMSSingleRecordNotewith the given id- Throws:
DAOException
-
addRecordNote
Persist a newCMSRecordNote.- Parameters:
note-- Returns:
- true if note added successfully; false otherwise
- Throws:
DAOException
-
updateRecordNote
Updates an existingCMSRecordNote- Parameters:
note-- Returns:
- true if note updated successfully; false otherwise
- Throws:
DAOException
-
deleteRecordNote
Deletes an existingCMSRecordNote- Parameters:
note-- Returns:
- true if note deleted successfully; false otherwise
- Throws:
DAOException
-
saveTermsOfUse
- Throws:
DAOException
-
getTermsOfUse
- Throws:
DAOException
-
resetUserAgreementsToTermsOfUse
- Throws:
DAOException
-
getAllSliders
- Throws:
DAOException
-
getSlider
- Throws:
DAOException
-
addSlider
- Throws:
DAOException
-
updateSlider
- Throws:
DAOException
-
deleteSlider
- Throws:
DAOException
-
getPagesUsingSlider
- Throws:
DAOException
-
getConfiguredThemes
- Throws:
DAOException
-
getTheme
- Throws:
DAOException
-
addTheme
- Throws:
DAOException
-
updateTheme
- Throws:
DAOException
-
deleteTheme
- Throws:
DAOException
-
getAnnotations
List<CrowdsourcingAnnotation> getAnnotations(int first, int pageSize, String sortField, boolean descending, String filterString, Map<String, Object> filterParams) throws DAOException- Parameters:
first-pageSize-sortField-descending-filterString-filterParams-- Returns:
- List of
CrowdsourcingAnnotations matching given filters - Throws:
DAOException
-
getAllAnnotationsByMotivation
- Parameters:
commenting-- Returns:
- List of
CrowdsourcingAnnotations matching given commenting - Throws:
DAOException
-
getAllAnnotations
List<CrowdsourcingAnnotation> getAllAnnotations(String sortField, boolean sortDescending) throws DAOException - Parameters:
sortField-sortDescending-- Returns:
- List of all existing
CrowdsourcingAnnotations, optionally sorted by given sortField - Throws:
DAOException
-
getTotalAnnotationCount
- Returns:
- Number of all existing
CrowdsourcingAnnotations - Throws:
DAOException
-
getAllCustomWidgets
- Throws:
DAOException
-
getCustomWidget
- Throws:
DAOException
-
addCustomWidget
- Throws:
DAOException
-
updateCustomWidget
- Throws:
DAOException
-
deleteCustomWidget
- Throws:
DAOException
-
getPagesUsingWidget
- Throws:
DAOException
-
getCookieBanner
- Throws:
DAOException
-
saveCookieBanner
- Throws:
DAOException
-
getDisclaimer
Get the single storedDisclaimer. May return null if no disclaimer has been persisted yet- Returns:
- the disclaimer or null
- Throws:
DAOException
-
saveDisclaimer
- Throws:
DAOException
-
getNumRecordsWithComments
- Throws:
DAOException
-
getNativeQueryResults
- Throws:
DAOException
-
executeUpdate
- Throws:
DAOException
-
getAllClientApplications
- Throws:
DAOException
-
getClientApplication
- Throws:
DAOException
-
saveClientApplication
- Throws:
DAOException
-
deleteClientApplication
- Throws:
DAOException
-
getClientApplicationByClientId
- Throws:
DAOException
-
getAllUsageStatistics
- Throws:
DAOException
-
getUsageStatistics
- Throws:
DAOException
-
getUsageStatistics
List<DailySessionUsageStatistics> getUsageStatistics(LocalDate start, LocalDate end) throws DAOException - Throws:
DAOException
-
addUsageStatistics
- Throws:
DAOException
-
updateUsageStatistics
- Throws:
DAOException
-
deleteUsageStatistics
- Throws:
DAOException
-
deleteCMSComponent
- Throws:
DAOException
-
deleteCMSContent
- Throws:
DAOException
-
addCMSComponent
- Throws:
DAOException
-
updatedCMSComponent
- Throws:
DAOException
-
getCMSComponent
- Throws:
DAOException
-
deleteViewerMessage
- Throws:
DAOException
-
addViewerMessage
- Throws:
DAOException
-
updateViewerMessage
- Throws:
DAOException
-
getViewerMessage
- Throws:
DAOException
-
getViewerMessageByMessageID
- Throws:
DAOException
-
getViewerMessages
List<ViewerMessage> getViewerMessages(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetViewerMessages.
- Parameters:
first- a int.pageSize- a int.sortField- aStringobject.descending- a boolean.filters- aMapobject.- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
getViewerMessageCount
getViewerMessageCount.
- Parameters:
filters- aMapobject.- Returns:
- a long.
- Throws:
DAOException- if any.
-
getRecurringTaskTriggers
- Throws:
DAOException
-
getRecurringTaskTrigger
- Throws:
DAOException
-
getRecurringTaskTriggerForTask
- Throws:
DAOException
-
addRecurringTaskTrigger
- Throws:
DAOException
-
updateRecurringTaskTrigger
- Throws:
DAOException
-
deleteRecurringTaskTrigger
- Throws:
DAOException
-
deleteViewerMessagesBefore
- Throws:
DAOException
-
addHighlight
- Throws:
DAOException
-
updateHighlight
- Throws:
DAOException
-
deleteHighlight
- Throws:
DAOException
-
getHighlight
- Throws:
DAOException
-
getAllHighlights
- Throws:
DAOException
-
getHighlights
List<HighlightData> getHighlights(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOException- Throws:
DAOException
-
getHighlightsForDate
- Throws:
DAOException
-
getPastHighlightsForDate
List<HighlightData> getPastHighlightsForDate(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, LocalDateTime date) throws DAOException- Throws:
DAOException
-
getFutureHighlightsForDate
List<HighlightData> getFutureHighlightsForDate(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, LocalDateTime date) throws DAOException- Throws:
DAOException
-
getMaintenanceMode
Returns the only existing instance of MaintenanceMode.- Returns:
- a
IpRangeobject. - Throws:
DAOException- if any.
-
updateMaintenanceMode
updateMaintenanceMode.
- Parameters:
maintenanceMode- aIpRangeobject.- Returns:
- a boolean.
- Throws:
DAOException- if any.
-
getFactory
jakarta.persistence.EntityManagerFactory getFactory()Get the EntityManagerFactory created when initializing the class. Can be used to explicitly create new EntityManagers.- Returns:
- the EntityManagerFactory
-
getEntityManager
jakarta.persistence.EntityManager getEntityManager()Get an EntityManager for a query or transaction. Must always be followed byclose(EntityManager) Methodafter the query/transaction- Returns:
- a new EntityManager
-
close
Either close the given EntityManager or do some other post query/transaction handling for the given EntityManager. Must be called after each query/transaction.- Parameters:
em- EntityManager- Throws:
DAOException
-
startTransaction
jakarta.persistence.EntityTransaction startTransaction(jakarta.persistence.EntityManager em) CallgetTransaction()on the given EntityManager and thenbegin()on the transaction- Parameters:
em- EntityManager- Returns:
- the transaction gotten from the entity manager
-
commitTransaction
void commitTransaction(jakarta.persistence.EntityTransaction et) throws jakarta.persistence.PersistenceException CallEntityTransaction.commit()on the given transaction- Parameters:
et- EntityTransaction- Throws:
jakarta.persistence.PersistenceException
-
commitTransaction
void commitTransaction(jakarta.persistence.EntityManager em) throws jakarta.persistence.PersistenceException CallEntityTransaction.commit()on the current transaction of the given EntityManager- Parameters:
em- EntityManager- Throws:
jakarta.persistence.PersistenceException
-
handleException
void handleException(jakarta.persistence.EntityTransaction et) throws jakarta.persistence.PersistenceException Handling of exceptions occurred duringcommitTransaction(EntityTransaction). Usually callsEntityTransaction.rollback()- Parameters:
et- EntityTransaction- Throws:
jakarta.persistence.PersistenceException
-
handleException
void handleException(jakarta.persistence.EntityManager em) Handling of exceptions occurred duringcommitTransaction(EntityManager)Usually callsEntityTransaction.rollback()on the current transaction of the given EntityManager- Parameters:
em- EntityManager- Throws:
jakarta.persistence.PersistenceException
-