Package modelo

Examples of modelo.Pelicula


       
        try {
            List<Pelicula> results = (List<Pelicula>) q.execute(input.getTitulo(), input.getAnio());
            if (results.isEmpty()) {

              Pelicula pel = new Pelicula(input.getTitulo(), input.getTitulo_esp(), input.getAnio());   

              try {
                List<Key> actores = new ArrayList<Key>();
                List<Persona> resultsPers = (List<Persona>) qPers.execute();
                for (Persona e : resultsPers) {
                  if (input.getNombre_director().contains(e.getApellido()+", "+e.getNombre()))
                    pel.setDirector(e.getKey());
                  if (input.getActores().contains(e.getApellido()+", "+e.getNombre()))
                    actores.add(e.getKey());
                }
                pel.setActores(actores);
                List<Productora> resultsProd = (List<Productora>) qProd.execute(input.getNombre_productora());
                for (Productora e : resultsProd) {
                     //pel.setProductora1(e.getKey());
                     pel.setProductora(e);
                     e.agregarPelicula(pel);
                }
                List<Clasificacion> resultsClas = (List<Clasificacion>) qClas.execute(input.getDetalle_clasificacion());
                for (Clasificacion e : resultsClas) {
                     //pel.setClasificacion(e.getKey());
                     pel.setClasificacion(e.getKey());
                     //e.getPeliculaSets().add(pel);                    
                }
                     try {
                           pm.makePersistent(pel);
                       } finally {
View Full Code Here

TOP

Related Classes of modelo.Pelicula

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.