Examples of needsUpdate()


Examples of helma.objectmodel.db.DbMapping.needsUpdate()

            }           

            // update prototype's type mapping
            DbMapping dbmap = proto.getDbMapping();

            if ((dbmap != null) && dbmap.needsUpdate()) {
                // call dbmap.update(). This also checks the
                // parent prototype for prototypes other than
                // global and HopObject, which is a bit awkward...
                // I mean we're the type manager, so this should
                // be part of our job, right?
View Full Code Here

Examples of org.apache.ojb.broker.util.ObjectModificationDefaultImpl.needsUpdate()

     * Creation date: (06.12.2000 21:51:22)
     */
    public void testUpdateWithModification() throws Exception
    {
        ObjectModificationDefaultImpl modification = new ObjectModificationDefaultImpl();
        assertTrue("should not be marked for update yet", !modification.needsUpdate());
        assertTrue("should not be marked for insert", !modification.needsInsert());
        Article a = createArticle(testId);
        storeArticle(a);
        Article b = readArticleByIdentity(testId);
        assertEquals(
View Full Code Here

Examples of org.apache.ojb.broker.util.ObjectModificationDefaultImpl.needsUpdate()

                a.getArticleName(),
                b.getArticleName());
        String newname = "TESTUPDATE";
        b.setArticleName(newname);
        modification.markModified();
        assertTrue("should be marked for update", modification.needsUpdate());
        assertTrue("should not be marked for insert", !modification.needsInsert());
        broker.beginTransaction();
        broker.store(b, modification);
        broker.commitTransaction();
View Full Code Here

Examples of org.apache.ojb.odmg.states.ModificationState.needsUpdate()

    {
        ModificationState state1 = vertex1.getEnvelope().getModificationState();
        ModificationState state2 = vertex2.getEnvelope().getModificationState();
        if (state1.needsInsert())
        {
            if (state2.needsUpdate() || state2.needsInsert())
            {
                // (2) now contains an FK to (1) thus (1) must be inserted first
                return new Edge(vertex1, vertex2, CONCRETE_EDGE_WEIGHT);
            }
        }
View Full Code Here

Examples of org.apache.ojb.odmg.states.ModificationState.needsUpdate()

                return new Edge(vertex1, vertex2, CONCRETE_EDGE_WEIGHT);
            }
        }
        else if (state1.needsDelete())
        {
            if (state2.needsUpdate() || state2.needsDelete())
            {
                // Before deleting (1) give (2) a chance to drop its FK to it
                return new Edge(vertex2, vertex1, CONCRETE_EDGE_WEIGHT);
            }
        }
View Full Code Here

Examples of org.apache.ojb.odmg.states.ModificationState.needsUpdate()

    {
        ModificationState state1 = vertex1.getEnvelope().getModificationState();
        ModificationState state2 = vertex2.getEnvelope().getModificationState();
        if (state1.needsDelete())
        {
            if (state2.needsUpdate() || state2.needsDelete())
            {
                // Before deleting (1) give potential previous collection
                // members a chance to drop their FKs to it
                return new Edge(vertex2, vertex1, POTENTIAL_EDGE_WEIGHT);
            }
View Full Code Here

Examples of org.apache.ojb.odmg.states.ModificationState.needsUpdate()

    {
        ModificationState state1 = vertex1.getEnvelope().getModificationState();
        ModificationState state2 = vertex2.getEnvelope().getModificationState();
        if (state1.needsInsert())
        {
            if (state2.needsUpdate() || state2.needsInsert())
            {
                // (2) now contains an FK to (1) thus (1) must be inserted first
                return new Edge(vertex1, vertex2, CONCRETE_EDGE_WEIGHT);
            }
        }
View Full Code Here

Examples of org.apache.ojb.odmg.states.ModificationState.needsUpdate()

                return new Edge(vertex1, vertex2, CONCRETE_EDGE_WEIGHT);
            }
        }
        else if (state1.needsDelete())
        {
            if (state2.needsUpdate() || state2.needsDelete())
            {
                // Before deleting (1) give (2) a chance to drop its FK to it
                return new Edge(vertex2, vertex1, CONCRETE_EDGE_WEIGHT);
            }
        }
View Full Code Here

Examples of org.apache.ojb.odmg.states.ModificationState.needsUpdate()

    {
        ModificationState state1 = vertex1.getEnvelope().getModificationState();
        ModificationState state2 = vertex2.getEnvelope().getModificationState();
        if (state1.needsDelete())
        {
            if (state2.needsUpdate() || state2.needsDelete())
            {
                // Before deleting (1) give potential previous collection
                // members a chance to drop their FKs to it
                return new Edge(vertex2, vertex1, POTENTIAL_EDGE_WEIGHT);
            }
View Full Code Here

Examples of org.apache.ojb.otm.states.State.needsUpdate()

                {
                    Identity oid = (Identity) it.next();
                    ContextEntry entry = (ContextEntry) _objects.get(oid);
                    State state = entry.state;

                    if (!state.needsInsert() && !state.needsUpdate()
                            && !state.needsDelete())
                    {
                        if (changedCollections.contains(oid)) {
                            _pb.store(entry.cacheObject, state);
                        }
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.