Class MySQLPerson

java.lang.Object
be.gaudry.bibliobrol.dao.mysql.MySQLPerson
All Implemented Interfaces:
IPersonDao

public class MySQLPerson extends Object implements IPersonDao
Since:
1.0 4 oct. 2008
Author:
Steph GAUDRY
  • Constructor Details

    • MySQLPerson

      public MySQLPerson(Connection dbConnection)
      Parameters:
      dbConnection -
  • Method Details

    • loadAsyncPersonsLos

      public void loadAsyncPersonsLos(AbstractBrolWorker<Integer> worker, ActorRole role)
      Specified by:
      loadAsyncPersonsLos in interface IPersonDao
      Parameters:
      worker - to allow loading the list asynchronous and sending each result in an Object[]
      role - role where the persons may be
    • loadAsyncPersonsLos

      public void loadAsyncPersonsLos(AbstractBrolWorker<Integer> worker, String lastName)
      Specified by:
      loadAsyncPersonsLos in interface IPersonDao
      Parameters:
      worker - to allow loading the list asynchronous and sending each result in an Object[]
      lastName - of the persons
    • loadPerson

      public Person loadPerson(int id)
      Specified by:
      loadPerson in interface IPersonDao
    • loadActorRoleCatalog

      public Map<Integer,​ActorRole> loadActorRoleCatalog()
      Specified by:
      loadActorRoleCatalog in interface IPersonDao
    • loadAsyncRoles

      public void loadAsyncRoles(AbstractBrolWorker<Integer> worker, int personId)
      Description copied from interface: IPersonDao
      Load roles for a person
      Specified by:
      loadAsyncRoles in interface IPersonDao
      Parameters:
      worker - to allow loading the list asynchronous and sending each result in an Object[]
      personId - ID of the person for whom we want to load the roles
    • getPicture

      public Image getPicture(int personId)
      TODO : load image from the DB. Create a new table person_picture(id,picture) for performances (we don't always need pictures)
      Specified by:
      getPicture in interface IPersonDao
      Returns:
      Picture of the person, or null if nothing found