Examples of deleteObject()


Examples of org.apache.cayenne.ObjectContext.deleteObject()

                listener2,
                "publicCallback");

        // change before removing
        a1.setArtistName("YY");
        context.deleteObject(a1);
        context.commitChanges();

        assertNull(listener2.getPublicCalledbackEntity());
        assertSame(a1, listener1.getPublicCalledbackEntity());
    }
View Full Code Here

Examples of org.apache.cayenne.ObjectContext.deleteObject()

                listener2,
                "publicCallback");

        Artist a1 = context.newObject(Artist.class);
        a1.setArtistName("XX");
        context.deleteObject(a1);
        context.commitChanges();

        assertNull(listener0.getPublicCalledbackEntity());
        assertNull(listener1.getPublicCalledbackEntity());
        assertNull(listener2.getPublicCalledbackEntity());
View Full Code Here

Examples of org.apache.cayenne.ObjectContext.deleteObject()

        country.setContinent(continent);
        assertEquals(continent.getCountries().size(), 1);
       
        context.commitChanges();
       
        context.deleteObject(country);
        assertEquals(continent.getCountries().size(), 0);
        continent.setName("Australia");
       
        context.commitChanges();
        context.performQuery(new RefreshQuery());
View Full Code Here

Examples of org.apache.cayenne.ObjectContext.deleteObject()

       
        context.commitChanges();
        Thread.sleep(5); //until commit
        assertAll(1, 0, 1, 1, 1, 1, 0, 0);
       
        context.deleteObject(l1);
        assertAll(1, 0, 1, 1, 1, 1, 1, 0);
       
        context.commitChanges();
        Thread.sleep(5); //until commit
        assertAll(1, 0, 1, 1, 1, 1, 1, 1);
View Full Code Here

Examples of org.apache.cayenne.access.DataContext.deleteObject()

                    query.andQualifier(ExpressionFactory.matchDbExp("DELETED", true));
                    assertEquals(0, context.performQuery(query).size());
                }
            }.assertWithTimeout(200);
           
            context.deleteObject(test);
            assertEquals(test.getPersistenceState(), PersistenceState.DELETED);
            context.commitChanges();
           
            new ThreadedTestHelper() {
                @Override
View Full Code Here

Examples of org.apache.cayenne.access.DataContext.deleteObject()

        Artist a1 = Cayenne.objectForPK(context, Artist.class, 33001);

        ArtGroup group = a1.getGroupArray().get(0);
        a1.removeFromGroupArray(group); // Cause the delete of the link record

        context.deleteObject(a1); // Cause the deletion of the artist

        try {
            context.commitChanges();
        }
        catch (Exception e) {
View Full Code Here

Examples of org.apache.cayenne.access.DataContext.deleteObject()

        Expression exp = ExpressionFactory.matchExp(Role.ROLE_GROUPS_PROPERTY, group2);
        SelectQuery query = new SelectQuery(Group.class, exp);
        context.performQuery(query);
        context.commitChanges();

        context.deleteObject(group1);
        context.deleteObject(group2);
        context.deleteObject(user);
        context.commitChanges();
    }
}
View Full Code Here

Examples of org.apache.cayenne.access.DataContext.deleteObject()

        SelectQuery query = new SelectQuery(Group.class, exp);
        context.performQuery(query);
        context.commitChanges();

        context.deleteObject(group1);
        context.deleteObject(group2);
        context.deleteObject(user);
        context.commitChanges();
    }
}
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.ObjectServicePort.deleteObject()

        ObjectServicePort port = fPortProvider.getObjectServicePort();

        try {
            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);

            port.deleteObject(repositoryId, objectId, allVersions, portExtension);

            setExtensionValues(portExtension, extension);
        } catch (CmisException e) {
            throw convertException(e);
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.server.CmisService.deleteObject()

    public void deleteObject(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension) {
        CmisService service = getService(repositoryId);

        try {
            service.deleteObject(repositoryId, objectId, allVersions, extension);
        } finally {
            service.close();
        }
    }
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.