@Service @Transactional(readOnly=true) public class AgentServiceImpl extends IdentifiableServiceBase<AgentBase,IAgentDao> implements IAgentService
UPDATE_TITLE_CACHE_DEFAULT_STEP_SIZE
commonService
appContext, dao, INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
AgentServiceImpl()
Constructor
|
Modifier and Type | Method and Description |
---|---|
UpdateResult |
convertPerson2Team(Person person)
If possible replaces the given person by a new
Team . |
UpdateResult |
convertPerson2Team(java.util.UUID personUuid) |
UpdateResult |
convertTeam2Person(Team team)
If the given
Team is a single member team all links to the team are redirected to the
single member and the team itself is deleted. |
UpdateResult |
convertTeam2Person(java.util.UUID teamUuid) |
DeleteResult |
delete(AgentBase agent) |
DeleteResult |
delete(java.util.UUID agentUUID)
Delete an existing persistent object
|
java.util.List<AgentBase> |
findByTitleAndAbbrevTitle(IIdentifiableEntityServiceConfigurator<AgentBase> config) |
Pager<Address> |
getAddresses(AgentBase agent,
java.lang.Integer pageSize,
java.lang.Integer pageNumber)
Return a paged list of the addresses of an agent
|
Pager<InstitutionalMembership> |
getInstitutionalMemberships(Person person,
java.lang.Integer pageSize,
java.lang.Integer pageNumber)
Return a paged list of the institutional memberships held by a person
|
java.util.List<UuidAndTitleCache<AgentBase>> |
getInstitutionUuidAndTitleCache(java.lang.Integer limit,
java.lang.String pattern)
Returns a list of
UuidAndTitleCache containing all Institution objects
with their respective titleCache |
Pager<Person> |
getMembers(Team team,
java.lang.Integer pageSize,
java.lang.Integer pageNumber)
Return a paged list of the members of a team
|
java.util.List<UuidAndTitleCache<Person>> |
getPersonUuidAndTitleCache()
Returns a list of
UuidAndTitleCache containing all Person s |
java.util.List<UuidAndTitleCache<Team>> |
getTeamUuidAndNomenclaturalTitle()
Returns a list of
UuidAndTitleCache containing all TeamOrPersonBase objects
with their respective nomenclaturalTitle instead of regular titleCache |
java.util.List<UuidAndTitleCache<Team>> |
getTeamUuidAndTitleCache()
Returns a list of
UuidAndTitleCache containing all TeamOrPersonBase objects
with their respective titleCache |
java.util.List<UuidAndTitleCache<AgentBase>> |
getUuidAndAbbrevTitleCache(java.lang.Class clazz,
java.lang.Integer limit,
java.lang.String pattern)
Returns a list of
UuidAndTitleCache containing all Institution objects
with their respective NomenclaturalTitleCache |
java.util.List<Institution> |
searchInstitutionByCode(java.lang.String code) |
protected void |
setDao(IAgentDao dao) |
UpdateResult |
updateCaches(java.lang.Class<? extends AgentBase> clazz,
java.lang.Integer stepSize,
IIdentifiableEntityCacheStrategy<AgentBase> 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, getRights, getSourcedObjectByIdInSource, getSources, getTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, search, switchOfAutoinitializer, switchOnOldAutoInitializer, updateCaches, updateCachesImpl
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, isDeletable, pageAuditEvents, pageAuditEvents
checkPublished, clear, count, 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, getRights, getSourcedObjectByIdInSource, getSources, getTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, updateCaches
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, isDeletable, pageAuditEvents, pageAuditEvents
clear, count, 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(IAgentDao dao)
setDao
in class ServiceBase<AgentBase,IAgentDao>
@Transactional(readOnly=false) public UpdateResult updateCaches(java.lang.Class<? extends AgentBase> clazz, java.lang.Integer stepSize, IIdentifiableEntityCacheStrategy<AgentBase> cacheStrategy, IProgressMonitor monitor)
IIdentifiableEntityService
updateCaches
in interface IIdentifiableEntityService<AgentBase>
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.public java.util.List<Institution> searchInstitutionByCode(java.lang.String code)
searchInstitutionByCode
in interface IAgentService
public Pager<InstitutionalMembership> getInstitutionalMemberships(Person person, java.lang.Integer pageSize, java.lang.Integer pageNumber)
IAgentService
getInstitutionalMemberships
in interface IAgentService
person
- the personpageSize
- The maximum number of memberships returned (can be null for all memberships)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)public Pager<Person> getMembers(Team team, java.lang.Integer pageSize, java.lang.Integer pageNumber)
IAgentService
getMembers
in interface IAgentService
team
- the teampageSize
- The maximum number of members returned (can be null for all members)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)public Pager<Address> getAddresses(AgentBase agent, java.lang.Integer pageSize, java.lang.Integer pageNumber)
IAgentService
getAddresses
in interface IAgentService
agent
- the agentpageSize
- The maximum number of addresses returned (can be null for all members)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)public java.util.List<UuidAndTitleCache<Team>> getTeamUuidAndNomenclaturalTitle()
IAgentService
UuidAndTitleCache
containing all TeamOrPersonBase
objects
with their respective nomenclaturalTitle instead of regular titleCachegetTeamUuidAndNomenclaturalTitle
in interface IAgentService
UuidAndTitleCache
instancespublic java.util.List<UuidAndTitleCache<Person>> getPersonUuidAndTitleCache()
IAgentService
UuidAndTitleCache
containing all Person
sgetPersonUuidAndTitleCache
in interface IAgentService
UuidAndTitleCache
instancespublic java.util.List<UuidAndTitleCache<Team>> getTeamUuidAndTitleCache()
IAgentService
UuidAndTitleCache
containing all TeamOrPersonBase
objects
with their respective titleCachegetTeamUuidAndTitleCache
in interface IAgentService
UuidAndTitleCache
instancespublic java.util.List<UuidAndTitleCache<AgentBase>> getInstitutionUuidAndTitleCache(java.lang.Integer limit, java.lang.String pattern)
IAgentService
UuidAndTitleCache
containing all Institution
objects
with their respective titleCachegetInstitutionUuidAndTitleCache
in interface IAgentService
UuidAndTitleCache
instances@Transactional(readOnly=false) public DeleteResult delete(java.util.UUID agentUUID)
IService
public DeleteResult delete(AgentBase agent)
@Transactional(readOnly=false) public UpdateResult convertTeam2Person(java.util.UUID teamUuid) throws MergeException
convertTeam2Person
in interface IAgentService
MergeException
public UpdateResult convertTeam2Person(Team team) throws MergeException
IAgentService
Team
is a single member team all links to the team are redirected to the
single member and the team itself is deleted.
Team
has no members (protected caches) a new Person
is created
and all links to the team are redirected to the new person and the team itself is deleted.
IllegalArgumentException
is thrown.convertTeam2Person
in interface IAgentService
team
- the team to be convertedMergeException
- if anything else goes wrong during merge@Transactional(readOnly=false) public UpdateResult convertPerson2Team(java.util.UUID personUuid) throws MergeException, java.lang.IllegalArgumentException
convertPerson2Team
in interface IAgentService
MergeException
java.lang.IllegalArgumentException
public UpdateResult convertPerson2Team(Person person) throws MergeException, java.lang.IllegalArgumentException
IAgentService
Team
.
MergeException
is thrown.convertPerson2Team
in interface IAgentService
person
- the Person
to be convertedMergeException
- if anything else goes wrong during mergejava.lang.IllegalArgumentException
public java.util.List<UuidAndTitleCache<AgentBase>> getUuidAndAbbrevTitleCache(java.lang.Class clazz, java.lang.Integer limit, java.lang.String pattern)
IAgentService
UuidAndTitleCache
containing all Institution
objects
with their respective NomenclaturalTitleCachegetUuidAndAbbrevTitleCache
in interface IAgentService
UuidAndTitleCache
instancespublic java.util.List<AgentBase> findByTitleAndAbbrevTitle(IIdentifiableEntityServiceConfigurator<AgentBase> config)
findByTitleAndAbbrevTitle
in interface IAgentService
Copyright © 2007-2020 EDIT. All Rights Reserved.