edu.uoc.tfc.exuoc.controladors
Class GestorContenidors

java.lang.Object
  extended by edu.uoc.tfc.exuoc.controladors.GestorContenidors
All Implemented Interfaces:
InterfaceGestor

public class GestorContenidors
extends java.lang.Object
implements InterfaceGestor


Method Summary
 java.lang.Long afegir(Contenidor nou)
           
 java.lang.Long eliminarContenidor(Contenidor contenidor)
           
 void evict(java.lang.Object o)
           
static GestorContenidors getInstance()
           
 GestorLogs getLog()
           
 Contenidor llegir(java.lang.Long id)
           
 Contenidor llegirContenidor(java.lang.Class classe, java.lang.Long id)
           
 Contenidor llegirContenidor(java.lang.Long id)
           
 Contenidor llegirContenidor(java.lang.String nom)
           
 java.util.Iterator<Contenidor> llistat()
           
 java.util.Iterator<Contenidor> llistat(int ini, int fi)
           
 java.util.Iterator<Contenidor> llistat(java.lang.String camp, java.lang.String valor, int ini, int fi)
           
 java.util.Iterator<Contenidor> llistatContenidors()
           
 java.util.Iterator<Contenidor> llistatContenidors(int ini, int fi)
           
 java.util.Iterator<Contenidor> llistatContenidors(java.lang.String ordre, int quants)
           
static void main(java.lang.String[] args)
          MAIN
 Contenidor modificar(Contenidor actual)
           
 int num()
          Augmenta el nombre de contenidors en "augment" valor
 int num(java.lang.String nom)
           
 int numContenidors()
           
 int numContenidors(java.lang.Integer augment)
           
 void openGestor()
           
 void persist(java.lang.Object o)
           
 void setLog(GestorLogs log)
           
 void tancar()
           
 void treureItem(java.lang.Long idItem, java.lang.Long idContenidor)
          Elimina un ítems d'un contenidor donat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static GestorContenidors getInstance()

openGestor

public void openGestor()
Specified by:
openGestor in interface InterfaceGestor

tancar

public void tancar()
Specified by:
tancar in interface InterfaceGestor

getLog

public GestorLogs getLog()
Specified by:
getLog in interface InterfaceGestor

setLog

public void setLog(GestorLogs log)
Specified by:
setLog in interface InterfaceGestor

evict

public void evict(java.lang.Object o)

persist

public void persist(java.lang.Object o)

afegir

public java.lang.Long afegir(Contenidor nou)
                      throws AfegirDAOException
Throws:
AfegirDAOException

eliminarContenidor

public java.lang.Long eliminarContenidor(Contenidor contenidor)
                                  throws EliDAOException
Throws:
EliDAOException

treureItem

public void treureItem(java.lang.Long idItem,
                       java.lang.Long idContenidor)
                throws org.hibernate.HibernateException,
                       BuitException,
                       EliDAOException
Elimina un ítems d'un contenidor donat

Parameters:
item, - element a eliminat
contenidor, - d'on serà eliminat
Throws:
org.hibernate.HibernateException
BuitException
EliDAOException

modificar

public Contenidor modificar(Contenidor actual)
                     throws ModDAOException
Throws:
ModDAOException

llegir

public Contenidor llegir(java.lang.Long id)
                  throws LlegirDAOException
Throws:
LlegirDAOException

llegirContenidor

public Contenidor llegirContenidor(java.lang.Long id)
                            throws LlegirDAOException
Throws:
LlegirDAOException

llegirContenidor

public Contenidor llegirContenidor(java.lang.Class classe,
                                   java.lang.Long id)
                            throws LlegirDAOException
Throws:
LlegirDAOException

llegirContenidor

public Contenidor llegirContenidor(java.lang.String nom)
                            throws LlegirDAOException
Throws:
LlegirDAOException

llistat

public java.util.Iterator<Contenidor> llistat()
                                       throws LlistatDAOException
Specified by:
llistat in interface InterfaceGestor
Throws:
LlistatDAOException

llistat

public java.util.Iterator<Contenidor> llistat(int ini,
                                              int fi)
                                       throws LlistatDAOException
Specified by:
llistat in interface InterfaceGestor
Throws:
LlistatDAOException

llistat

public java.util.Iterator<Contenidor> llistat(java.lang.String camp,
                                              java.lang.String valor,
                                              int ini,
                                              int fi)
                                       throws LlistatDAOException
Specified by:
llistat in interface InterfaceGestor
Throws:
LlistatDAOException

llistatContenidors

public java.util.Iterator<Contenidor> llistatContenidors()
                                                  throws LlistatDAOException
Throws:
LlistatDAOException

llistatContenidors

public java.util.Iterator<Contenidor> llistatContenidors(int ini,
                                                         int fi)
                                                  throws LlistatDAOException
Throws:
LlistatDAOException

llistatContenidors

public java.util.Iterator<Contenidor> llistatContenidors(java.lang.String ordre,
                                                         int quants)
                                                  throws LlistatDAOException
Throws:
LlistatDAOException

numContenidors

public int numContenidors()
                   throws org.hibernate.HibernateException,
                          BuitException
Returns:
Nombre de contenidors del sistema
Throws:
org.hibernate.HibernateException
BuitException

num

public int num()
        throws org.hibernate.HibernateException,
               BuitException
Augmenta el nombre de contenidors en "augment" valor

Specified by:
num in interface InterfaceGestor
Parameters:
augment -
Returns:
Throws:
org.hibernate.HibernateException
BuitException

num

public int num(java.lang.String nom)
        throws org.hibernate.HibernateException,
               BuitException
Specified by:
num in interface InterfaceGestor
Parameters:
nom -
Returns:
Retorna els nombre de contenidors que s'assemblen a nom
Throws:
org.hibernate.HibernateException
BuitException

numContenidors

public int numContenidors(java.lang.Integer augment)
                   throws org.hibernate.HibernateException,
                          BuitException
Throws:
org.hibernate.HibernateException
BuitException

main

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