Package commonj.sdo

Examples of commonj.sdo.ChangeSummary$Setting


          {
            return result;
          }
          else
          {
            ChangeSummary eChangeSummary = eDataGraph.getEChangeSummary();
            if (eChangeSummary != null)
            {
              result = ((EObject)eDataGraph.getChangeSummary()).eResource().getEObject(id);
              if (result != null)
              {
View Full Code Here


          if (xmlnsPrefixMapFeature != null)
          {
            EMap xmlnsPrefixMap = (EMap)eRootObject.eGet(xmlnsPrefixMapFeature);
            helper.setPrefixToNamespaceMap(xmlnsPrefixMap);
          }
          ChangeSummary changeSummary = eDataGraph.getEChangeSummary();

          if (changeSummary != null)
          {
            helper.setMustHavePrefix(true);
            if (changeSummary.isLogging())
            {
              ((ChangeSummaryImpl)changeSummary).summarize();
              writeTopObject((EObject)changeSummary);
            }
            else
View Full Code Here

              {
                eDataGraph = (DataGraphImpl)objects.peek();
                eDataGraph.getResourceSet();
                if ("".equals(prefix) && "changeSummary".equals(name))
                {
                  ChangeSummary eChangeSummary = (ChangeSummary)createObjectFromFactory(SDOFactory.eINSTANCE, "EChangeSummary");
                  eDataGraph.setEChangeSummary(eChangeSummary);
                  processObject((EObject)eChangeSummary);
                }
                else if ("".equals(prefix) && "models".equals(name))
                {
View Full Code Here

  }

  public DataObject merge(DataObject primary, DataObject secondary) {
    addGraphToRegistry(primary);

    ChangeSummary summary =  primary
        .getDataGraph().getChangeSummary();
    summary.endLogging();
    Iterator i = secondary.getType().getProperties().iterator();

    while (i.hasNext()) {
      Property p = (Property) i.next();
View Full Code Here

  public ChangeSummarizer() {
    // Empty Constructor
  }

  public Changes loadChanges(DataObject root) {
    ChangeSummary changeSummary = root.getDataGraph().getChangeSummary();
    if (changeSummary.isLogging())
      ((ChangeSummaryImpl) changeSummary).summarize();

    List changedObjects = changeSummary.getChangedDataObjects();
    DebugUtil.debugln(getClass(), debug,
        "List of changed objects contains " + changedObjects.size()
            + " object(s)");

    changes.setInsertOrder(mapping.getInsertOrder());
View Full Code Here

        DataGraph g = SDOUtil.createDataGraph();

        // Create the root object
        g.createRootObject(gbmd.getSchema());

        ChangeSummary summary = g.getChangeSummary();

        ResultSetProcessor rsp = new ResultSetProcessor(g.getRootObject(), gbmd);
        rsp.processResults(getStartRow(), getEndRow());

        summary.beginLogging();

        return g.getRootObject();
    }
View Full Code Here

        DataGraph dataGraph = SDOUtil.createDataGraph();
        DataObject quote = dataGraph.createRootObject("http://www.example.com/simple", "Quote");

        // Begin logging changes
        //
        ChangeSummary changeSummary = dataGraph.getChangeSummary();
        changeSummary.beginLogging();

        // Modify the data graph in various fun and interesting ways
        //
        quote.setString("symbol", "fbnt");
        quote.setString("companyName", "FlyByNightTechnology");
        quote.setBigDecimal("price", new BigDecimal("1000.0"));
        quote.setBigDecimal("open1", new BigDecimal("1000.0"));
        quote.setBigDecimal("high", new BigDecimal("1000.0"));
        quote.setBigDecimal("low", new BigDecimal("1000.0"));
        quote.setDouble("volume", 1000);
        quote.setDouble("change1", 1000);

        DataObject child = quote.createDataObject("quotes");
        child.setBigDecimal("price", new BigDecimal("2000.0"));

        // Stop logging changes and print the resulting data graph to stdout
        //
        changeSummary.endLogging();
       
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        SDOUtil.saveDataGraph(dataGraph, baos, null);

        assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(TEST_DATA)));
View Full Code Here

     * @param changedCopy
     * @return
     */
    private static void restoreAttributeValues(DataObject changedCopy, DataObject changedDO) {
       
    ChangeSummary changeSummary = changedDO.getDataGraph().getChangeSummary();
    List changes = changeSummary.getOldValues(changedDO);
    if ( changes == null )
      return;
   
    Iterator i = changes.iterator();
    while (i.hasNext()) {
View Full Code Here

    StringBuffer statement = new StringBuffer("update ");
    statement.append(table.getName());
    statement.append(" set ");

   
    ChangeSummary summary = changedObject.getDataGraph().getChangeSummary();
    Iterator i = getChangedFields(mapping, summary, changedObject).iterator();

    while (i.hasNext()) {
      Property attr = (Property) i.next();
      Column c = t.getColumnByPropertyName(attr.getName());
View Full Code Here

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetEChangeSummary(ChangeSummary newEChangeSummary, NotificationChain msgs)
  {
    ChangeSummary oldEChangeSummary = eChangeSummary;
    eChangeSummary = newEChangeSummary;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SDOPackage.DATA_GRAPH__ECHANGE_SUMMARY, oldEChangeSummary, newEChangeSummary);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

TOP

Related Classes of commonj.sdo.ChangeSummary$Setting

Copyright © 2018 www.massapicom. 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.