Package org.apache.isis.objectstore.jdo.metamodel.facets.object.persistencecapable

Examples of org.apache.isis.objectstore.jdo.metamodel.facets.object.persistencecapable.JdoPersistenceCapableFacet


            }

            private void validate(ObjectSpecification objectSpec, ValidationFailures validationFailures) {
               
                // only consider persistent entities
                final JdoPersistenceCapableFacet pcFacet = objectSpec.getFacet(JdoPersistenceCapableFacet.class);
                if(pcFacet==null || pcFacet.getIdentityType() == IdentityType.NONDURABLE) {
                    return;
                }
               
                final List<ObjectAssociation> associations = objectSpec.getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.PROPERTIES);
                for (ObjectAssociation association : associations) {
View Full Code Here


                return true;
            }

            private void validate(ObjectSpecification objectSpec, ValidationFailures validationFailures) {
               
                final JdoPersistenceCapableFacet pcFacet = objectSpec.getFacet(JdoPersistenceCapableFacet.class);
                if(pcFacet==null || pcFacet.getIdentityType() == IdentityType.NONDURABLE) {
                    return;
                }
               
                final List<ObjectAssociation> associations = objectSpec.getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.PROPERTIES);
                for (ObjectAssociation association : associations) {
View Full Code Here

    private void addValidatorToEnsureIdentityType() {
        MetaModelValidatorVisiting.Visitor ensureIdentityType = new MetaModelValidatorVisiting.Visitor(){
            @Override
            public boolean visit(ObjectSpecification objSpec, ValidationFailures validationFailures) {
                final JdoPersistenceCapableFacet jpcf = objSpec.getFacet(JdoPersistenceCapableFacet.class);
                if(jpcf == null) {
                    return true;
                }
                final IdentityType identityType = jpcf.getIdentityType();
                if(identityType == IdentityType.APPLICATION) {
                    // ok
                   
                } else if(identityType == IdentityType.NONDURABLE) {
                    // ok; for use with view models (http://www.datanucleus.org/products/accessplatform_3_2/datastores/rdbms_views.html)
View Full Code Here

                return true;
            }

            private void validate(ObjectSpecification objectSpec, ValidationFailures validationFailures) {
               
                final JdoPersistenceCapableFacet pcFacet = objectSpec.getFacet(JdoPersistenceCapableFacet.class);
                if(pcFacet==null || pcFacet.getIdentityType() == IdentityType.NONDURABLE) {
                    return;
                }
               
                final List<ObjectAssociation> associations = objectSpec.getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.PROPERTIES);
                for (ObjectAssociation association : associations) {
View Full Code Here

       
        final String distinguisher = idStr.substring(0, separatorIdx);
        final String keyStr = idStr.substring(separatorIdx+1);

        final ObjectSpecification spec = getSpecificationLoader().lookupBySpecId(oid.getObjectSpecId());
        final JdoPersistenceCapableFacet jdoPcFacet = spec.getFacet(JdoPersistenceCapableFacet.class);

        if(isApplicationIdentity(jdoPcFacet)) {

            if("s".equals(distinguisher)) {
                return keyStr;
View Full Code Here

        final String keyStr = idStr.substring(colonIdx+1);
       
        final String firstPart = idStr.substring(0, colonIdx);

        final ObjectSpecification spec = getSpecificationLoader().lookupBySpecId(oid.getObjectSpecId());
        JdoPersistenceCapableFacet facet = spec.getFacet(JdoPersistenceCapableFacet.class);
        if(facet != null && facet.getIdentityType() == IdentityType.APPLICATION) {

            if("s".equals(firstPart)) {
                return keyStr;
            }
            if("i".equals(firstPart)) {
View Full Code Here

                return true;
            }

            private void validate(ObjectSpecification objectSpec, ValidationFailures validationFailures) {
               
                final JdoPersistenceCapableFacet pcFacet = objectSpec.getFacet(JdoPersistenceCapableFacet.class);
                if(pcFacet==null || pcFacet.getIdentityType() == IdentityType.NONDURABLE) {
                    return;
                }
               
                final List<ObjectAssociation> associations = objectSpec.getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.PROPERTIES);
                for (ObjectAssociation association : associations) {
View Full Code Here

    private void addValidatorToEnsureIdentityType() {
        MetaModelValidatorVisiting.Visitor ensureIdentityType = new MetaModelValidatorVisiting.Visitor(){
            @Override
            public boolean visit(ObjectSpecification objSpec, ValidationFailures validationFailures) {
                final JdoPersistenceCapableFacet jpcf = objSpec.getFacet(JdoPersistenceCapableFacet.class);
                if(jpcf == null) {
                    return true;
                }
                final IdentityType identityType = jpcf.getIdentityType();
                if(identityType == IdentityType.APPLICATION) {
                    // ok
                   
                } else if(identityType == IdentityType.NONDURABLE) {
                    // ok; for use with view models (http://www.datanucleus.org/products/accessplatform_3_2/datastores/rdbms_views.html)
View Full Code Here

                return true;
            }

            private void validate(ObjectSpecification objectSpec, ValidationFailures validationFailures) {
               
                final JdoPersistenceCapableFacet pcFacet = objectSpec.getFacet(JdoPersistenceCapableFacet.class);
                if(pcFacet==null || pcFacet.getIdentityType() == IdentityType.NONDURABLE) {
                    return;
                }
               
                final List<ObjectAssociation> associations = objectSpec.getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.PROPERTIES);
                for (ObjectAssociation association : associations) {
View Full Code Here

            }

            private void validate(ObjectSpecification objectSpec, ValidationFailures validationFailures) {
               
                // only consider persistent entities
                final JdoPersistenceCapableFacet pcFacet = objectSpec.getFacet(JdoPersistenceCapableFacet.class);
                if(pcFacet==null || pcFacet.getIdentityType() == IdentityType.NONDURABLE) {
                    return;
                }
               
                final List<ObjectAssociation> associations = objectSpec.getAssociations(Contributed.EXCLUDED, ObjectAssociation.Filters.PROPERTIES);
                for (ObjectAssociation association : associations) {
View Full Code Here

TOP

Related Classes of org.apache.isis.objectstore.jdo.metamodel.facets.object.persistencecapable.JdoPersistenceCapableFacet

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.