protected void configureContactContainer2(
     org.eclipse.persistence.mappings.DirectCollectionMapping directcollectionmapping) {
   directcollectionmapping.useCollectionClass(java.util.Stack.class);
 }
  /** modifications are marked with "bjv" */
  protected void buildOrderDescriptor() {
    RelationalDescriptor descriptor = new RelationalDescriptor();

    // SECTION: DESCRIPTOR
    descriptor.setJavaClass(this.orderClass()); // bjv
    Vector vector = new Vector();
    vector.addElement("ORD");
    descriptor.setTableNames(vector);
    descriptor.addPrimaryKeyFieldName("ORD.ID");

    // SECTION: PROPERTIES
    descriptor.setIdentityMapClass(
        org.eclipse.persistence.internal.identitymaps.FullIdentityMap.class);
    descriptor.setSequenceNumberName("order_seq");
    descriptor.setSequenceNumberFieldName("ID");
    descriptor.setExistenceChecking("Check cache");
    descriptor.setIdentityMapSize(100);

    // SECTION: COPY POLICY
    descriptor.createCopyPolicy("constructor");

    // SECTION: INSTANTIATION POLICY
    descriptor.createInstantiationPolicy("constructor");

    // SECTION: DIRECTCOLLECTIONMAPPING
    org.eclipse.persistence.mappings.DirectCollectionMapping directcollectionmapping =
        new org.eclipse.persistence.mappings.DirectCollectionMapping();
    directcollectionmapping.setAttributeName("contacts");
    directcollectionmapping.setIsReadOnly(false);
    directcollectionmapping.setUsesIndirection(false);
    directcollectionmapping.setIsPrivateOwned(true);
    this.configureContactContainer(directcollectionmapping); // bjv
    directcollectionmapping.setDirectFieldName("CONTACT.NAME");
    directcollectionmapping.setReferenceTableName("CONTACT");
    directcollectionmapping.addReferenceKeyFieldName("CONTACT.ORDER_ID", "ORD.ID");
    descriptor.addMapping(directcollectionmapping);

    // SECTION: DIRECTCOLLECTIONMAPPING
    org.eclipse.persistence.mappings.DirectCollectionMapping directcollectionmapping1 =
        new org.eclipse.persistence.mappings.DirectCollectionMapping();
    directcollectionmapping1.setAttributeName("contacts2");
    directcollectionmapping1.setIsReadOnly(false);
    directcollectionmapping1.setUsesIndirection(false);
    directcollectionmapping1.setIsPrivateOwned(true);
    this.configureContactContainer2(directcollectionmapping1); // bjv
    directcollectionmapping1.setDirectFieldName("CONTACT2.NAME");
    directcollectionmapping1.setReferenceTableName("CONTACT2");
    directcollectionmapping1.addReferenceKeyFieldName("CONTACT2.ORDER_ID", "ORD.ID");
    descriptor.addMapping(directcollectionmapping1);

    // SECTION: DIRECTTOFIELDMAPPING
    org.eclipse.persistence.mappings.DirectToFieldMapping directtofieldmapping =
        new org.eclipse.persistence.mappings.DirectToFieldMapping();
    directtofieldmapping.setAttributeName("customerName");
    directtofieldmapping.setIsReadOnly(false);
    directtofieldmapping.setFieldName("ORD.CUSTNAME");
    descriptor.addMapping(directtofieldmapping);

    // SECTION: DIRECTTOFIELDMAPPING
    org.eclipse.persistence.mappings.DirectToFieldMapping directtofieldmapping1 =
        new org.eclipse.persistence.mappings.DirectToFieldMapping();
    directtofieldmapping1.setAttributeName("id");
    directtofieldmapping1.setIsReadOnly(false);
    directtofieldmapping1.setFieldName("ORD.ID");
    descriptor.addMapping(directtofieldmapping1);

    // SECTION: MANYTOMANYMAPPING
    org.eclipse.persistence.mappings.ManyToManyMapping manytomanymapping =
        new org.eclipse.persistence.mappings.ManyToManyMapping();
    manytomanymapping.setAttributeName("salesReps");
    manytomanymapping.setIsReadOnly(false);
    manytomanymapping.setUsesIndirection(false);
    manytomanymapping.setReferenceClass(salesRepClass());
    manytomanymapping.setIsPrivateOwned(false);
    this.configureSalesRepContainer(manytomanymapping); // bjv
    manytomanymapping.setRelationTableName("ORDREP");
    manytomanymapping.addSourceRelationKeyFieldName("ORDREP.ORDER_ID", "ORD.ID");
    manytomanymapping.addTargetRelationKeyFieldName("ORDREP.SALEREP_ID", "SALEREP.ID");
    descriptor.addMapping(manytomanymapping);

    // SECTION: MANYTOMANYMAPPING
    org.eclipse.persistence.mappings.ManyToManyMapping manytomanymapping1 =
        new org.eclipse.persistence.mappings.ManyToManyMapping();
    manytomanymapping1.setAttributeName("salesReps2");
    manytomanymapping1.setIsReadOnly(false);
    manytomanymapping1.setUsesIndirection(false);
    manytomanymapping1.setReferenceClass(salesRepClass());
    manytomanymapping1.setIsPrivateOwned(false);
    this.configureSalesRepContainer2(manytomanymapping1); // bjv
    manytomanymapping1.setRelationTableName("ORDREP2");
    manytomanymapping1.addSourceRelationKeyFieldName("ORDREP2.ORDER_ID", "ORD.ID");
    manytomanymapping1.addTargetRelationKeyFieldName("ORDREP2.SALEREP_ID", "SALEREP.ID");
    descriptor.addMapping(manytomanymapping1);

    // SECTION: ONETOMANYMAPPING
    org.eclipse.persistence.mappings.OneToManyMapping onetomanymapping =
        new org.eclipse.persistence.mappings.OneToManyMapping();
    onetomanymapping.setAttributeName("lines");
    onetomanymapping.setIsReadOnly(false);
    onetomanymapping.setUsesIndirection(false);
    onetomanymapping.setReferenceClass(orderLineClass());
    onetomanymapping.setIsPrivateOwned(true);
    this.configureLineContainer(onetomanymapping); // bjv
    onetomanymapping.addTargetForeignKeyFieldName("ORDLINE.ORDER_ID", "ORD.ID");
    descriptor.addMapping(onetomanymapping);

    // SECTION: TRANSFORMATIONMAPPING
    org.eclipse.persistence.mappings.TransformationMapping transformationmapping =
        new org.eclipse.persistence.mappings.TransformationMapping();
    transformationmapping.setAttributeName("total");
    transformationmapping.setIsReadOnly(false);
    transformationmapping.setUsesIndirection(true);
    transformationmapping.setAttributeTransformation("getTotalFromRow");
    transformationmapping.addFieldTransformation("ORD.TOTT", "getTotalTens");
    transformationmapping.addFieldTransformation("ORD.TOTO", "getTotalOnes");
    descriptor.addMapping(transformationmapping);

    // SECTION: TRANSFORMATIONMAPPING
    org.eclipse.persistence.mappings.TransformationMapping transformationmapping2 =
        new org.eclipse.persistence.mappings.TransformationMapping();
    transformationmapping2.setAttributeName("total2");
    transformationmapping2.setIsReadOnly(false);
    transformationmapping2.setUsesIndirection(false);
    transformationmapping2.setAttributeTransformation("getTotalFromRow2");
    transformationmapping2.addFieldTransformation("ORD.TOTT2", "getTotalTens2");
    transformationmapping2.addFieldTransformation("ORD.TOTO2", "getTotalOnes2");
    descriptor.addMapping(transformationmapping2);

    this.modifyOrderDescriptor(descriptor); // bjv
    addDescriptor(descriptor);
  }