Class PersonDataConnector

  • Direct Known Subclasses:
    RwPersonDataConnector

    public class PersonDataConnector
    extends java.lang.Object
    Person Data Connector - this is the service abstraction (root of a hierarchy) where we have "bridged-out" a parallel hierarchy implementing core functionality.
    This shows the BRIDGE-pattern.
    Author:
    Karl Eilebrecht
    • Constructor Detail

      • PersonDataConnector

        public PersonDataConnector​(PersonDataConnectorImp personDataConnectorImp)
        Creates new PersonDataConnector using the given PersonDataConnectorImp
        Parameters:
        personDataConnectorImp - implementation
    • Method Detail

      • findPersonById

        public Person findPersonById​(java.lang.String personId)
        Finds the person by id
        Parameters:
        personId - identifier
        Returns:
        person or null
      • findAddressById

        public Address findAddressById​(java.lang.String addressId)
        Returns the address for the given id
        Parameters:
        addressId - address identifier
        Returns:
        address id or null
      • findAddressOfPersonById

        public Address findAddressOfPersonById​(java.lang.String personId)
        Returns the address of the specified person
        Parameters:
        personId - identifier
        Returns:
        address or null
      • findPersonForAddressById

        public Person findPersonForAddressById​(java.lang.String addressId)
        Finds the corresponding person for the given address
        Parameters:
        addressId - address identifier
        Returns:
        person or null
      • findXyPersonById

        public XyPerson findXyPersonById​(java.lang.String personId)
        Returns XY-person (including address) for given id
        Parameters:
        personId - identifier
        Returns:
        XY-person or null
      • checkPersonExistsById

        public boolean checkPersonExistsById​(java.lang.String personId)
        Checks whether the given person exists
        Parameters:
        personId - identifier
        Returns:
        true if person exists, otherwise false