Package org.apache.isis.core.metamodel.facets.notpersisted

Examples of org.apache.isis.core.metamodel.facets.notpersisted.NotPersistedFacet


        this.serviceAction = serviceAction;

        // copy over facets from contributed to own.
        FacetUtil.copyFacets(serviceAction.getFacetedMethod(), facetHolder);
       
        final NotPersistedFacet notPersistedFacet = new NotPersistedFacetAbstract(this) {};
        final DisabledFacet disabledFacet = disabledFacet();
        final TypeOfFacet typeOfFacet = new TypeOfFacetAbstract(getSpecification().getCorrespondingClass(), this, objectMemberContext.getSpecificationLookup()) {};
       
        FacetUtil.addFacet(notPersistedFacet);
        FacetUtil.addFacet(disabledFacet);
View Full Code Here


        };
    }

    @Test
    public void notPersistedWhenDerived() throws Exception {
        final NotPersistedFacet mockFacet = mockFacetIgnoring(NotPersistedFacet.class);
        facetedMethod.addFacet(mockFacet);
        assertTrue(objectAssociation.isNotPersisted());
    }
View Full Code Here

        assertTrue(objectAssociation.isNotPersisted());
    }

    @Test
    public void notPersistedWhenFlaggedAsNotPersisted() throws Exception {
        final NotPersistedFacet mockFacet = mockFacetIgnoring(NotPersistedFacet.class);
        facetedMethod.addFacet(mockFacet);
        assertTrue(objectAssociation.isNotPersisted());
    }
View Full Code Here

        this.serviceAction = serviceAction;
       
        // copy over facets from contributed to own.
        FacetUtil.copyFacets(serviceAction.getFacetedMethod(), facetHolder);
       
        final NotPersistedFacet notPersistedFacet = new NotPersistedFacetAbstract(this) {};
        final DisabledFacet disabledFacet = disabledFacet();
       
        FacetUtil.addFacet(notPersistedFacet);
        FacetUtil.addFacet(disabledFacet);
       
View Full Code Here

                    final ObjectAdapter field = patternAssoc.get(pattern);
                    if (field != null) {
                        final String id = patternAssoc.getId();
                        try {
                            final ObjectAssociation oa = spec.getAssociation(id);
                            final NotPersistedFacet fc = oa.getFacet(NotPersistedFacet.class);
                            if (fc != null) {
                                continue;
                            }
                        } catch (final ObjectSpecificationException e) {
                            // this is OK
View Full Code Here

    }

    @Test
    public void notPersistedWhenDerived() throws Exception {
        // TODO: ISIS-5, need to reinstate DerivedFacet
        final NotPersistedFacet mockFacet = mockFacetIgnoring(NotPersistedFacet.class);
        facetedMethod.addFacet(mockFacet);
        assertTrue(objectAssociation.isNotPersisted());
    }
View Full Code Here

        assertTrue(objectAssociation.isNotPersisted());
    }

    @Test
    public void notPersistedWhenFlaggedAsNotPersisted() throws Exception {
        final NotPersistedFacet mockFacet = mockFacetIgnoring(NotPersistedFacet.class);
        facetedMethod.addFacet(mockFacet);
        assertTrue(objectAssociation.isNotPersisted());
    }
View Full Code Here

                    final ObjectAdapter field = patternAssoc.get(pattern);
                    if (field != null) {
                        final String id = patternAssoc.getId();
                        try {
                            final ObjectAssociation oa = spec.getAssociation(id);
                            final NotPersistedFacet fc = oa.getFacet(NotPersistedFacet.class);
                            if (fc != null) {
                                continue;
                            }
                        } catch (final ObjectSpecificationException e) {
                            // this is OK
View Full Code Here

    }

    @Test
    public void notPersistedWhenDerived() throws Exception {
        // TODO: ISIS-5, need to reinstate DerivedFacet
        final NotPersistedFacet mockFacet = mockFacetIgnoring(NotPersistedFacet.class);
        facetedMethod.addFacet(mockFacet);
        assertTrue(objectAssociation.isNotPersisted());
    }
View Full Code Here

        assertTrue(objectAssociation.isNotPersisted());
    }

    @Test
    public void notPersistedWhenFlaggedAsNotPersisted() throws Exception {
        final NotPersistedFacet mockFacet = mockFacetIgnoring(NotPersistedFacet.class);
        facetedMethod.addFacet(mockFacet);
        assertTrue(objectAssociation.isNotPersisted());
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.notpersisted.NotPersistedFacet

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.