edu.uoc.pfc.social.db
Class EntityDAO

java.lang.Object
  extended by edu.uoc.pfc.social.db.EntityDAO
Direct Known Subclasses:
ContactsDAO, UsersDAO

public class EntityDAO
extends Object

Classe encarregada de implementar les funcionalitats genèriques de tots els DAO.

Author:
Rubén Salvador Gareta

Constructor Summary
EntityDAO(Connection conn)
          Mètode constructor.
 
Method Summary
protected  void closePreparedStatement(PreparedStatement ps)
          Mètode privat encarregat de tancar un PreparedStatement.
protected  void closeResultSet(ResultSet rs)
          Mètode privat encarregat de tancar un ResultSet.
protected  Connection getConn()
          Mètode utilitat per accedir a la connexió
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityDAO

public EntityDAO(Connection conn)
Mètode constructor.

Parameters:
conn - Connexió amb la base de dades
Method Detail

getConn

protected Connection getConn()
Mètode utilitat per accedir a la connexió

Returns:
Connexió a la base de dades.

closePreparedStatement

protected void closePreparedStatement(PreparedStatement ps)
                               throws DatabaseException
Mètode privat encarregat de tancar un PreparedStatement.

Throws:
DatabaseException

closeResultSet

protected void closeResultSet(ResultSet rs)
                       throws DatabaseException
Mètode privat encarregat de tancar un ResultSet.

Throws:
DatabaseException