Package javax.jdo

Examples of javax.jdo.PersistenceManager.makePersistent()


      if (solucion == null) {
        SolucionLN solu = new SolucionLN(fecha_compromiso,
            fecha_solucion, comentario);
        evento.setSolucion(solu);

        pm.makePersistent(evento);
      } else {
        solucion.setComentario(comentario);
        solucion.setFechaCompromiso(fecha_compromiso);
        solucion.setFechaSolucion(fecha_solucion);
      }
View Full Code Here


  public static void insertar(NegocioLN negocio) {

    PersistenceManager pm = PMF.get().getPersistenceManager();
    try {
      pm.makePersistent(negocio);
    } catch (Exception e) {
      log.error(e.getMessage());
    } finally {
      pm.close();
    }
View Full Code Here

      try {
        if(correo!=null)
          usuario=new UsuarioLN(nombres,apepa,apema,email,perfil,cargo,idNegocio,new Boolean(true));
        else
          usuario=new UsuarioLN(nombres,apepa,apema,email,perfil,cargo,idNegocio,new Boolean(false));         
        pm.makePersistent(usuario);
      } catch (Exception e) {
        log.error(e.getMessage());
      } finally {
          pm.close();
      }     
View Full Code Here

        
         negocio.setEquipos(lst);
        tx = pm.currentTransaction();
          tx.begin();

        pm.makePersistent(negocio);
       
        tx.commit();
      } catch (Exception e) {
        log.error("insertar " + e.getMessage());
      } finally {
View Full Code Here

    PersistenceManager pm = PMF.get().getPersistenceManager();
    try {
      tx = pm.currentTransaction();
      tx.begin();
      pm.makePersistent(usuario);
      pm.makePersistent(novedad);
      Long idNovedad=novedad.getKey().getId();
      tx.commit();

      Map<String, Object> pars = new HashMap<String, Object>();     
View Full Code Here

    PersistenceManager pm = PMF.get().getPersistenceManager();
    try {
      tx = pm.currentTransaction();
      tx.begin();
      pm.makePersistent(usuario);
      pm.makePersistent(novedad);
      Long idNovedad=novedad.getKey().getId();
      tx.commit();

      Map<String, Object> pars = new HashMap<String, Object>();     
      String queryStr = "idUsuario == :usr && idNovedad==:nov";
View Full Code Here

    Transaction tx = null;
    PersistenceManager pm = PMF.get().getPersistenceManager();
    try {
      tx = pm.currentTransaction();
      tx.begin();
      pm.makePersistent(imagenln);
      tx.commit();
    } catch (Exception e) {
      log.error(e.getMessage());
    } finally {
      if (tx.isActive()) {
View Full Code Here

   */
  public static void insertar(TipoLN itemlvs) {
    //log.info("persistencia guardando item " + itemlvs.getDescripcion());
      PersistenceManager pm = PMF.get().getPersistenceManager();
      try {
        pm.makePersistent(itemlvs);
      } catch (Exception e) {
        log.error(e.getMessage());
      } finally {
          pm.close();
      }     
View Full Code Here

        PersistenceManager pm = persistenceManagerFactory.getPersistenceManager();
        pm.getFetchPlan().setMaxFetchDepth(-1);
        Object id = null;
        try {
            pm.currentTransaction().begin();
            pm.makePersistent(object);
            id = JDOHelper.getObjectId(object);
            pm.currentTransaction().commit();
        } finally {
            if (pm.currentTransaction().isActive()) {
                LOGGER.error("db-commit-failure");
View Full Code Here

                   (DefaultParameters) configParams,
                   (DefaultParameterNames) names);
                result.computeDBHash();
                result.setExternalID(ExternalIDGenerator.getNextID());
                result.setTimeToLive(initialTimeToLive);
                pm.makePersistent(result);
            } else {
                if (LOGGER.isDebugEnabled()) {
                    LOGGER.debug("updating last access time");
                }
                // update the last access time (and update any ttl)
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.