@Service @Transactional(readOnly=true) public class MediaServiceImpl extends IdentifiableServiceBase<Media,IMediaDao> implements IMediaService
logger, UPDATE_TITLE_CACHE_DEFAULT_STEP_SIZE
commonService
appContext, dao, INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
MediaServiceImpl() |
Modifier and Type | Method and Description |
---|---|
DeleteResult |
delete(java.util.UUID mediaUuid,
MediaDeletionConfigurator config) |
Pager<MediaKey> |
getMediaKeys(java.util.Set<Taxon> taxonomicScope,
java.util.Set<NamedArea> geoScopes,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Return a List of MediaKeys, optionally filtered by the parameters passed.
|
Pager<Rights> |
getRights(Media t,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Return a Pager of rights belonging to this object
|
DeleteResult |
isDeletable(java.util.UUID mediaUuid,
DeleteConfiguratorBase config)
the basic isDeletable method return false if the object is referenced from any other object.
|
protected void |
setDao(IMediaDao dao) |
UpdateResult |
updateCaches(java.lang.Class<? extends Media> clazz,
java.lang.Integer stepSize,
IIdentifiableEntityCacheStrategy<Media> cacheStrategy,
IProgressMonitor monitor)
(Re-)generate the caches for all objects of this concrete IdentifiableEntity class
|
countByTitle, countByTitle, countByTitleWithRestrictions, deduplicate, find, findByIdentifier, findByMarker, findByTitle, findByTitle, findByTitleWithRestrictions, findTitleCache, findUuidAndTitleCacheByMarker, getSourcedObjectByIdInSource, getSources, getTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, search, switchOfAutoinitializer, switchOnOldAutoInitializer, updateCaches, updateCachesImpl
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents
checkPublished, clear, count, delete, delete, delete, exists, find, find, find, find, findById, findWithoutFlush, getSession, group, list, list, load, load, load, load, loadByIds, loadByIds, loadWithUpdate, lock, merge, merge, merge, merge, page, page, page, pageByParamWithRestrictions, refresh, refresh, save, save, saveOrUpdate, saveOrUpdate, setApplicationContext, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
search
countByTitle, countByTitle, countByTitleWithRestrictions, deduplicate, find, findByIdentifier, findByMarker, findByTitle, findByTitle, findByTitleWithRestrictions, findTitleCache, findUuidAndTitleCacheByMarker, getSourcedObjectByIdInSource, getSources, getTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, updateCaches
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents
clear, count, delete, delete, delete, exists, find, find, find, find, findById, findWithoutFlush, getSession, group, list, list, load, load, load, load, loadByIds, loadByIds, loadWithUpdate, lock, merge, merge, merge, merge, page, page, page, pageByParamWithRestrictions, refresh, refresh, save, save, saveOrUpdate, saveOrUpdate, update
@Autowired protected void setDao(IMediaDao dao)
setDao
in class ServiceBase<Media,IMediaDao>
public Pager<MediaKey> getMediaKeys(java.util.Set<Taxon> taxonomicScope, java.util.Set<NamedArea> geoScopes, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IMediaService
getMediaKeys
in interface IMediaService
taxonomicScope
- a Set of Taxon instances that define the taxonomic scope of the key (can be null)geoScopes
- a Set of NamedArea instances that define the geospatial scope of the key (can be null)pageSize
- The maximum number of keys returned (can be null for all keys)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public Pager<Rights> getRights(Media t, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IIdentifiableEntityService
getRights
in interface IIdentifiableEntityService<Media>
getRights
in interface IMediaService
getRights
in class IdentifiableServiceBase<Media,IMediaDao>
t
- The identifiable entitypageSize
- The maximum number of rights returned (can be null for all rights)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
@Transactional(readOnly=false) public UpdateResult updateCaches(java.lang.Class<? extends Media> clazz, java.lang.Integer stepSize, IIdentifiableEntityCacheStrategy<Media> cacheStrategy, IProgressMonitor monitor)
IIdentifiableEntityService
updateCaches
in interface IIdentifiableEntityService<Media>
clazz
- class of objects to be updatedstepSize
- number of objects loaded per step. If null
use default.cacheStrategy
- cache strategy used for cache generation. If null
use default.monitor
- progress monitor. If null
use default.@Transactional(readOnly=false) public DeleteResult delete(java.util.UUID mediaUuid, MediaDeletionConfigurator config)
delete
in interface IMediaService
public DeleteResult isDeletable(java.util.UUID mediaUuid, DeleteConfiguratorBase config)
VersionableServiceBase
isDeletable
in interface IVersionableService<Media>
isDeletable
in class VersionableServiceBase<Media,IMediaDao>
Copyright © 2007-2020 EDIT. All Rights Reserved.