org.apache.olingo.odata2.jpa.processor.api.model
Interface JPAEdmAssociationView

All Superinterfaces:
JPAEdmBaseView

public interface JPAEdmAssociationView
extends JPAEdmBaseView

A View on Java Persistence Entity Relationship and Entity Data Model Association.

The implementation of the view provides access to EDM Association created from Java Persistence Entity Relationships. The implementation acts as a container for list of association that are consistent. An Association is said to be consistent only

  1. If both the Ends of Association are consistent
  2. If referential constraint exists for the Association then it should be consistent

See Also:
JPAEdmAssociationSetView, JPAEdmReferentialConstraintView
Do not implement this interface or derive from class.

Method Summary
 void addJPAEdmAssociationView(JPAEdmAssociationView associationView, JPAEdmAssociationEndView associationEndView)
          The method adds JPAEdmAssociationView to its container
 void addJPAEdmRefConstraintView(JPAEdmReferentialConstraintView refView)
          The method adds the referential constraint view to its container.
 List<Association> getConsistentEdmAssociationList()
          The method returns a consistent list of associations.
 Association getEdmAssociation()
          The method returns an association which is currently being processed.
 JPAEdmReferentialConstraintView getJPAEdmReferentialConstraintView()
          The method returns the referential constraint view that is currently being processed.
 int getNumberOfAssociationsWithSimilarEndPoints(JPAEdmAssociationEndView view)
          The method searches for the number of associations with similar endpoints in its container against the search parameter view of type JPAEdmAssociationView .
 Association searchAssociation(JPAEdmAssociationEndView view)
          The method searches for an Association in its container against the search parameter view of type JPAEdmAssociationView .
 
Methods inherited from interface org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmBaseView
clean, getBuilder, getJPAEdmExtension, getJPAEdmMappingModelAccess, getJPAMetaModel, getpUnitName, isConsistent, isDefaultNamingSkipped
 

Method Detail

getEdmAssociation

Association getEdmAssociation()
The method returns an association which is currently being processed.

Returns:
an Association

getConsistentEdmAssociationList

List<Association> getConsistentEdmAssociationList()
The method returns a consistent list of associations. An association is set to be consistent only if all its mandatory properties can be completely built from a Java Persistence Relationship.

Returns:
a consistent list of Association

addJPAEdmAssociationView

void addJPAEdmAssociationView(JPAEdmAssociationView associationView,
                              JPAEdmAssociationEndView associationEndView)
The method adds JPAEdmAssociationView to its container

Parameters:
associationView - of type JPAEdmAssociationView

searchAssociation

Association searchAssociation(JPAEdmAssociationEndView view)
The method searches for an Association in its container against the search parameter view of type JPAEdmAssociationView . The Association in the container view is searched against the consistent list of Association stored in this container.

Parameters:
view - of type JPAEdmAssociationView
Returns:
Association if found in the container

addJPAEdmRefConstraintView

void addJPAEdmRefConstraintView(JPAEdmReferentialConstraintView refView)
The method adds the referential constraint view to its container.

Note: The referential constraint view is added only if it exists.

Parameters:
refView - of type JPAEdmReferentialConstraintView

getJPAEdmReferentialConstraintView

JPAEdmReferentialConstraintView getJPAEdmReferentialConstraintView()
The method returns the referential constraint view that is currently being processed.

Returns:
an instance of type JPAEdmReferentialConstraintView

getNumberOfAssociationsWithSimilarEndPoints

int getNumberOfAssociationsWithSimilarEndPoints(JPAEdmAssociationEndView view)
The method searches for the number of associations with similar endpoints in its container against the search parameter view of type JPAEdmAssociationView . The Association in the container view is searched against the consistent list of Association stored in this container.

Parameters:
view - of type JPAEdmAssociationView
Returns:
Association if found in the container


Copyright © 2013-2015 The Apache Software Foundation. All Rights Reserved.