Examples of Flota


Examples of es.emergya.bbdd.bean.Flota

      private static final long serialVersionUID = -6248274825732325056L;

      @Override
      protected void applyFilter() {
        flotas.setTableData(getAll(new Flota()));
      }
    };
  }
View Full Code Here

Examples of es.emergya.bbdd.bean.Flota

                      JOptionPane.YES_NO_CANCEL_OPTION);

              if (i == JOptionPane.YES_OPTION) {

                if (original == null) {
                  original = new Flota();
                }

                original.setInfoAdicional(textfieldPie
                    .getText());
                original.setNombre(textfieldCabecera.getText());
                original.setJuegoIconos(iconos
                    .getSelectedItem().toString());

                HashSet<Recurso> recursos = new HashSet<Recurso>();
                for (Object r : ((DefaultListModel) right
                    .getModel()).toArray()) {
                  if (r instanceof Recurso) {
                    recursos.add((Recurso) r);
                    ((Recurso) r).setFlotas(original);
                  }
                }
                original.setRecurso(recursos);

                FlotaAdmin.saveOrUpdate(original);

                PluginEventHandler.fireChange(AdminFleets.this);

                cambios = false;
                original = null;

                AdminFleets.this.flotas
                    .setTableData(getAll(new Flota()));

                closeFrame();
              } else if (i == JOptionPane.NO_OPTION) {
                closeFrame();
              }
View Full Code Here

Examples of es.emergya.bbdd.bean.Flota

            i18n.getString("admin.flotas.tabla.titulo.icono"),
            i18n.getString("admin.flotas.tabla.titulo.ficha"),
            i18n.getString("admin.flotas.tabla.titulo.eliminar") },
        new Object[][] { {}, allIcons.toArray() },
        getNoFiltrarAction(), getFiltrarAction());
    flotas.setTableData(getAll(new Flota()));
    flotas.setErrorCause(i18n.getString("Fleets.errorCause"));
    this.add(flotas);
  }
View Full Code Here

Examples of es.emergya.bbdd.bean.Flota

      private static final long serialVersionUID = -2649238620656143656L;

      @Override
      protected void applyFilter(JTable filters) {
        final Flota example = new Flota();
        Object valueAt = filters.getValueAt(0, 1);
        if (valueAt != null && valueAt.toString().trim().length() > 0) {
          example.setNombre(valueAt.toString());
        }
        valueAt = filters.getValueAt(0, 2);
        if (valueAt != null && valueAt.toString().trim().length() > 0) {
          example.setJuegoIconos(valueAt.toString());
        }
        flotas.setTableData(getAll(example));
      }
    };
  }
View Full Code Here

Examples of es.emergya.bbdd.bean.Flota

      removeRecursos(f);
      removeRoles(f);
      Session currentSession = getSession();
      currentSession.clear();

      Flota entity = null;

      if (f.getId() != null && this.get(f.getId()) != null)
        entity = (Flota) currentSession.merge(f);
      else
        entity = f;
View Full Code Here

Examples of es.emergya.bbdd.bean.Flota

  @Transactional(propagation = Propagation.REQUIRED, readOnly = true, rollbackFor = Throwable.class)
  public Flota find(Long id) {
    Session currentSession = getSession();
    currentSession.clear();
    final Flota uniqueResult = (Flota) currentSession.createCriteria(
        Flota.class).add(Restrictions.eq("id", id)).uniqueResult();
    if (uniqueResult != null) {
      uniqueResult.getJuegoIconos();
    }
    return uniqueResult;
  }
View Full Code Here

Examples of es.emergya.bbdd.bean.Flota

    return res;
  }

  @Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = true, rollbackFor = Throwable.class)
  public Flota find(String nombre) {
    Flota res = null;
    try {
      Session currentSession = getSession();
      currentSession.clear();
      res = (Flota) currentSession.createCriteria(Flota.class).add(
          Restrictions.eq("nombre", nombre)).setMaxResults(1)
View Full Code Here

Examples of es.emergya.bbdd.bean.Flota

    currentSession.saveOrUpdate(entity);

    if (entity != null && flotas != null) {
      for (Flota f : flotas) {
        try {
          Flota flota = (Flota) currentSession.get(Flota.class, f
              .getId());
          flota.getRoles().add(entity);
          entity.getFlotas().add(flota);
          currentSession.saveOrUpdate(flota);
        } catch (Throwable t) {
          log.error(t);
        }
View Full Code Here

Examples of es.emergya.bbdd.bean.Flota

        CriteriaSpecification.DISTINCT_ROOT_ENTITY).list();
  }

  public Set<Flota> getDisponibles(Rol r) {
    Set<Flota> res = new HashSet<Flota>();
    Flota f = new Flota();
    f.setHabilitada(true);
    res.addAll(FlotaConsultas.getByExample(f));
    try {
      res.removeAll(getAsigned(r));
    } catch (Throwable t1) {
      log.error(t1, t1);
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.