Package org.apache.isis.progmodel.wrapper.applib

Examples of org.apache.isis.progmodel.wrapper.applib.WrapperObject


        custJsDO.setRegExCaseInsensitiveField("ABCd");
        custJsDO.setRegExCaseSensitiveField("abcd");

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

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

        assertThat(getDomainObjectContainer().isPersistent(custJsDO), is(true));
    }
View Full Code Here


        newCustomer.setRegExCaseSensitiveField("abcd");

        final Customer newCustomerWO = getWrapperFactory().wrap(newCustomer);
        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 saved
View Full Code Here

        return null;
    }

    private Object underlying(final Object arg) {
        if (arg instanceof WrapperObject) {
            final WrapperObject argViewObject = (WrapperObject) arg;
            return argViewObject.wrapped();
        } else {
            return arg;
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.progmodel.wrapper.applib.WrapperObject

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.