Examples of Anuncio


Examples of org.inguelberth.beans.Anuncio

            System.out.println("Genero no existente");
        }
        ManejadorPelicula.getInstancia().agregarPelicula(peliculaAgregar);
      break;
      case "add advert":
        Anuncio anuncioAgregar=new Anuncio();
        anuncioAgregar.setNombre(objeto.get("nombre"));
        anuncioAgregar.setSegundos(Integer.parseInt(objeto.get("segundos")));
        anuncioAgregar.setPatrocinador(objeto.get("patrocinador"));
       
        String down=objeto.get("down");

        String arbol[] = down.split(",");
       
        Pelicula pelicula = ManejadorPelicula.getInstancia().buscarPelicula(arbol[0]);

        if(arbol.length==1)
          pelicula.getListaAnuncio().add(anuncioAgregar);
        else{
          Anuncio anuncioR =ManejadorPelicula.getInstancia().buscarDentroDePeli(pelicula, arbol[1]);
         
          for(int posicion=2;posicion<arbol.length;posicion++){
            anuncioR = ManejadorPelicula.getInstancia().buscarDentroDeCorto(anuncioR, arbol[posicion]);
            System.out.print("  ->"+anuncioR.getNombre()+" ");
          }
          System.out.println("ANUNCIO AGREGADO A "+arbol[arbol.length-1]+" tamanio "+arbol.length);
          anuncioR.getListaAnuncio().add(anuncioAgregar);
        }
        System.out.println("Se a agregado un anuncio satisfactoriamente. :-)")
       
      break;
      default:
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.