Beispiel #1
0
  public static void actualizarPintor(
      String pId,
      String pNombre,
      String pNombreArtistico,
      String pCiudadNacimiento,
      String pPaisNacimiento,
      String pFechaNacimiento,
      String pFechaMuerte,
      String pTipo,
      int pIdEscuela)
      throws Exception {

    Pintor pintor = DAOPintor.buscar(pId);

    pintor.setNombre(pNombre);
    pintor.setNombreArtistico(pNombreArtistico);
    pintor.setNacionalidad(pPaisNacimiento);
    pintor.setCiudadNacimiento(pCiudadNacimiento);
    pintor.setFechaNacimiento(pFechaNacimiento);
    pintor.setFechaMuerte(pFechaMuerte);
    pintor.setTipo(pTipo);
    pintor.setEscuela(DAOEscuela.buscar(pIdEscuela));

    DAOPintor.actualizar(pintor);
  }
Beispiel #2
0
  public static void agregarMaestro(String pIdPintor, String pidMaestro) throws Exception {

    Pintor pintor = DAOPintor.buscar(pIdPintor);
    Pintor maestro = DAOPintor.buscar(pidMaestro);
    pintor.setMaestro(maestro);
    DAOPintor.actualizar(pintor);
  }
Beispiel #3
0
 /////////////////////////
 /////// Pintura  /////////
 /////////////////////////
 public static void crearPintura(
     String pCodigo,
     String pNombre,
     String pidPintor,
     String pDimensiones,
     String pFechaCreacion,
     String pTiempoTardado,
     String pTecnicaCreacion,
     int pCondicionActual,
     int pFamosa,
     String pIdPintor)
     throws Exception {
   Pintor pintor = DAOPintor.buscar(pIdPintor);
   if (pintor != null) {
     DAOPintura.crear(
         (new Pintura(
             pCodigo,
             pNombre,
             pDimensiones,
             pFechaCreacion,
             pTiempoTardado,
             pTecnicaCreacion,
             pCondicionActual,
             pFamosa,
             pintor)));
   } else {
     throw new Exception("El pintor no existe");
   }
 }
Beispiel #4
0
  public static void actualizarMecenazgo(
      String pIdMecenas, String pIdPintor, String pFechaInicio, String pFechaFin) throws Exception {

    DAOMecenazgo.actualizar(
        new Mecenazgo(
            pFechaInicio,
            pFechaFin,
            (DAOPintor.buscar(pIdPintor)),
            (DAOMecenas.buscar(pIdMecenas))));
  }
Beispiel #5
0
  /////////////////////////
  /////// Pintor  /////////
  /////////////////////////
  public static void crearPintor(
      String pId,
      String pNombre,
      String pNombreArtistico,
      String pCiudadNacimiento,
      String pPaisNacimiento,
      String pFechaNacimiento,
      String pFechaMuerte,
      String pTipo)
      throws Exception {

    DAOPintor.crear(
        (new Pintor(
            pId,
            pNombre,
            pNombreArtistico,
            pCiudadNacimiento,
            pPaisNacimiento,
            pFechaNacimiento,
            pFechaMuerte,
            pTipo)));
  }
Beispiel #6
0
  public static Pintor consultarPintor(String pId) throws Exception {

    Pintor pintor = DAOPintor.buscar(pId);
    return pintor;
  }
Beispiel #7
0
  public static void borrarMecenazgo(String pIdMecenas, String pIdPintor)
      throws java.sql.SQLException, Exception {

    DAOMecenazgo.borrar(
        new Mecenazgo((DAOPintor.buscar(pIdPintor)), (DAOMecenas.buscar(pIdMecenas))));
  }
Beispiel #8
0
  public static void borrarPintor(String pId) throws java.sql.SQLException, Exception {

    DAOPintor.borrar(DAOPintor.buscar(pId));
  }