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

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

public final class RegistryFinder
extends CommonRegistryFinder

RegistryFinder provides methods for doing registry searches with entity beans.

Version:
$Revision: 7709 $
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
 boolean addressExists(Long addrSeqno)
          This returns whether the address with the supplied sequence number exists.
 boolean addressExists(Long uid, AddressType addressType)
          This returns whether an address with the supplied type exists for the supplied uid.
 boolean countryExists(Country country)
          This returns whether the supplied country exists.
 boolean exactAddressExists(Address addr)
          This returns whether the exact address exists for the supplied seqno.
 boolean exactPhoneNumberExists(PhoneNumber pn)
          This returns whether the exact phone number exists for the supplied seqno.
 Address getAddress(Long addrSeqno)
          This returns the Address for the corresponding address sequence number.
 Long getAddressUid(Long addrSeqno)
          This returns the UID for a person with the corresponding address sequence number.
 Long getAddressUidByPersonUidAndType(Long uid, AddressType addrType)
          This returns the address sequence number for the supplied person uid and address type.
 PhoneNumber getPhoneNumber(Long phoneSeqno)
          This returns the PhoneNumber for the corresponding phone sequence number.
 Long getPhoneUid(Long phoneSeqno)
          This returns the UID for a person with the corresponding phone sequence number.
 Long getPhoneUidByPersonUidAndType(Long uid, PhoneNumberType phoneType)
          This returns the phone sequence number for the supplied person uid and phone type.
 boolean phoneNumberExists(Long phoneSeqno)
          This returns whether the phone number with the supplied sequence number exists.
 boolean phoneNumberExists(Long uid, Long addrSeqno, PhoneNumberType phoneType)
          This returns whether a phone number with the supplied type exists for the supplied uid.
 boolean stateProvExists(StateProv stateprov)
          This returns whether the supplied stateprov exists.
 
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

addressExists

public boolean addressExists(Long addrSeqno)
This returns whether the address with the supplied sequence number exists.

Parameters:
addrSeqno - Long
Returns:
boolean

addressExists

public boolean addressExists(Long uid,
                             AddressType addressType)
This returns whether an address with the supplied type exists for the supplied uid.

Parameters:
uid - Long
addressType - AddressType
Returns:
boolean

phoneNumberExists

public boolean phoneNumberExists(Long phoneSeqno)
This returns whether the phone number with the supplied sequence number exists.

Parameters:
phoneSeqno - Long
Returns:
boolean

phoneNumberExists

public boolean phoneNumberExists(Long uid,
                                 Long addrSeqno,
                                 PhoneNumberType phoneType)
This returns whether a phone number with the supplied type exists for the supplied uid.

Parameters:
uid - Long
addrSeqno - Long
phoneType - PhoneNumberType
Returns:
boolean

exactPhoneNumberExists

public boolean exactPhoneNumberExists(PhoneNumber pn)
This returns whether the exact phone number exists for the supplied seqno.

Parameters:
pn - PhoneNumber
Returns:
boolean

exactAddressExists

public boolean exactAddressExists(Address addr)
This returns whether the exact address exists for the supplied seqno.

Parameters:
addr - Address
Returns:
boolean

getAddressUid

public Long getAddressUid(Long addrSeqno)
This returns the UID for a person with the corresponding address sequence number.

Parameters:
addrSeqno - Long
Returns:
Long

getPhoneUid

public Long getPhoneUid(Long phoneSeqno)
This returns the UID for a person with the corresponding phone sequence number.

Parameters:
phoneSeqno - Long
Returns:
Long

stateProvExists

public boolean stateProvExists(StateProv stateprov)
This returns whether the supplied stateprov exists.

Parameters:
stateprov - StateProv
Returns:
boolean

countryExists

public boolean countryExists(Country country)
This returns whether the supplied country exists.

Parameters:
country - Country
Returns:
boolean

getAddressUidByPersonUidAndType

public Long getAddressUidByPersonUidAndType(Long uid,
                                            AddressType addrType)
This returns the address sequence number for the supplied person uid and address type.

Parameters:
uid - Long the person's uid
addrType - AddressType
Returns:
Long

getPhoneUidByPersonUidAndType

public Long getPhoneUidByPersonUidAndType(Long uid,
                                          PhoneNumberType phoneType)
This returns the phone sequence number for the supplied person uid and phone type.

Parameters:
uid - Long the person's uid
phoneType - PhoneType
Returns:
Long

getAddress

public Address getAddress(Long addrSeqno)
                   throws NoResultFoundException
This returns the Address for the corresponding address sequence number.

Parameters:
addrSeqno - Long
Returns:
Long
Throws:
NoResultFoundException - if Address cannot be found

getPhoneNumber

public PhoneNumber getPhoneNumber(Long phoneSeqno)
                           throws NoResultFoundException
This returns the PhoneNumber for the corresponding phone sequence number.

Parameters:
phoneSeqno - Long
Returns:
Long
Throws:
NoResultFoundException - if PhoneNumber cannot be found


Copyright © 2008 Virginia Tech. All Rights Reserved.