edu.vt.middleware.registry.manage.person
Class RegistryFinder

java.lang.Object
  extended by edu.vt.middleware.registry.common.CommonRegistryFinder
      extended by edu.vt.middleware.registry.manage.person.RegistryFinder

public final class RegistryFinder
extends CommonRegistryFinder

RegistryFinder provides methods for doing registry searches with entity beans.

Version:
$Revision: 7780 $
Author:
Daniel Fisher

Field Summary
private static Log LOG
          Log for this class
 
Constructor Summary
RegistryFinder(EntityManager em)
          This creates a RegistryFinder with the supplied Entity Manager.
 
Method Summary
 Long getPersonUidByPidm(String pidm)
          Returns the Person uid for the supplied Banner PIDM.
 Set<Entitlement> getRelatedEntitlements(Long uid)
          Returns all the entitlements associated with the supplied person.
 Set<Group> getRelatedGroups(Long uid)
          Returns all the groups associated with the supplied person.
 Set<Service> getRelatedServices(Long uid)
          Returns all the services associated with the supplied person.
 boolean hasAffiliation(Long uid)
          This returns whether the supplied uid has any affiliations.
 boolean hasAffiliation(Long uid, PersonAffiliation affiliation)
          This returns whether the supplied UID has the supplied affiliation.
 boolean hasBirthdate(Long uid, Calendar birthdate)
          This returns whether the person has the supplied birthdate.
 boolean hasCertificate(Long uid, CertificateType type)
          This returns whether the supplied UID has a certificate of the supplied type.
 boolean hasIdentifier(Long uid, Identifier id)
          This returns whether the supplied person has the supplied identifier.
 boolean hasInstantMessagingId(Long uid)
          This returns whether the supplied UID has a instant messaging id.
 boolean hasInstantMessagingId(Long uid, String id)
          This returns whether the supplied UID has the instant messaging id.
 boolean hasLabeledUri(Long uid)
          This returns whether the supplied UID has a labelUri.
 boolean hasLabeledUri(Long uid, String uri)
          This returns whether the supplied UID has the labeled uri.
 boolean hasPersonInRole(String pid, RoleType role)
          This returns whether the supplied person has any related person in the supplied role.
 boolean hasSuppressedAttribute(Long uid, PersonAttribute attribute)
          This returns whether the supplied UID has suppressed the supplied attribute.
 boolean identifierExists(Identifier id)
          This returns whether the supplied identifier exists.
 boolean isAccountShelved(Long uid)
          This returns whether the supplied person's account is shelved.
 boolean isConfidential(Long uid)
          This returns whether the person's confidential flag is set.
 boolean isDeceased(Long uid)
          This returns whether the person's deceased flag is set.
 boolean isPersonInRole(String pid, Long uid, RoleType role)
          This returns whether the person with the supplied uid is in the supplied role for the supplied owning person.
 
Methods inherited from class edu.vt.middleware.registry.common.CommonRegistryFinder
emailAccountExists, entitlementExists, flushAndRefresh, getAccountState, getDataTypes, getEntitlementData, getEntityManager, getGroup, getGroup, getPerson, getPerson, getPersonUid, getService, getService, getTicket, getTicket, getUserid, groupExists, guestIdExists, personExists, serviceExists, ticketExists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Log LOG
Log for this class

Constructor Detail

RegistryFinder

public RegistryFinder(EntityManager em)
This creates a RegistryFinder with the supplied Entity Manager.

Parameters:
em - EntityManager
Method Detail

identifierExists

public boolean identifierExists(Identifier id)
                         throws ApplicationServerException
This returns whether the supplied identifier exists.

Parameters:
id - Identifier
Returns:
boolean
Throws:
ApplicationServerException - if the method fails
FinderFailedException - if the supplied id is not unique in the database

hasIdentifier

public boolean hasIdentifier(Long uid,
                             Identifier id)
                      throws ApplicationServerException
This returns whether the supplied person has the supplied identifier. If id is not null then the current identifier must match.

Parameters:
uid - Long
id - Identifier
Returns:
boolean
Throws:
ApplicationServerException - if the method fails
FinderFailedException - if the supplied id is not unique for the supplied person

hasAffiliation

public boolean hasAffiliation(Long uid)
This returns whether the supplied uid has any affiliations.

Parameters:
uid - Long
Returns:
boolean

hasAffiliation

public boolean hasAffiliation(Long uid,
                              PersonAffiliation affiliation)
This returns whether the supplied UID has the supplied affiliation.

Parameters:
uid - Long
affiliation - PersonAffiliation
Returns:
boolean

hasSuppressedAttribute

public boolean hasSuppressedAttribute(Long uid,
                                      PersonAttribute attribute)
This returns whether the supplied UID has suppressed the supplied attribute.

Parameters:
uid - Long
attribute - PersonAttribute
Returns:
boolean

hasLabeledUri

public boolean hasLabeledUri(Long uid)
This returns whether the supplied UID has a labelUri.

Parameters:
uid - Long
Returns:
boolean

hasInstantMessagingId

public boolean hasInstantMessagingId(Long uid)
This returns whether the supplied UID has a instant messaging id.

Parameters:
uid - Long
Returns:
boolean

hasCertificate

public boolean hasCertificate(Long uid,
                              CertificateType type)
This returns whether the supplied UID has a certificate of the supplied type.

Parameters:
uid - Long
type - CertificateType
Returns:
boolean

isConfidential

public boolean isConfidential(Long uid)
This returns whether the person's confidential flag is set.

Parameters:
uid - Long
Returns:
boolean

isDeceased

public boolean isDeceased(Long uid)
This returns whether the person's deceased flag is set.

Parameters:
uid - Long
Returns:
boolean

hasBirthdate

public boolean hasBirthdate(Long uid,
                            Calendar birthdate)
This returns whether the person has the supplied birthdate.

Parameters:
uid - Long
birthdate - Calendar
Returns:
boolean

isAccountShelved

public boolean isAccountShelved(Long uid)
                         throws ApplicationServerException
This returns whether the supplied person's account is shelved.

Parameters:
uid - Long
Returns:
boolean
Throws:
ApplicationServerException - if the method fails
FinderFailedException - if the UUPID is not unique

getPersonUidByPidm

public Long getPersonUidByPidm(String pidm)
Returns the Person uid for the supplied Banner PIDM.

Parameters:
pidm - String
Returns:
Long

getRelatedServices

public Set<Service> getRelatedServices(Long uid)
                                throws ApplicationException
Returns all the services associated with the supplied person.

Parameters:
uid - Long uid of the Person to be searched
Returns:
Set of related services
Throws:
ApplicationException - if the method fails

getRelatedGroups

public Set<Group> getRelatedGroups(Long uid)
                            throws ApplicationException
Returns all the groups associated with the supplied person.

Parameters:
uid - Long uid of the Person to be searched
Returns:
Set of related groups
Throws:
ApplicationException - if the method fails

getRelatedEntitlements

public Set<Entitlement> getRelatedEntitlements(Long uid)
                                        throws ApplicationException
Returns all the entitlements associated with the supplied person.

Parameters:
uid - Long uid of the Person to be searched
Returns:
Set of related entitlements
Throws:
ApplicationException - if the method fails

hasInstantMessagingId

public boolean hasInstantMessagingId(Long uid,
                                     String id)
This returns whether the supplied UID has the instant messaging id.

Parameters:
uid - Long
id - String
Returns:
boolean

hasLabeledUri

public boolean hasLabeledUri(Long uid,
                             String uri)
This returns whether the supplied UID has the labeled uri.

Parameters:
uid - Long
uri - String
Returns:
boolean

isPersonInRole

public boolean isPersonInRole(String pid,
                              Long uid,
                              RoleType role)
                       throws ApplicationServerException
This returns whether the person with the supplied uid is in the supplied role for the supplied owning person.

Parameters:
pid - String
uid - Long
role - RoleType
Returns:
boolean
Throws:
ApplicationServerException - if the method fails

hasPersonInRole

public boolean hasPersonInRole(String pid,
                               RoleType role)
                        throws ApplicationServerException
This returns whether the supplied person has any related person in the supplied role.

Parameters:
pid - String
role - RoleType
Returns:
boolean
Throws:
ApplicationServerException - if the method fails


Copyright © 2008 Virginia Tech. All Rights Reserved.