Class JpaBeID

java.lang.Object
be.gaudry.eid.dao.jpa.JpaBeID
All Implemented Interfaces:
IBeID

public class JpaBeID extends Object implements IBeID
Since:
1.0 Oct 29, 2010, 1.0
Version:
%I%, %G%
Author:
Steph GAUDRY
  • Field Details

    • em

      protected javax.persistence.EntityManager em
    • tx

      protected javax.persistence.EntityTransaction tx
  • Constructor Details

    • JpaBeID

      public JpaBeID()
  • Method Details

    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • save

      public void save(PersonExt person)
      Description copied from interface: IBeID
      Saves a person without checking if this person already exists into the persistence
      Specified by:
      save in interface IBeID
      Parameters:
      person - PersonExt to save
    • saveIfNotExists

      public Collection<Person> saveIfNotExists(PersonExt person)
      Description copied from interface: IBeID
      Saves a person if this person doesn't exist into the persistence. If persons matching this argument exist into the persistence, these persons are returned.
      Specified by:
      saveIfNotExists in interface IBeID
      Parameters:
      person - PersonExt to save
      Returns:
      Collection of matching persons, or null if no matches and person saved
    • loadPerson

      public PersonExt loadPerson(int id)
      Specified by:
      loadPerson in interface IBeID
    • loadPerson

      public PersonExt loadPerson(String firstName, String lastName)
      Specified by:
      loadPerson in interface IBeID