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

Examples of org.apache.isis.applib.services.wrapper.WrappingObject


    }
   
    @Override
    public <T> T wrap(final T domainObject, final ExecutionMode mode) {
        if (domainObject instanceof WrappingObject) {
            final WrappingObject wrapperObject = (WrappingObject) domainObject;
            final ExecutionMode wrapperMode = wrapperObject.__isis_executionMode();
            if(wrapperMode != mode) {
                final Object underlyingDomainObject = wrapperObject.__isis_wrapped();
                return (T)createProxy(underlyingDomainObject, mode);
            }
            return domainObject;
        }
        return createProxy(domainObject, mode);
View Full Code Here


    @Override
    @SuppressWarnings("unchecked")
    @Programmatic
    public <T> T unwrap(T possibleWrappedDomainObject) {
        if(isWrapper(possibleWrappedDomainObject)) {
            final WrappingObject wrappingObject = (WrappingObject) possibleWrappedDomainObject;
            return (T) wrappingObject.__isis_wrapped();
        }
        return possibleWrappedDomainObject;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.applib.services.wrapper.WrappingObject

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.