Interface IDAO
- All Known Implementing Classes:
JPADAO
IDAO interface.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addAnnotation
(CrowdsourcingAnnotation annotation) addAnnotation.boolean
addBookmarkList
(BookmarkList bookmarkList) addBookmarkList.boolean
addCampaign
(Campaign campaign) addCampaign.boolean
addCategory
(CMSCategory category) addCategory.boolean
addCMSCollection
(CMSCollection collection) addCMSCollection.boolean
addCMSComponent
(PersistentCMSComponent persistentCMSComponent) boolean
addCMSMediaItem
(CMSMediaItem item) addCMSMediaItem.boolean
addCMSNavigationItem.boolean
addCMSPage
(CMSPage page) addCMSPage.boolean
addCMSPageTemplate
(CMSPageTemplate template) boolean
addComment
(Comment comment) addComment.boolean
addCommentGroup
(CommentGroup commentGroup) addCommentGroup.boolean
addCustomWidget
(CustomSidebarWidget widget) boolean
addDownloadJob
(DownloadJob downloadJob) addDownloadJob.boolean
addDownloadTicket
(DownloadTicket downloadTicket) addDownloadTicket.boolean
Add the given map to the database if no map of the same id already existsboolean
addHighlight
(HighlightData object) boolean
addIpRange
(IpRange ipRange) addIpRange.boolean
addLicenseType
(LicenseType licenseType) addLicenseType.boolean
addRecordNote
(CMSRecordNote note) Persist a newCMSRecordNote
.boolean
boolean
addRole.boolean
addSearch.boolean
boolean
addStaticPage
(CMSStaticPage page) addStaticPage.boolean
addTheme
(ThemeConfiguration theme) boolean
addTranskribusJob.boolean
addUploadJob
(UploadJob uploadJob) addDownloadJob.boolean
addUsageStatistics
(DailySessionUsageStatistics statistics) boolean
addUser.boolean
addUserGroup
(UserGroup userGroup) addUserGroup.boolean
addUserRole
(UserRole userRole) addUserRole.boolean
addViewerMessage
(ViewerMessage message) int
changeCampaignStatisticContributors
(User fromUser, User toUser) ReplacedfromUser
withtoUser
in the lists of annotators and reviewers an all campaign statistics.int
changeCommentsOwner
(User fromUser, User toUser) Changes ownership of all comments fromfromUser
totoUser
.boolean
void
close
(jakarta.persistence.EntityManager em) Either close the given EntityManager or do some other post query/transaction handling for the given EntityManager.boolean
columnsExists
(String tableName, String columnName) columnsExists.void
commitTransaction
(jakarta.persistence.EntityManager em) CallEntityTransaction.commit()
on the current transaction of the given EntityManagervoid
commitTransaction
(jakarta.persistence.EntityTransaction et) CallEntityTransaction.commit()
on the given transactionboolean
deleteAnnotation
(CrowdsourcingAnnotation annotation) deleteAnnotation.boolean
deleteBookmarkList
(BookmarkList bookmarkList) deleteBookmarkList.boolean
deleteCampaign
(Campaign campaign) deleteCampaign.int
Deletes given user from the lists of annotators and reviewers an all campaign statistics.boolean
deleteCategory
(CMSCategory category) deleteCategory.boolean
deleteClientApplication
(long id) boolean
deleteCMSCollection
(CMSCollection collection) deleteCMSCollection.boolean
deleteCMSComponent
(PersistentCMSComponent persistentCMSComponent) boolean
deleteCMSContent
(CMSContent content) boolean
deleteCMSMediaItem.boolean
deleteCMSNavigationItem.boolean
deleteCMSPage
(CMSPage page) deleteCMSPage.boolean
deleteComment
(Comment comment) deleteComment.boolean
deleteCommentGroup
(CommentGroup commentGroup) deleteCommentGroup.int
deleteComments
(String pi, User owner) boolean
boolean
deleteDownloadJob
(DownloadJob downloadJob) deleteDownloadJob.boolean
deleteDownloadTicket
(DownloadTicket downloadTicket) deleteDownloadTicket.boolean
deleteGeoMap
(GeoMap map) Delete the givenGeoMap
from the databaseboolean
deleteHighlight
(Long id) boolean
deleteIpRange
(IpRange ipRange) deleteIpRange.boolean
deleteLicenseType
(LicenseType licenseType) deleteLicenseType.boolean
Deletes an existingCMSRecordNote
boolean
boolean
deleteRole
(Role role) deleteRole.boolean
deleteSearch
(Search search) deleteSearch.boolean
deleteSlider
(CMSSlider slider) boolean
deleteStaticPage.boolean
deleteTheme
(ThemeConfiguration theme) boolean
deleteTranskribusJob.boolean
deleteUploadJob
(UploadJob uploadJob) deleteDownloadJob.boolean
deleteUsageStatistics
(long id) boolean
deleteUser
(User user) deleteUser.boolean
deleteUserGroup
(UserGroup userGroup) deleteUserGroup.boolean
deleteUserRole
(UserRole userRole) deleteUserRole.boolean
deleteViewerMessage
(ViewerMessage message) int
int
executeUpdate
(String string) long
getActiveDownloadTicketCount
(Map<String, String> filters) getActiveDownloadTicketCount.getActiveDownloadTickets
(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getActiveDownloadTickets.getAllAnnotations
(String sortField, boolean sortDescending) getAllAnnotationsByMotivation
(String commenting) getAllBookmarkLists.getAllCampaigns.getAllCategories.getAllCMSCollectionItems.getAllCMSMediaItems.getAllCMSPages.getAllComments.getAllDownloadJobs.Get allGeoMap
s in databasegetAllIpRanges.getAllLicenses.getAllLicenseTypes.getAllMultiRecordNotes
(boolean displayedNotesOnly) Get allCMSMultiRecordNote
s.Get all persistedCMSRecordNote
sgetAllRoles.getAllSearches.getAllStaticPages.getAllTopCMSNavigationItems.getAllTranskribusJobs.getAllUserGroups.getAllUserRoles.getAllUsers
(boolean refresh) getAllUsers.getAnnotation
(Long id) Annotations *long
getAnnotationCount
(Map<String, String> filters) getAnnotationCount.long
getAnnotationCountForTarget
(String pi, Integer page) getAnnotationCountForTarget.long
getAnnotations
(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.long
getBookmarkListCount
(User user) Get number of bookmark lists owned by the given usergetBookmarkLists
(User user) getBookmarkLists.getCampaign
(Long id) getCampaign.long
getCampaignCount
(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 allCMSMediaItem
s which contain the given categorygetCMSNavigationItem
(long id) getCMSNavigationItem.getCMSPage
(long id) getCMSPage.long
getCMSPageCount
(Map<String, String> filters, List<Long> allowedTemplates, List<String> allowedSubthemes, List<String> allowedCategories) getCMSPageCount.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.getCMSPagesForRecord
(String pi, CMSCategory category) getCMSPagesForRecord.getCMSPagesForSubtheme
(String subtheme) getCMSPagesWithRelatedPi
(int first, int pageSize, LocalDateTime fromDate, LocalDateTime toDate) getCMSPagesWithRelatedPi.long
getCMSPageWithRelatedPiCount
(LocalDateTime fromDate, LocalDateTime toDate) getCMSPageWithRelatedPiCount.getComment
(long id) getComment.long
getCommentCount.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 userlong
getCoreLicenseTypeCount
(Map<String, String> filters) getCoreLicenseTypeCount.getCoreLicenseTypes
(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getCoreLicenseTypes.long
getCountMediaItemsUsingCategory
(CMSCategory category) long
getCountPagesUsingCategory
(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.getDownloadTicketByPasswordHash
(String passwordHash) jakarta.persistence.EntityManager
Get an EntityManager for a query or transaction.jakarta.persistence.EntityManagerFactory
Get the EntityManagerFactory created when initializing the class.getFutureHighlightsForDate
(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters, LocalDateTime date) Get theGeoMap
of 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.long
getIpRangeCount
(Map<String, String> filters) getIpRangeCount.getIpRanges
(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getIpRanges.getLicense
(Long id) getLicense.long
getLicenseCount
(LicenseType licenseType) Returns the number of licenses that use the given license type.getLicenses
(LicenseType licenseType) getLicenseType
(long id) getLicenseType.getLicenseType
(String name) getLicenseType.long
getLicenseTypeCount
(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.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 aCMSRecordNote
by its id propertygetRecordNotes
(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) Get a paginated list ofCMSRecordNote
sgetRecordNotesForPi
(String pi, boolean displayedNotesOnly) Get allCMSRecordNote
s for the given pigetRelatedNavItem
(CMSPage page) getRelatedNavItem.getRole
(long id) getRole.getRole.long
getRoleCount
(Map<String, String> filters) getRoleCount.getRoles.getSearch
(long id) getSearch.long
getSearchCount
(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.long
getTranskribusJobs
(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.long
getUserCount
(Map<String, String> filters) getUserCount.getUserGroup
(long id) getUserGroup.getUserGroup
(String name) getUserGroup.long
getUserGroupCount
(Map<String, String> filters) getUserGroupCount.getUserGroups
(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getUserGroups.getUserGroups
(User owner) getUserGroups.long
getUserRoleCount
(UserGroup userGroup, User user, Role role) getUserRoleCount.getUserRoles
(UserGroup userGroup, User user, Role role) getUserRoles.getUsers.getUsersByPropertyValue
(String propertyName, String propertyValue) getViewerMessage
(Long id) long
getViewerMessageCount
(Map<String, String> filters) getViewerMessageCount.getViewerMessages
(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) getViewerMessages.void
handleException
(jakarta.persistence.EntityManager em) Handling of exceptions occurred duringcommitTransaction(EntityManager)
Usually callsEntityTransaction.rollback()
on the current transaction of the given EntityManagervoid
handleException
(jakarta.persistence.EntityTransaction et) Handling of exceptions occurred duringcommitTransaction(EntityTransaction)
.boolean
isCMSPagesForRecordHaveUpdates
(String pi, CMSCategory category, LocalDateTime fromDate, LocalDateTime toDate) isCMSPagesForRecordHaveUpdates.boolean
removeCMSPageTemplate
(CMSPageTemplate template) boolean
boolean
boolean
saveCookieBanner
(CookieBanner banner) boolean
saveDisclaimer
(Disclaimer disclaimer) boolean
saveTermsOfUse
(TermsOfUse tou) void
shutdown()
shutdown.jakarta.persistence.EntityTransaction
startTransaction
(jakarta.persistence.EntityManager em) CallgetTransaction()
on the given EntityManager and thenbegin()
on the transactionboolean
tableExists
(String tableName) tableExists.boolean
updateAnnotation
(CrowdsourcingAnnotation annotation) updateAnnotation.boolean
updateBookmarkList
(BookmarkList bookmarkList) updateBookmarkList.boolean
updateCampaign
(Campaign campaign) updateCampaign.boolean
updateCategory
(CMSCategory category) updateCategory.boolean
updateCMSCollection
(CMSCollection collection) updateCMSCollection.boolean
updateCMSMediaItem.boolean
updateCMSNavigationItem.boolean
updateCMSPage
(CMSPage page) updateCMSPage.boolean
updateCMSPageTemplate
(CMSPageTemplate template) boolean
updateComment
(Comment comment) updateComment.boolean
updateCommentGroup
(CommentGroup commentGroup) updateCommentGroup.boolean
boolean
updatedCMSComponent
(PersistentCMSComponent persistentCMSComponent) boolean
updateDownloadJob
(DownloadJob downloadJob) updateDownloadJob.boolean
updateDownloadTicket
(DownloadTicket downloadTicket) updateDownloadTicket.boolean
updateGeoMap
(GeoMap map) Update the givenGeoMap
in the databaseboolean
updateHighlight
(HighlightData object) boolean
updateIpRange
(IpRange ipRange) updateIpRange.boolean
updateLicenseType
(LicenseType licenseType) updateLicenseType.boolean
Updates an existingCMSRecordNote
boolean
boolean
updateRole
(Role role) updateRole.boolean
updateSearch
(Search search) updateSearch.boolean
updateSlider
(CMSSlider slider) boolean
updateStaticPage.boolean
updateTheme
(ThemeConfiguration theme) boolean
updateTranskribusJob.boolean
updateUploadJob
(UploadJob uploadJob) updateDownloadJob.boolean
updateUsageStatistics
(DailySessionUsageStatistics statistics) boolean
updateUser
(User user) updateUser.boolean
updateUserGroup
(UserGroup userGroup) updateUserGroup.boolean
updateUserRole
(UserRole userRole) updateUserRole.boolean
updateViewerMessage
(ViewerMessage message)
-
Method Details
-
tableExists
tableExists.
- Parameters:
tableName
- aString
object.- Returns:
- a boolean.
- Throws:
SQLException
- if any.DAOException
-
columnsExists
columnsExists.
- Parameters:
tableName
- aString
object.columnName
- aString
object.- Returns:
- a boolean.
- Throws:
SQLException
- if any.DAOException
-
getAllUsers
getAllUsers.
- Parameters:
refresh
- a boolean.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getUserCount
getUserCount.
- Parameters:
filters
- aMap
object.- 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
- aString
object.descending
- a boolean.filters
- aMap
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getUsersByPropertyValue
- Parameters:
propertyName
-propertyValue
-- Returns:
- List if users with matching property name/value pair
- Throws:
DAOException
-
getUser
getUser.
- Parameters:
id
- a long.- Returns:
- a
User
object. - Throws:
DAOException
- if any.
-
getUserByEmail
getUserByEmail.
- Parameters:
email
- aString
object.- Returns:
- a
User
object. - Throws:
DAOException
- if any.
-
getUserByOpenId
getUserByOpenId.
- Parameters:
identifier
- aString
object.- Returns:
- a
User
object. - Throws:
DAOException
- if any.
-
getUserByNickname
getUserByNickname.
- Parameters:
nickname
- aString
object.- Returns:
- a
User
object. - Throws:
DAOException
- if any.
-
addUser
addUser.
- Parameters:
user
- aUser
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateUser
updateUser.
- Parameters:
user
- aUser
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteUser
deleteUser.
- Parameters:
user
- aUser
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getAllUserGroups
getAllUserGroups.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getUserGroupCount
getUserGroupCount.
- Parameters:
filters
- aMap
object.- 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
- aString
object.descending
- a boolean.filters
- aMap
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getUserGroups
getUserGroups.
- Parameters:
owner
- aUser
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getUserGroup
getUserGroup.
- Parameters:
id
- a long.- Returns:
- a
UserGroup
object. - Throws:
DAOException
- if any.
-
getUserGroup
getUserGroup.
- Parameters:
name
- aString
object.- Returns:
- a
UserGroup
object. - Throws:
DAOException
- if any.
-
addUserGroup
addUserGroup.
- Parameters:
userGroup
- aUserGroup
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateUserGroup
updateUserGroup.
- Parameters:
userGroup
- aUserGroup
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteUserGroup
deleteUserGroup.
- Parameters:
userGroup
- aUserGroup
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getAllBookmarkLists
getAllBookmarkLists.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getPublicBookmarkLists
getPublicBookmarkLists.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getBookmarkLists
getBookmarkLists.
- Parameters:
user
- aUser
object.- Returns:
- a
List
object. - 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
BookmarkList
object. - Throws:
DAOException
- if any.
-
getBookmarkList
getBookmarkList.
- Parameters:
name
- aString
object.user
- aUser
object.- Returns:
- a
BookmarkList
object. - Throws:
DAOException
- if any.
-
addBookmarkList
addBookmarkList.
- Parameters:
bookmarkList
- aBookmarkList
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateBookmarkList
updateBookmarkList.
- Parameters:
bookmarkList
- aBookmarkList
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteBookmarkList
deleteBookmarkList.
- Parameters:
bookmarkList
- aBookmarkList
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getAllRoles
getAllRoles.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getRoleCount
getRoleCount.
- Parameters:
filters
- aMap
object.- 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
- aString
object.descending
- a boolean.filters
- aMap
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getRole
getRole.
- Parameters:
id
- a long.- Returns:
- a
Role
object. - Throws:
DAOException
- if any.
-
getRole
getRole.
- Parameters:
name
- aString
object.- Returns:
- a
Role
object. - Throws:
DAOException
- if any.
-
addRole
addRole.
- Parameters:
role
- aRole
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateRole
updateRole.
- Parameters:
role
- aRole
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteRole
deleteRole.
- Parameters:
role
- aRole
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getAllUserRoles
getAllUserRoles.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getUserRoleCount
getUserRoleCount.
- Parameters:
userGroup
- aUserGroup
object.user
- aUser
object.role
- aRole
object.- Returns:
- Row count
- Throws:
DAOException
- if any.
-
getUserRoles
getUserRoles.
- Parameters:
userGroup
- aUserGroup
object.user
- aUser
object.role
- aRole
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
addUserRole
addUserRole.
- Parameters:
userRole
- aUserRole
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateUserRole
updateUserRole.
- Parameters:
userRole
- aUserRole
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteUserRole
deleteUserRole.
- Parameters:
userRole
- aUserRole
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getAllLicenseTypes
getAllLicenseTypes.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getLicenseTypeCount
getLicenseTypeCount.
- Parameters:
filters
- aMap
object.- Returns:
- a long.
- Throws:
DAOException
- if any.
-
getCoreLicenseTypeCount
getCoreLicenseTypeCount.
- Parameters:
filters
- aMap
object.- Returns:
- a long.
- Throws:
DAOException
- if any.
-
getRecordLicenseTypes
getRecordLicenseTypes.
- Returns:
- a
List
object. - 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
- aString
object.descending
- a boolean.filters
- aMap
object.- Returns:
- a
List
object. - 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
- aString
object.descending
- a boolean.filters
- aMap
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getLicenseType
getLicenseType.
- Parameters:
id
- a long.- Returns:
- a
LicenseType
object. - Throws:
DAOException
- if any.
-
getLicenseType
getLicenseType.
- Parameters:
name
- aString
object.- Returns:
- a
LicenseType
object. - Throws:
DAOException
- if any.
-
getLicenseTypes
Returns all license types that match the given name list.- Parameters:
names
-- Returns:
- a
LicenseType
object. - Throws:
DAOException
- in case of errors
-
getOverridingLicenseType
- Parameters:
licenseType
-- Returns:
- List of license types overriding given licenseType
- Throws:
DAOException
-
addLicenseType
addLicenseType.
- Parameters:
licenseType
- aLicenseType
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateLicenseType
updateLicenseType.
- Parameters:
licenseType
- aLicenseType
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteLicenseType
deleteLicenseType.
- Parameters:
licenseType
- aLicenseType
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getAllLicenses
getAllLicenses.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getLicense
getLicense.
- Parameters:
id
- a long.- Returns:
- a
License
object. - Throws:
DAOException
- if any.
-
getLicenses
- Parameters:
licenseType
-- Returns:
- List of
LicenseException
s of the given licenseType - Throws:
DAOException
-
getLicenseCount
Returns the number of licenses that use the given license type.- Parameters:
licenseType
-- Returns:
- Number of existing
License
s of the given licenseType - Throws:
DAOException
-
getDownloadTicket
- Parameters:
id
-- Returns:
DownloadTicket
with the given id- Throws:
DAOException
-
getDownloadTicketByPasswordHash
- Parameters:
passwordHash
-- Returns:
DownloadTicket
with the given passwordHash- Throws:
DAOException
-
getActiveDownloadTicketCount
getActiveDownloadTicketCount.
- Parameters:
filters
- Selected filters- Returns:
- Number of found rows
- Throws:
DAOException
- if any.
-
getActiveDownloadTickets
List<DownloadTicket> getActiveDownloadTickets(int first, int pageSize, String sortField, boolean descending, Map<String, String> filters) throws DAOExceptiongetActiveDownloadTickets.
- Parameters:
first
- First row indexpageSize
- Number of rowssortField
- aString
object.descending
- true if descending order requested; false otherwisefilters
- Selected filters- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getDownloadTicketRequests
- Returns:
DownloadTicket
s with the requested status- Throws:
DAOException
-
addDownloadTicket
addDownloadTicket.
- Parameters:
downloadTicket
- aDownloadTicket
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateDownloadTicket
updateDownloadTicket.
- Parameters:
downloadTicket
- aDownloadTicket
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteDownloadTicket
deleteDownloadTicket.
- Parameters:
downloadTicket
- aDownloadTicket
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getAllIpRanges
getAllIpRanges.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getIpRangeCount
getIpRangeCount.
- Parameters:
filters
- aMap
object.- 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
- aString
object.descending
- a boolean.filters
- aMap
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getIpRange
getIpRange.
- Parameters:
id
- a long.- Returns:
- a
IpRange
object. - Throws:
DAOException
- if any.
-
getIpRange
getIpRange.
- Parameters:
name
- aString
object.- Returns:
- a
IpRange
object. - Throws:
DAOException
- if any.
-
addIpRange
addIpRange.
- Parameters:
ipRange
- aIpRange
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateIpRange
updateIpRange.
- Parameters:
ipRange
- aIpRange
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteIpRange
deleteIpRange.
- Parameters:
ipRange
- aIpRange
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getAllCommentGroups
- Returns:
- All existing
CommentGroup
s - Throws:
DAOException
-
getCommentGroupUnfiltered
- Returns:
CommentGroup
- Throws:
DAOException
-
getCommentGroup
getCommentGroup.
- Parameters:
id
- a long.- Returns:
- a
CommentGroup
object. - Throws:
DAOException
- if any.
-
addCommentGroup
addCommentGroup.
- Parameters:
commentGroup
- aCommentGroup
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateCommentGroup
updateCommentGroup.
- Parameters:
commentGroup
- aCommentGroup
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteCommentGroup
deleteCommentGroup.
- Parameters:
commentGroup
- aCommentGroup
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getAllComments
getAllComments.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getCommentCount
long getCommentCount(Map<String, String> filters, User owner, Set<String> targetPIs) throws DAOExceptiongetCommentCount.
- Parameters:
filters
- aMap
object.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
- aString
object.descending
- a boolean.filters
- aMap
object.targetPIs
-- Returns:
- a
List
object. - 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
- aString
object.page
- a int.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getCommentsForWork
getCommentsForWork.
- Parameters:
pi
- aString
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getComment
getComment.
- Parameters:
id
- a long.- Returns:
- a
Comment
object. - Throws:
DAOException
- if any.
-
addComment
addComment.
- Parameters:
comment
- aComment
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateComment
updateComment.
- Parameters:
comment
- aComment
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteComment
deleteComment.
- Parameters:
comment
- aComment
object.- 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 fromfromUser
totoUser
.- Parameters:
fromUser
-toUser
-- Returns:
- Number of updated
Comment
s - Throws:
DAOException
- if any.
-
getAllSearches
getAllSearches.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getSearchCount
getSearchCount.
- Parameters:
owner
- aUser
object.filters
- aMap
object.- 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
- aUser
object.first
- a int.pageSize
- a int.sortField
- aString
object.descending
- a boolean.filters
- aMap
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getSearches
getSearches.
- Parameters:
owner
- aUser
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getSearch
getSearch.
- Parameters:
id
- a long.- Returns:
- a
Search
object. - Throws:
DAOException
- if any.
-
addSearch
addSearch.
- Parameters:
search
- aSearch
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateSearch
updateSearch.
- Parameters:
search
- aSearch
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteSearch
deleteSearch.
- Parameters:
search
- aSearch
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getAllDownloadJobs
getAllDownloadJobs.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getDownloadJobsForPi
getDownloadJobsForPi.
- Parameters:
pi
- Record identifier- Returns:
- List of
DownloadJob
s for given record identfier - Throws:
DAOException
-
getDownloadJob
getDownloadJob.
- Parameters:
id
- a long.- Returns:
- a
DownloadJob
object. - Throws:
DAOException
- if any.
-
getDownloadJobByIdentifier
getDownloadJobByIdentifier.
- Parameters:
identifier
- aString
object.- Returns:
- a
DownloadJob
object. - Throws:
DAOException
- if any.
-
getDownloadJobByMetadata
getDownloadJobByMetadata.
- Parameters:
type
- aString
object.pi
- aString
object.logId
- aString
object.- Returns:
- a
DownloadJob
object. - Throws:
DAOException
- if any.
-
addDownloadJob
addDownloadJob.
- Parameters:
downloadJob
- aDownloadJob
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateDownloadJob
updateDownloadJob.
- Parameters:
downloadJob
- aDownloadJob
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteDownloadJob
deleteDownloadJob.
- Parameters:
downloadJob
- aDownloadJob
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getUploadJobsWithStatus
- Parameters:
status
-JobStatus
- Returns:
- List of
UploadJob
s with given status - Throws:
DAOException
-
getUploadJobsForCreatorId
- Parameters:
creatorId
- User id of the creator- Returns:
UploadJob
s belonging to user with given ID- Throws:
DAOException
- if any.
-
addUploadJob
addDownloadJob.
- Parameters:
uploadJob
- aDownloadJob
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateUploadJob
updateDownloadJob.
- Parameters:
uploadJob
- aDownloadJob
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteUploadJob
deleteDownloadJob.
- Parameters:
uploadJob
- aDownloadJob
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getAllCMSPages
getAllCMSPages.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getCmsPageForStaticPage
getCmsPageForStaticPage.
- Parameters:
pageName
- aString
object.- Returns:
- a
CMSPage
object. - Throws:
DAOException
- if any.
-
getCMSPageCount
long getCMSPageCount(Map<String, String> filters, List<Long> allowedTemplates, List<String> allowedSubthemes, List<String> allowedCategories) throws DAOExceptiongetCMSPageCount.
- Parameters:
filters
- aMap
object.allowedTemplates
- aList
object.allowedSubthemes
- aList
object.allowedCategories
- aList
object.- Returns:
- a long.
- Throws:
DAOException
- if any.
-
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
- aCMSCategory
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getCMSPagesForRecord
getCMSPagesForRecord.
- Parameters:
pi
- aString
object.category
- aCMSCategory
object.- Returns:
- a
List
object. - 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
- aLocalDateTime
object.toDate
- aLocalDateTime
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
isCMSPagesForRecordHaveUpdates
boolean isCMSPagesForRecordHaveUpdates(String pi, CMSCategory category, LocalDateTime fromDate, LocalDateTime toDate) throws DAOException isCMSPagesForRecordHaveUpdates.
- Parameters:
pi
- aString
object.category
- aCMSCategory
object.fromDate
- aLocalDateTime
object.toDate
- aLocalDateTime
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getCMSPageWithRelatedPiCount
getCMSPageWithRelatedPiCount.
- Parameters:
fromDate
- aLocalDateTime
object.toDate
- aLocalDateTime
object.- Returns:
- a long.
- Throws:
DAOException
- if any.
-
getCMSPageDefaultViewForRecord
- Parameters:
pi
- Record identifier- Returns:
CMSPage
- Throws:
DAOException
-
getCMSPage
getCMSPage.
- Parameters:
id
- a long.- Returns:
- a
CMSPage
object. - Throws:
DAOException
- if any.
-
addCMSPage
addCMSPage.
- Parameters:
page
- aCMSPage
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateCMSPage
updateCMSPage.
- Parameters:
page
- aCMSPage
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteCMSPage
deleteCMSPage.
- Parameters:
page
- aCMSPage
object.- 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
List
object. - Throws:
DAOException
- if any.
-
getAllCMSCollectionItems
getAllCMSCollectionItems.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getCMSMediaItem
getCMSMediaItem.
- Parameters:
id
- a long.- Returns:
- a
CMSMediaItem
object. - Throws:
DAOException
- if any.
-
getCMSMediaItemByFilename
getCMSMediaItemByFilename.
- Parameters:
string
- aString
object.- Returns:
- a
CMSMediaItem
object. - Throws:
DAOException
- if any.
-
addCMSMediaItem
addCMSMediaItem.
- Parameters:
item
- aCMSMediaItem
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateCMSMediaItem
updateCMSMediaItem.
- Parameters:
item
- aCMSMediaItem
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteCMSMediaItem
deleteCMSMediaItem.
- Parameters:
item
- aCMSMediaItem
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getCMSMediaItemsByCategory
Get a list of allCMSMediaItem
s which contain the given category- Parameters:
category
-- Returns:
- all containing cmsPages
- Throws:
DAOException
-
getAllStaticPages
getAllStaticPages.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
addStaticPage
addStaticPage.
- Parameters:
page
- aCMSStaticPage
object.- Returns:
- true if page added successfully; false otherwise
- Throws:
DAOException
- if any.
-
updateStaticPage
updateStaticPage.
- Parameters:
page
- aCMSStaticPage
object.- Returns:
- true if page updated successfully; false otherwise
- Throws:
DAOException
- if any.
-
deleteStaticPage
deleteStaticPage.
- Parameters:
page
- aCMSStaticPage
object.- Returns:
- true if page deleted successfully; false otherwise
- Throws:
DAOException
- if any.
-
getStaticPageForCMSPage
getStaticPageForCMSPage.
- Parameters:
page
- aCMSPage
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getStaticPageForTypeType
getStaticPageForTypeType.
- Parameters:
pageType
- aPageType
object.- Returns:
- a
Optional
object. - Throws:
DAOException
- if any.
-
getAllCategories
getAllCategories.
- Returns:
- a
List
object. - 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
- aCMSCategory
object.- Returns:
- true if category added successfully; false otherwise
- Throws:
DAOException
- if any.
-
updateCategory
updateCategory.
- Parameters:
category
- aCMSCategory
object.- Returns:
- true if category updated successfully; false otherwise
- Throws:
DAOException
- if any.
-
deleteCategory
deleteCategory.
- Parameters:
category
- aCMSCategory
object.- Returns:
- true if category deleted successfully; false otherwise
- Throws:
DAOException
- if any.
-
getCategoryByName
getCategoryByName.
- Parameters:
name
- aString
object.- Returns:
- a
CMSCategory
object. - Throws:
DAOException
- if any.
-
getCategory
getCategory.
- Parameters:
id
- aLong
object.- Returns:
- a
CMSCategory
object. - Throws:
DAOException
- if any.
-
getAllTranskribusJobs
getAllTranskribusJobs.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getTranskribusJobs
List<TranskribusJob> getTranskribusJobs(String pi, String transkribusUserId, JobStatus status) throws DAOException getTranskribusJobs.
- Parameters:
pi
- aString
object.transkribusUserId
- aString
object.status
- aJobStatus
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
addTranskribusJob
addTranskribusJob.
- Parameters:
job
- aTranskribusJob
object.- Returns:
- true if job added successfully; false otherwise
- Throws:
DAOException
- if any.
-
updateTranskribusJob
updateTranskribusJob.
- Parameters:
job
- aTranskribusJob
object.- Returns:
- true if job updated successfully; false otherwise
- Throws:
DAOException
- if any.
-
deleteTranskribusJob
deleteTranskribusJob.
- Parameters:
job
- aTranskribusJob
object.- Returns:
- true if job deleted successfully; false otherwise
- Throws:
DAOException
- if any.
-
getAllCampaigns
getAllCampaigns.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getCampaignCount
getCampaignCount.
- Parameters:
filters
- aMap
object.- Returns:
- a long.
- Throws:
DAOException
- if any.
-
getCampaign
getCampaign.
- Parameters:
id
- aLong
object.- Returns:
- a
Campaign
object. - Throws:
DAOException
- if any.
-
getQuestion
getQuestion.
- Parameters:
id
- aLong
object.- Returns:
- a
Question
object. - 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
- aString
object.descending
- a boolean.filters
- aMap
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getCampaignStatisticsForRecord
List<CampaignRecordStatistic> getCampaignStatisticsForRecord(String pi, CrowdsourcingStatus status) throws DAOException getCampaignStatisticsForRecord.
- Parameters:
pi
- aString
object.status
- aCrowdsourcingStatus
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getCampaignPageStatisticsForRecord
List<CampaignRecordPageStatistic> getCampaignPageStatisticsForRecord(String pi, CrowdsourcingStatus status) throws DAOException getCampaignPageStatisticsForRecord.
- Parameters:
pi
- aString
object.status
- aCrowdsourcingStatus
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
addCampaign
addCampaign.
- Parameters:
campaign
- aCampaign
object.- Returns:
- true if campaign added successfully; false otherwise
- Throws:
DAOException
- if any.
-
updateCampaign
updateCampaign.
- Parameters:
campaign
- aCampaign
object.- Returns:
- true if campaign updated successfully; false otherwise
- Throws:
DAOException
- if any.
-
deleteCampaign
deleteCampaign.
- Parameters:
campaign
- aCampaign
object.- 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
ReplacedfromUser
withtoUser
in 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
- aString
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getCMSCollections
getCMSCollections.
- Parameters:
solrField
- aString
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
addCMSCollection
addCMSCollection.
- Parameters:
collection
- aCMSCollection
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateCMSCollection
updateCMSCollection.
- Parameters:
collection
- aCMSCollection
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteCMSCollection
deleteCMSCollection.
- Parameters:
collection
- aCMSCollection
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getCMSCollection
getCMSCollection.
- Parameters:
solrField
- aString
object.solrFieldValue
- aString
object.- Returns:
- a
CMSCollection
object. - Throws:
DAOException
- if any.
-
getAnnotation
Annotations *- Parameters:
id
- aLong
object.- Returns:
- a
CrowdsourcingAnnotation
object. - Throws:
DAOException
- if any.
-
getAnnotationsForCampaign
getAnnotationsForCampaign.
- Parameters:
campaign
- aCampaign
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getAnnotationsForWork
getAnnotationsForWork.
- Parameters:
pi
- aString
object.- Returns:
- a
List
object. - 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
- aCampaign
object.pi
- aString
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getAnnotationsForTarget
getAnnotationsForTarget.
- Parameters:
pi
- aString
object.page
- aInteger
object.- Returns:
- a
List
object. - 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
CrowdsourcingAnnotation
s 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
- aString
object.descending
- a boolean.filters
- aMap
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getAnnotationCount
getAnnotationCount.
- Parameters:
filters
- aMap
object.- Returns:
- a long.
- Throws:
DAOException
- if any.
-
getAnnotationCountForTarget
getAnnotationCountForTarget.
- Parameters:
pi
- aString
object.page
- aInteger
object.- Returns:
- a long.
- Throws:
DAOException
- if any.
-
getAnnotationsForCampaignAndTarget
List<CrowdsourcingAnnotation> getAnnotationsForCampaignAndTarget(Campaign campaign, String pi, Integer page) throws DAOException getAnnotationsForCampaignAndTarget.
- Parameters:
campaign
- aCampaign
object.pi
- aString
object.page
- aInteger
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
addAnnotation
addAnnotation.
- Parameters:
annotation
- aCrowdsourcingAnnotation
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
updateAnnotation
updateAnnotation.
- Parameters:
annotation
- aCrowdsourcingAnnotation
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
deleteAnnotation
deleteAnnotation.
- Parameters:
annotation
- aCrowdsourcingAnnotation
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
getGeoMap
Get theGeoMap
of the given mapId- Parameters:
mapId
-- Returns:
- The GeoMap of the given id or else null
- Throws:
DAOException
-
getAllGeoMaps
Get allGeoMap
s 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 givenGeoMap
in the database- Parameters:
map
-- Returns:
- true if successful
- Throws:
DAOException
-
deleteGeoMap
Delete the givenGeoMap
from 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
CMSPage
s 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
CMSPage
s that use given map in sidebar - Throws:
DAOException
-
getCMSPagesForSubtheme
- Parameters:
subtheme
-- Returns:
- List of
CMSPage
s 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 ofCMSRecordNote
s- Parameters:
first
-pageSize
-sortField
-descending
-filters
-- Returns:
- List of
CMSPage
s that match the given filters - Throws:
DAOException
-
getRecordNotesForPi
List<CMSSingleRecordNote> getRecordNotesForPi(String pi, boolean displayedNotesOnly) throws DAOException Get allCMSRecordNote
s 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
CMSSingleRecordNote
s for the given pi - Throws:
DAOException
-
getAllMultiRecordNotes
Get allCMSMultiRecordNote
s. To find notes relating to record, all notes must be check for matching query- Parameters:
displayedNotesOnly
-- Returns:
- List of all existing
CMSSingleRecordNote
s, optionaly filtered by displayed only - Throws:
DAOException
-
getAllRecordNotes
Get all persistedCMSRecordNote
s- Returns:
- List of all existing
CMSSingleRecordNote
s - Throws:
DAOException
-
getRecordNote
Get aCMSRecordNote
by its id property- Parameters:
id
-- Returns:
CMSSingleRecordNote
with 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
CrowdsourcingAnnotation
s matching given filters - Throws:
DAOException
-
getAllAnnotationsByMotivation
- Parameters:
commenting
-- Returns:
- List of
CrowdsourcingAnnotation
s matching given commenting - Throws:
DAOException
-
getAllAnnotations
List<CrowdsourcingAnnotation> getAllAnnotations(String sortField, boolean sortDescending) throws DAOException - Parameters:
sortField
-sortDescending
-- Returns:
- List of all existing
CrowdsourcingAnnotation
s, optionally sorted by given sortField - Throws:
DAOException
-
getTotalAnnotationCount
- Returns:
- Number of all existing
CrowdsourcingAnnotation
s - 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
- aString
object.descending
- a boolean.filters
- aMap
object.- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getViewerMessageCount
getViewerMessageCount.
- Parameters:
filters
- aMap
object.- 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
-
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) Method
after 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
-