Examples of detachCopy()


Examples of javax.jdo.PersistenceManager.detachCopy()

    try {
      String query = "select from " + Config.class.getName();
      List<Config> configs = (List<Config>) pm.newQuery(query).execute();
      if (configs.size() > 0) {
        Config config = configs.get(0);
        return pm.detachCopy(config);
      }
    } catch (Exception e) {
      throw new IOException("Error loading config", e);
    } finally {
      try {
View Full Code Here

Examples of javax.jdo.PersistenceManager.detachCopy()

    } catch (JDOObjectNotFoundException e) {
      user = new SpadgerUser();
      user.id = id;
      user.email = id;
      user = pm.makePersistent(user);
      user = pm.detachCopy(user);
    } finally {
      tx.commit();
      pm.close();
    }
    return user;
View Full Code Here

Examples of javax.jdo.PersistenceManager.detachCopy()

   
    PersistenceManager pm = PMF.get().getPersistenceManager();

    try {
      result = pm.getObjectById(clazz, key);
      result = pm.detachCopy(result);
    }
    catch(JDOObjectNotFoundException exception)
    {
      // Ignore the object not existing
    } finally {
View Full Code Here

Examples of javax.jdo.PersistenceManager.detachCopy()

                tx.commit();

                return null;
            }

            Object object = pm.detachCopy( result.iterator().next() );

            tx.commit();

            return (Installation) object;
        }
View Full Code Here

Examples of javax.jdo.PersistenceManager.detachCopy()

                tx.commit();

                return null;
            }

            Object object = pm.detachCopy( result.iterator().next() );

            tx.commit();

            return (Project) object;
        }
View Full Code Here

Examples of javax.jdo.PersistenceManager.detachCopy()

                tx.commit();

                return null;
            }

            Object object = pm.detachCopy( result.iterator().next() );

            tx.commit();

            return (Project) object;
        }
View Full Code Here

Examples of javax.jdo.PersistenceManager.detachCopy()

            query.setUnique( true );

            BuildResult result = (BuildResult) query.execute( projectId );

            result = (BuildResult) pm.detachCopy( result );

            tx.commit();

            return result;
        }
View Full Code Here

Examples of javax.jdo.PersistenceManager.detachCopy()

  public static FallaLN getFallaLNbyId(Long id) {
    PersistenceManager pm = PMF.get().getPersistenceManager();
    FallaLN falla, detached = null;
    try {
      falla = pm.getObjectById(FallaLN.class, id);
      detached = pm.detachCopy(falla);
    } catch (Exception e) {
      log.error(e.getMessage());
    } finally {
      pm.close();
    }
View Full Code Here

Examples of javax.jdo.PersistenceManager.detachCopy()

      Key k1 = KeyFactory.createKey(UsuarioLN.class.getSimpleName(),
          idUsuario);
      Key k2 = KeyFactory.createKey(k1, ListaEventoLN.class
          .getSimpleName(), idListaEvento);
      evento = pm.getObjectById(ListaEventoLN.class, k2);
      detached = pm.detachCopy(evento);

    } catch (Exception e) {
      log.error(e.getMessage());
    } finally {
      pm.close();
View Full Code Here

Examples of javax.jdo.PersistenceManager.detachCopy()

  public static NegocioLN getNegocioLNbyId(Long id) {
    PersistenceManager pm = PMF.get().getPersistenceManager();
    NegocioLN negocio, detached = null;
    try {
      negocio = pm.getObjectById(NegocioLN.class, id);
      detached = pm.detachCopy(negocio);
    } catch (Exception e) {
      log.error(e.getMessage());
    } finally {
      pm.close();
    }
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.