Package org.apache.isis.applib.services.wrapper

Examples of org.apache.isis.applib.services.wrapper.WrapperObject.save()


        newCustomerVO.setMandatoryValue("foo");
        newCustomerVO.setMaxLengthField("abc");
        newCustomerVO.setRegExCaseInsensitiveField("ABCd");
        newCustomerVO.setRegExCaseSensitiveField("abcd");
        final WrapperObject proxyNewCustomer = asWrapperObject(newCustomerVO);
        proxyNewCustomer.save();
        assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(true));
    }

    @Test
    public void invokingSaveOnThroughProxyOnAlreadyPersistedObjectJustUpdatesIt() {
View Full Code Here


        custJsDO.setRegExCaseSensitiveField("abcd");

        assertThat(getDomainObjectContainer().isPersistent(custJsDO), is(true));

        final WrapperObject newCustomerWO = asWrapperObject(custJsWO);
        newCustomerWO.save();

        assertThat(getDomainObjectContainer().isPersistent(custJsDO), is(true));
    }

    @Test
View Full Code Here

        newCustomer.validate = "No shakes";

        final WrapperObject newCustomerWrapper = asWrapperObject(newCustomerWO);
        try {
            assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false));
            newCustomerWrapper.save();
            fail("An InvalidImperativelyException should have been thrown");
        } catch (final InvalidException ex) {

            assertThat(ex.getAdvisorClass(), classEqualTo(ValidateObjectFacetMethod.class));
            assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false)); // not
View Full Code Here

        newCustomerVO.setMandatoryValue("foo");
        newCustomerVO.setMaxLengthField("abc");
        newCustomerVO.setRegExCaseInsensitiveField("ABCd");
        newCustomerVO.setRegExCaseSensitiveField("abcd");
        final WrapperObject proxyNewCustomer = asWrapperObject(newCustomerVO);
        proxyNewCustomer.save();
        assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(true));
    }

    @Test
    public void invokingSaveOnThroughProxyOnAlreadyPersistedObjectJustUpdatesIt() {
View Full Code Here

        custJsDO.setRegExCaseSensitiveField("abcd");

        assertThat(getDomainObjectContainer().isPersistent(custJsDO), is(true));

        final WrapperObject newCustomerWO = asWrapperObject(custJsWO);
        newCustomerWO.save();

        assertThat(getDomainObjectContainer().isPersistent(custJsDO), is(true));
    }

    @Test
View Full Code Here

        newCustomer.validate = "No shakes";

        final WrapperObject newCustomerWrapper = asWrapperObject(newCustomerWO);
        try {
            assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false));
            newCustomerWrapper.save();
            fail("An InvalidImperativelyException should have been thrown");
        } catch (final InvalidException ex) {

            assertThat(ex.getAdvisorClass(), classEqualTo(ValidateObjectFacetViaValidateMethod.class));
            assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false)); // not
View Full Code Here

        newCustomerVO.setMandatoryValue("foo");
        newCustomerVO.setMaxLengthField("abc");
        newCustomerVO.setRegExCaseInsensitiveField("ABCd");
        newCustomerVO.setRegExCaseSensitiveField("abcd");
        final WrapperObject proxyNewCustomer = asWrapperObject(newCustomerVO);
        proxyNewCustomer.save();
        assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(true));
    }

    @Test
    public void invokingSaveOnThroughProxyOnAlreadyPersistedObjectJustUpdatesIt() {
View Full Code Here

        custJsDO.setRegExCaseSensitiveField("abcd");

        assertThat(getDomainObjectContainer().isPersistent(custJsDO), is(true));

        final WrapperObject newCustomerWO = asWrapperObject(custJsWO);
        newCustomerWO.save();

        assertThat(getDomainObjectContainer().isPersistent(custJsDO), is(true));
    }

    @Test
View Full Code Here

        newCustomer.validate = "No shakes";

        final WrapperObject newCustomerWrapper = asWrapperObject(newCustomerWO);
        try {
            assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false));
            newCustomerWrapper.save();
            fail("An InvalidImperativelyException should have been thrown");
        } catch (final InvalidException ex) {

            assertThat(ex.getAdvisorClass(), classEqualTo(ValidateObjectFacetViaValidateMethod.class));
            assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false)); // not
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.