Package commonj.sdo

Examples of commonj.sdo.ChangeSummary$Setting


  }

  public ChangeSummary getChangeSummary()
  {
    //FB is this the right place to create the resources?
    ChangeSummary changeSummary = getEChangeSummary();
    if (changeSummary == null)
    {
      getRootResource();
      changeSummary = createEChangeSummary();
      setEChangeSummary(changeSummary);
View Full Code Here


        TableWrapper t = new TableWrapper(table);
        StringBuffer statement = new StringBuffer("update ");
        statement.append(table.getTableName());
        statement.append(" set ");

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

        while (i.hasNext()) {
            Property property = (Property) i.next();
            Column c = t.getColumnByPropertyName(property.getName());
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();
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();

        if (this.logger.isDebugEnabled()) {
            this.logger.debug("List of changed objects contains " + changedObjects.size() + " object(s)");
        }
View Full Code Here

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

        SDOUtil.registerDataGraphTypes(g, gbmd.getDefinedTypes());
       
        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 g = SDOUtil.createDataGraph();

        // Create the root object
        g.createRootObject(rootType);

        ChangeSummary summary = g.getChangeSummary();
        summary.beginLogging();

        return g.getRootObject();
    }
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

            // If we are at the CS root - we do not clear the changeSummary
            if (isCSRoot) {
                clearCS = false;
            } else {
                if (aDataObject.getContainer() != null) {
                    ChangeSummary containerCS = aDataObject.getContainer().getChangeSummary();

                    // If there is no CS field set above this object then clear any ChangeSummary pointer at this level
                    if (containerCS == null) {
                        clearCS = true;
                    }
View Full Code Here

                sequence = new SDOSequence(this);
            }

            Property csmProperty = ((SDOType)type).getChangeSummaryProperty();
            if (csmProperty != null) {
                ChangeSummary aChangeSummary = new SDOChangeSummary(this, aHelperContext);
                aChangeSummary.endLogging();
                _setChangeSummary(aChangeSummary);
            }
        }
    }
View Full Code Here

     */

    public void printChangeSummary() {

        // TODO: change summary is not currently working
        ChangeSummary changeSummary = getChangeSummary();
        boolean logging = changeSummary.isLogging();
        if (!logging) {
            System.out.println("Change logging is disabled");
        } else {
            System.out.println("Change logging is enabled");
        }
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.