Class DataManager


  • public class DataManager
    extends java.lang.Object
    Data Manager - supplementary class for MAPPER demonstration, this is rather a placeholder for some way to deal with the database.
    Author:
    Karl Eilebrecht
    • Constructor Summary

      Constructors 
      Constructor Description
      DataManager()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPerson​(Person person, Address address)
      utility method to fill "test database"
      Customer findCustomer​(Session session, java.lang.String customerId)
      Finds the customer according to the given id and adds it to session management
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addPerson

        public void addPerson​(Person person,
                              Address address)
        utility method to fill "test database"
        Parameters:
        person - instance of a person
        address - person's address
      • findCustomer

        public Customer findCustomer​(Session session,
                                     java.lang.String customerId)
        Finds the customer according to the given id and adds it to session management
        Parameters:
        session - persistence session
        customerId - identifier
        Returns:
        customer or null if not found