Package org.openbp.server.persistence

Examples of org.openbp.server.persistence.PersistenceContext.saveObject()


    Object object = hc.getParam(PARAM_OBJECT);

    if (object != null)
    {
      PersistenceContext pc = hc.getEngine().getPersistenceContextProvider().obtainPersistenceContext();
      pc.saveObject(object);
    }

    hc.setResult(PARAM_OBJECT, object);

    return true;
View Full Code Here


    {
      DbModel dbModel = (DbModel) pc.createEntity(DbModel.class);

      modelToDbModel(model, dbModel);

      pc.saveObject(dbModel);
    }
    catch (PersistenceException e)
    {
      tg.doCatch();
      throw new ModelException("DatabaseOperation", "Error saving descriptor of model '" + model.getQualifier() + "' to the database: "
View Full Code Here

    {
      DbModel dbModel = findDbModel(pc, model.getName());

      modelToDbModel(model, dbModel);

      pc.saveObject(dbModel);
    }
    catch (PersistenceException e)
    {
      tg.doCatch();
      throw new ModelException("DatabaseOperation", "Error saving descriptor of model '" + model.getQualifier() + "' to the database: "
View Full Code Here

    {
      DbModelItem dbModelItem = (DbModelItem) pc.createEntity(DbModelItem.class);

      itemToDbModelItem(item, dbModelItem);

      pc.saveObject(dbModelItem);
    }
    catch (PersistenceException e)
    {
      tg.doCatch();
      throw new ModelException("DatabaseOperation", "Error saving descriptor of component '" + item.getQualifier() + "' to the database: "
View Full Code Here

    {
      DbModelItem dbModelItem = findDbModelItem(pc, item);

      itemToDbModelItem(item, dbModelItem);

      pc.saveObject(dbModelItem);
    }
    catch (PersistenceException e)
    {
      tg.doCatch();
      throw new ModelException("DatabaseOperation", "Error saving descriptor of component '" + item.getQualifier() + "' to the database: "
View Full Code Here

        {
          // Get the id of the object
          Object id = pc.getObjectId(ret);
          if (isNullId(id))
          {
            pc.saveObject(ret);
            id = pc.getObjectId(ret);

            // Object is new, may require a flush
            if (isNullId(id))
            {
View Full Code Here

    PersistedComplexParam ret = (PersistedComplexParam) pc.createEntity(CayennePersistedComplexParam.class);

    ret.setTitle("Workflow task test 1");

    pc.saveObject(ret);
    pc.commitTransaction();

    return ret;
  }
}
View Full Code Here

    PersistedComplexParam ret = (PersistedComplexParam) pc.createEntity(CayennePersistedComplexParam.class);

    ret.setTitle("Workflow task test 1");

    pc.saveObject(ret);
    pc.commitTransaction();

    return ret;
  }
}
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.