Package org.apache.isis.core.metamodel.specloader.specimpl

Examples of org.apache.isis.core.metamodel.specloader.specimpl.OneToManyAssociationImpl


    @Before
    public void setUp() {
        allowingPeerToReturnCollectionType();
        allowingPeerToReturnIdentifier();
        allowingSpecLoaderToReturnSpecs();
        association = new OneToManyAssociationImpl(mockPeer, new ObjectMemberContext(DeploymentCategory.PRODUCTION, mockAuthenticationSessionProvider, mockSpecificationLookup, mockAdapterManager, mockQuerySubmitter, mockCollectionTypeRegistry, mockServicesProvider));
    }
View Full Code Here


    }
   

    private ObjectAssociation createAssociation(final FacetedMethod facetMethod) {
        if (facetMethod.getFeatureType().isCollection()) {
            return new OneToManyAssociationImpl(facetMethod, objectMemberContext);
        } else if (facetMethod.getFeatureType().isProperty()) {
            return new OneToOneAssociationImpl(facetMethod, objectMemberContext);
        } else {
            return null;
        }
View Full Code Here

    }

    @Override
    protected String determineColumnName(final ObjectAssociation objectAssociation) {
        if (objectAssociation instanceof OneToManyAssociationImpl) {
            final OneToManyAssociationImpl fkAssoc = (OneToManyAssociationImpl) objectAssociation;
            final FacetedMethod peer = fkAssoc.getFacetedMethod();
            final String fullClassName = peer.getIdentifier().getClassName();
            final int lastPos = fullClassName.lastIndexOf('.');
            return fullClassName.substring(lastPos + 1) + "_" + fkAssoc.getId();
        } else {
            return objectAssociation.getSpecification().getShortIdentifier();
        }
    }
View Full Code Here

    @Before
    public void setUp() {
        allowingPeerToReturnCollectionType();
        allowingPeerToReturnIdentifier();
        allowingSpecLoaderToReturnSpecs();
        association = new OneToManyAssociationImpl(mockPeer, new ObjectMemberContext(DeploymentCategory.PRODUCTION, mockAuthenticationSessionProvider, mockSpecificationLookup, mockAdapterManager, mockQuerySubmitter, mockServicesProvider));
    }
View Full Code Here

        mockCollectionAddToFacet = context.mock(CollectionAddToFacet.class);

        allowingPeerToReturnCollectionType();
        allowingPeerToReturnIdentifier();
        allowingSpecLoaderToReturnSpecs();
        association = new OneToManyAssociationImpl(mockPeer, new ObjectMemberContext(mockAuthenticationSessionProvider, mockSpecificationLookup, mockAdapterManager, mockQuerySubmitter, mockCollectionTypeRegistry));
    }
View Full Code Here

    }

    @Override
    protected String determineColumnName(final ObjectAssociation objectAssociation) {
        if (objectAssociation instanceof OneToManyAssociationImpl) {
            final OneToManyAssociationImpl fkAssoc = (OneToManyAssociationImpl) objectAssociation;
            final FacetedMethod peer = fkAssoc.getFacetedMethod();
            final String fullClassName = peer.getIdentifier().getClassName();
            final int lastPos = fullClassName.lastIndexOf('.');
            return fullClassName.substring(lastPos + 1) + "_" + fkAssoc.getId();
        } else {
            return objectAssociation.getSpecification().getShortIdentifier();
        }
    }
View Full Code Here

    private OneToOneAssociationImpl createProperty(final FacetedMethod facetedMethod) {
        return new OneToOneAssociationImpl(facetedMethod, objectMemberContext);
    }

    private OneToManyAssociationImpl createCollection(final FacetedMethod facetedMethod) {
        return new OneToManyAssociationImpl(facetedMethod, objectMemberContext);
    }
View Full Code Here

    }

    @Override
    protected String determineColumnName(final ObjectAssociation objectAssociation) {
        if (objectAssociation instanceof OneToManyAssociationImpl) {
            final OneToManyAssociationImpl fkAssoc = (OneToManyAssociationImpl) objectAssociation;
            final FacetedMethod peer = fkAssoc.getFacetedMethod();
            final String fullClassName = peer.getIdentifier().getClassName();
            final int lastPos = fullClassName.lastIndexOf('.');
            return fullClassName.substring(lastPos + 1) + "_" + fkAssoc.getId();
        } else {
            return objectAssociation.getSpecification().getShortIdentifier();
        }
    }
View Full Code Here

        allowingPeerToReturnCollectionType();
        allowingPeerToReturnIdentifier();
        allowingSpecLoaderToReturnSpecs();
        association =
            new OneToManyAssociationImpl(mockPeer, new ObjectMemberContext(mockAuthenticationSessionProvider,
                mockSpecificationLookup, mockAdapterManager, mockQuerySubmitter));
    }
View Full Code Here

    @Before
    public void setUp() {
        allowingPeerToReturnCollectionType();
        allowingPeerToReturnIdentifier();
        allowingSpecLoaderToReturnSpecs();
        association = new OneToManyAssociationImpl(mockPeer, new ObjectMemberContext(DeploymentCategory.PRODUCTION, mockAuthenticationSessionProvider, mockSpecificationLookup, mockAdapterManager, mockQuerySubmitter, mockCollectionTypeRegistry));
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.specloader.specimpl.OneToManyAssociationImpl

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.