Package org.apache.olingo.odata2.api.edm.provider

Examples of org.apache.olingo.odata2.api.edm.provider.AssociationEnd


  @Override
  public Association getEdmAssociation() {
    Association association = new Association();
    association
        .setEnd1(new AssociationEnd().setType(new FullQualifiedName("salesorderprocessing", "SalesOrderHeader")));
    association.setEnd2(new AssociationEnd().setType(new FullQualifiedName("salesorderprocessing", "String")));

    return association;
  }
View Full Code Here


            assertEquals(ASSOCIATION, navProperty.getRelationship().getName());
          }
        }
      }
      for (Association association : schema.getAssociations()) {
        AssociationEnd end;
        assertEquals(ASSOCIATION, association.getName());
        if ("Employee".equals(association.getEnd1().getType().getName())) {
          end = association.getEnd1();
        } else {
          end = association.getEnd2();
        }
        assertEquals(EdmMultiplicity.MANY, end.getMultiplicity());
        assertEquals("r_Employees", end.getRole());
        assertEquals(EdmAction.Cascade, end.getOnDelete().getAction());
      }
    }
  }
View Full Code Here

  private List<Association> getEdmAssociationListLocal() {
    List<Association> associationList = new ArrayList<Association>();

    Association association = new Association();
    association.setName("Assoc_SalesOrderHeader_SalesOrderItem");
    association.setEnd1(new AssociationEnd().setType(new FullQualifiedName("salesorderprocessing", "String")).setRole(
        "SalesOrderHeader"));
    association.setEnd2(new AssociationEnd().setType(new FullQualifiedName("salesorderprocessing", "SalesOrderItem"))
        .setRole("SalesOrderItem"));

    associationList.add(association);
    return associationList;
  }
View Full Code Here

  @Override
  public Association getEdmAssociation() {
    Association association = new Association();
    association.setName("Assoc_SalesOrderHeader_SalesOrderItem");
    association.setEnd1(new AssociationEnd().setType(new FullQualifiedName("salesorderprocessing", "String")).setRole(
        "SalesOrderHeader"));
    association.setEnd2(new AssociationEnd().setType(new FullQualifiedName("salesorderprocessing", "SalesOrderItem"))
        .setRole("SalesOrderItem"));
    return association;
  }
View Full Code Here

    }
  }

  @Override
  public AssociationEnd getEdmAssociationEnd1() {
    AssociationEnd associationEnd = new AssociationEnd();
    associationEnd.setType(new FullQualifiedName("salesorderprocessing", "SalesOrderHeader"));
    associationEnd.setRole("SalesOrderHeader");
    associationEnd.setMultiplicity(EdmMultiplicity.ONE);
    return associationEnd;
  }
View Full Code Here

    return associationEnd;
  }

  @Override
  public AssociationEnd getEdmAssociationEnd2() {
    AssociationEnd associationEnd = new AssociationEnd();
    associationEnd.setType(new FullQualifiedName("salesorderprocessing", "String"));
    associationEnd.setRole("String");
    associationEnd.setMultiplicity(EdmMultiplicity.MANY);
    return associationEnd;
  }
View Full Code Here

    @Override
    public void build() throws ODataJPAModelException {

      JoinColumn joinColumn = null;

      currentAssociationEnd1 = new AssociationEnd();
      currentAssociationEnd2 = new AssociationEnd();

      JPAEdmNameBuilder.build(JPAEdmAssociationEnd.this, entityTypeView, propertyView);

      currentAssociationEnd1.setRole(currentAssociationEnd1.getType().getName());
      currentAssociationEnd2.setRole(currentAssociationEnd2.getType().getName());
View Full Code Here

  @Override
  public Association getEdmAssociation() {
    Association association = new Association();
    association
        .setEnd1(new AssociationEnd().setType(new FullQualifiedName("salesorderprocessing", "SalesOrderHeader")));
    association.setEnd2(new AssociationEnd().setType(new FullQualifiedName("salesorderprocessing", "String")));

    return association;
  }
View Full Code Here

  public void testAddJPAEdmAssociationView() {

    class LocalJPAAssociationView extends JPAEdmTestModelView {
      @Override
      public AssociationEnd getEdmAssociationEnd1() {
        AssociationEnd associationEnd = new AssociationEnd();
        associationEnd.setType(new FullQualifiedName("salesorderprocessing", "SalesOrderHeader"));
        associationEnd.setRole("SalesOrderHeader");
        associationEnd.setMultiplicity(EdmMultiplicity.ONE);
        return associationEnd;
      }

      @Override
      public AssociationEnd getEdmAssociationEnd2() {
        AssociationEnd associationEnd = new AssociationEnd();
        associationEnd.setType(new FullQualifiedName("salesorderprocessing", "SalesOrderItem"));
        associationEnd.setRole("SalesOrderItem");
        associationEnd.setMultiplicity(EdmMultiplicity.MANY);
        return associationEnd;
      }

      @Override
      public Association getEdmAssociation() {
        Association association = new Association();
        association.setEnd1(new AssociationEnd().setType(new FullQualifiedName("salesorderprocessing",
            "SalesOrderHeader")));
        association.setEnd2(new AssociationEnd()
            .setType(new FullQualifiedName("salesorderprocessing", "SalesOrderItem")));

        return association;
      }
    }
View Full Code Here

  public void testAddJPAEdmAssociationView() {

    class LocalJPAAssociationView extends JPAEdmTestModelView {
      @Override
      public AssociationEnd getEdmAssociationEnd1() {
        AssociationEnd associationEnd = new AssociationEnd();
        associationEnd.setType(new FullQualifiedName("salesorderprocessing", "SalesOrderHeader"));
        associationEnd.setRole("SalesOrderHeader");
        associationEnd.setMultiplicity(EdmMultiplicity.ONE);
        return associationEnd;
      }
View Full Code Here

TOP

Related Classes of org.apache.olingo.odata2.api.edm.provider.AssociationEnd

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.