edu.uoc.tfc.exuoc.controladors
Class ContenidorsDAO

java.lang.Object
  extended by edu.uoc.tfc.exuoc.controladors.ContenidorsDAO

public class ContenidorsDAO
extends java.lang.Object

Classe que gestionarà la persistència mitjançant la classe GestorBDD (genèrica)


Constructor Summary
protected ContenidorsDAO()
           
 
Method Summary
 java.lang.Long afegirContenidor(Contenidor contenidor)
           
 Contenidor consultaContenidor(java.lang.Class classe, java.lang.Long id)
           
 Contenidor consultaContenidor(java.lang.Long id)
           
 Contenidor consultaContenidor(java.lang.String nom)
           
 void eliminarContenidor(Contenidor contenidor)
           
protected  void evict(java.lang.Object o)
           
 java.util.Iterator<Contenidor> llista()
           
 java.util.Iterator<Contenidor> llista(int ini, int fi)
           
 java.util.Iterator<Contenidor> llista(java.lang.String ordre, int quants)
           
protected  java.util.Iterator<Contenidor> llista(java.lang.String camp, java.lang.String cmp, java.lang.Object nom, int ini, int fi)
           
static void main(java.lang.String[] args)
           
 void modificarContenidor(Contenidor contenidor)
           
protected  void persist(java.lang.Object o)
           
 int quantsContenidors()
           
 int quantsContenidors(java.lang.String camp, java.lang.String comparacio, java.lang.String nomCercat)
           
 void tancarConnexio()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContenidorsDAO

protected ContenidorsDAO()
Method Detail

tancarConnexio

public void tancarConnexio()
                    throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

evict

protected void evict(java.lang.Object o)

persist

protected void persist(java.lang.Object o)

afegirContenidor

public java.lang.Long afegirContenidor(Contenidor contenidor)
                                throws org.hibernate.HibernateException,
                                       BuitException
Throws:
org.hibernate.HibernateException
BuitException

eliminarContenidor

public void eliminarContenidor(Contenidor contenidor)
                        throws org.hibernate.HibernateException,
                               BuitException
Throws:
org.hibernate.HibernateException
BuitException

modificarContenidor

public void modificarContenidor(Contenidor contenidor)
                         throws org.hibernate.HibernateException,
                                BuitException
Throws:
org.hibernate.HibernateException
BuitException

consultaContenidor

public Contenidor consultaContenidor(java.lang.Long id)
                              throws org.hibernate.HibernateException,
                                     BuitException
Throws:
org.hibernate.HibernateException
BuitException

consultaContenidor

public Contenidor consultaContenidor(java.lang.String nom)
                              throws org.hibernate.HibernateException,
                                     BuitException
Throws:
org.hibernate.HibernateException
BuitException

consultaContenidor

public Contenidor consultaContenidor(java.lang.Class classe,
                                     java.lang.Long id)
                              throws org.hibernate.HibernateException,
                                     BuitException
Throws:
org.hibernate.HibernateException
BuitException

llista

public java.util.Iterator<Contenidor> llista()
                                      throws org.hibernate.HibernateException,
                                             BuitException
Throws:
org.hibernate.HibernateException
BuitException

llista

public java.util.Iterator<Contenidor> llista(int ini,
                                             int fi)
                                      throws org.hibernate.HibernateException,
                                             BuitException
Throws:
org.hibernate.HibernateException
BuitException

llista

public java.util.Iterator<Contenidor> llista(java.lang.String ordre,
                                             int quants)
                                      throws org.hibernate.HibernateException,
                                             BuitException
Throws:
org.hibernate.HibernateException
BuitException

llista

protected java.util.Iterator<Contenidor> llista(java.lang.String camp,
                                                java.lang.String cmp,
                                                java.lang.Object nom,
                                                int ini,
                                                int fi)
                                         throws org.hibernate.HibernateException,
                                                BuitException
Throws:
org.hibernate.HibernateException
BuitException

quantsContenidors

public int quantsContenidors()
                      throws org.hibernate.HibernateException,
                             BuitException
Throws:
org.hibernate.HibernateException
BuitException

quantsContenidors

public int quantsContenidors(java.lang.String camp,
                             java.lang.String comparacio,
                             java.lang.String nomCercat)
                      throws org.hibernate.HibernateException,
                             BuitException
Parameters:
nomCercat -
Returns:
El nombre d'entitats que cumpleixen la condició
Throws:
org.hibernate.HibernateException
BuitException

main

public static void main(java.lang.String[] args)