@Service @Transactional(readOnly=true) public class RegistrationServiceImpl extends AnnotatableServiceBase<Registration,IRegistrationDao> implements IRegistrationService
commonService
appContext, dao, INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
RegistrationServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addTypeDesignation(Registration registration,
java.util.UUID typeDesignationUuid) |
void |
addTypeDesignation(java.util.UUID registrationUUID,
java.util.UUID typeDesignationUuid) |
Registration |
assureIsPersisted(Registration reg) |
boolean |
checkRegistrationExistsFor(TaxonName name) |
Registration |
createRegistrationForName(java.util.UUID taxonNameUuid)
Create and persist a new Registration for the name having the supplied UUID.
|
Registration |
newRegistration()
Factory Method
TODO move into RegistrationFactory
|
Pager<Registration> |
page(java.util.Optional<Reference> reference,
java.util.Collection<RegistrationStatus> includedStatus,
java.lang.Integer pageSize,
java.lang.Integer pageIndex,
java.util.List<java.lang.String> propertyPaths)
Returns a sublist of Registration instances stored in the database.
|
Pager<Registration> |
page(java.util.UUID submitterUuid,
java.util.Collection<RegistrationStatus> includedStatus,
java.util.Collection<java.util.UUID> taxonNameUUIDs,
java.lang.Integer pageSize,
java.lang.Integer pageIndex,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
Pager<Registration> |
page(java.util.UUID submitterUuid,
java.util.Collection<RegistrationStatus> includedStatus,
java.lang.String identifierFilterPattern,
java.lang.String taxonNameFilterPattern,
java.lang.String referenceFilterPattern,
java.util.Collection<java.util.UUID> typeDesignationStatusUuids,
java.lang.Integer pageSize,
java.lang.Integer pageIndex,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
Pager<Registration> |
pageByIdentifier(java.lang.String identifier,
java.lang.Integer pageIndex,
java.lang.Integer pageSize,
java.util.List<java.lang.String> propertyPaths) |
Pager<Registration> |
pageTaxomicInclusion(java.util.UUID submitterUuid,
java.util.Collection<RegistrationStatus> includedStatus,
java.lang.String taxonNameFilterPattern,
MatchMode matchMode,
java.lang.Integer pageSize,
java.lang.Integer pageIndex,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
java.util.Map<java.util.UUID,Registration> |
save(java.util.Collection<Registration> newInstances)
Save a collection containing new entities (persists the entities)
|
Registration |
save(Registration newInstance)
Save a new entity (persists the entity)
|
java.util.Map<java.util.UUID,Registration> |
saveOrUpdate(java.util.Collection<Registration> transientInstances)
Save new entities or update the persistent state of existing
transient entities that have been persisted previously
|
java.util.UUID |
saveOrUpdate(Registration transientObject)
Save a new entity or update the persistent state of an existing
transient entity that has been persisted previously
|
protected void |
setDao(IRegistrationDao dao) |
java.util.Map<java.util.UUID,RegistrationStatus> |
statusByIdentifier(java.lang.String identifier) |
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, isDeletable, 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, setApplicationContext, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, isDeletable, 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, update
@Autowired protected void setDao(IRegistrationDao dao)
setDao
in class ServiceBase<Registration,IRegistrationDao>
@Transactional(readOnly=true) public Pager<Registration> page(java.util.Optional<Reference> reference, java.util.Collection<RegistrationStatus> includedStatus, java.lang.Integer pageSize, java.lang.Integer pageIndex, java.util.List<java.lang.String> propertyPaths)
propertyPaths
and recursively initialized for each of the
entities in the resultset
For detailed description and examples regarding
propertyPaths
please refer to:
IBeanInitializer#initialize(Object, List)
page
in interface IRegistrationService
reference
- filters the Registration by the reference of the nomenclatural
act for which the Registration as been created. The name and
all type designations associated with the Registration are
sharing the same citation. If the Optional itself is
null
the parameter is neglected. If Optional
contains the value null
all registrations with a
name or type designation that has no reference are returned.
Also those registrations having no name and type designation
at all.includedStatus
- filters the Registration by the RegistrationStatus. Only
Registration having one of the supplied status will included.
// * @param orderHints // * Supports path like
orderHints.propertyNames
which // * include
*-to-one properties like createdBy.username or // *
authorTeam.persistentTitleCachepageSize
- The maximum number of objects returned (can be null for all
matching objects)@Transactional(readOnly=true) public Pager<Registration> page(java.util.UUID submitterUuid, java.util.Collection<RegistrationStatus> includedStatus, java.lang.String identifierFilterPattern, java.lang.String taxonNameFilterPattern, java.lang.String referenceFilterPattern, java.util.Collection<java.util.UUID> typeDesignationStatusUuids, java.lang.Integer pageSize, java.lang.Integer pageIndex, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
page
in interface IRegistrationService
submitterUuid
- Filter by the uuid of the User
associated with the Registration as Registration.submitter
includedStatus
- Filter by one or more RegistrationStatus
. Multiple status will be combined with OR. In case the current user
is not authenticated (i.e. the authentication is anonymous) the includedStatus will be set to RegistrationStatus.PUBLISHED
to protect all other Registrations from being undisclosed.identifierFilterPattern
- Filter by the Registration.identifier
.
The method matches Registrations which contain the the passed pattern in the identifier.
The asterisk '*
' can be used as wildcard in any position of the pattern stringtaxonNameFilterPattern
- The method matches Registrations which contain the the passed pattern in the
Registration.name
. The asterisk '*
' can be used
as wildcard in any position of the pattern stringreferenceFilterPattern
- The asterisk '*
' can be used as wildcard in any position of the pattern stringtypeDesignationStatusUuids
- Filter by one or more SpecimenTypeDesignationStatus
or NameTypeDesignationStatus
.
Multiple status will be combined with OR.@Transactional(readOnly=true) public Pager<Registration> pageTaxomicInclusion(java.util.UUID submitterUuid, java.util.Collection<RegistrationStatus> includedStatus, java.lang.String taxonNameFilterPattern, MatchMode matchMode, java.lang.Integer pageSize, java.lang.Integer pageIndex, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
pageTaxomicInclusion
in interface IRegistrationService
@Transactional(readOnly=true) public Pager<Registration> page(java.util.UUID submitterUuid, java.util.Collection<RegistrationStatus> includedStatus, java.util.Collection<java.util.UUID> taxonNameUUIDs, java.lang.Integer pageSize, java.lang.Integer pageIndex, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
page
in interface IRegistrationService
@Transactional(readOnly=true) public Pager<Registration> pageByIdentifier(java.lang.String identifier, java.lang.Integer pageIndex, java.lang.Integer pageSize, java.util.List<java.lang.String> propertyPaths) throws java.io.IOException
pageByIdentifier
in interface IRegistrationService
identifier
- validateUniqueness
- response
- java.io.IOException
@Transactional(readOnly=true) public java.util.Map<java.util.UUID,RegistrationStatus> statusByIdentifier(java.lang.String identifier) throws java.io.IOException
statusByIdentifier
in interface IRegistrationService
java.io.IOException
public Registration save(Registration newInstance)
save
in interface IService<Registration>
save
in class ServiceBase<Registration,IRegistrationDao>
newInstance
- the new entity to be persistedpublic java.util.UUID saveOrUpdate(Registration transientObject)
saveOrUpdate
in interface IService<Registration>
saveOrUpdate
in class ServiceBase<Registration,IRegistrationDao>
transientObject
- the entity to be persistedpublic java.util.Map<java.util.UUID,Registration> save(java.util.Collection<Registration> newInstances)
save
in interface IService<Registration>
save
in class ServiceBase<Registration,IRegistrationDao>
newInstances
- the new entities to be persistedpublic java.util.Map<java.util.UUID,Registration> saveOrUpdate(java.util.Collection<Registration> transientInstances)
saveOrUpdate
in interface IService<Registration>
saveOrUpdate
in class ServiceBase<Registration,IRegistrationDao>
transientInstances
- the entities to be persistedpublic Registration newRegistration()
newRegistration
in interface IRegistrationService
@Transactional(readOnly=false) public Registration createRegistrationForName(java.util.UUID taxonNameUuid)
IRegistrationService
createRegistrationForName
in interface IRegistrationService
taxonNameId
- @Transactional(readOnly=false) public Registration assureIsPersisted(Registration reg)
assureIsPersisted
in interface IRegistrationService
typeDesignationTarget
- @Transactional(readOnly=false) public void addTypeDesignation(java.util.UUID registrationUUID, java.util.UUID typeDesignationUuid)
addTypeDesignation
in interface IRegistrationService
@Transactional(readOnly=false) public void addTypeDesignation(Registration registration, java.util.UUID typeDesignationUuid)
addTypeDesignation
in interface IRegistrationService
public boolean checkRegistrationExistsFor(TaxonName name)
checkRegistrationExistsFor
in interface IRegistrationService
name
- Copyright © 2007-2020 EDIT. All Rights Reserved.