Package org.apache.ojb.broker.util

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


                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

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.