protected void configureSalesRepContainer2(
     org.eclipse.persistence.mappings.ManyToManyMapping manytomanymapping) {
   manytomanymapping.useMapClass(
       org.eclipse.persistence.testing.tests.transparentindirection.TestHashtable.class, "getKey");
 }
  /** 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);
  }
  /**
   * TopLink generated method. <b>WARNING</b>: This code was generated by an automated tool. Any
   * changes will be lost when the code is re-generated
   */
  protected void buildActorDescriptor() {
    RelationalDescriptor descriptor = new RelationalDescriptor();

    // SECTION: DESCRIPTOR
    descriptor.setJavaClass(org.eclipse.persistence.testing.models.readonly.Actor.class);
    Vector vector = new Vector();
    vector.addElement("RO_ACTOR");
    descriptor.setTableNames(vector);
    descriptor.addPrimaryKeyFieldName("RO_ACTOR.ACT_ID");

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

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

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

    // SECTION: DIRECTTOFIELDMAPPING
    org.eclipse.persistence.mappings.DirectToFieldMapping directtofieldmapping =
        new org.eclipse.persistence.mappings.DirectToFieldMapping();
    directtofieldmapping.setAttributeName("id");
    directtofieldmapping.setIsReadOnly(false);
    directtofieldmapping.setFieldName("RO_ACTOR.ACT_ID");
    descriptor.addMapping(directtofieldmapping);

    // SECTION: DIRECTTOFIELDMAPPING
    org.eclipse.persistence.mappings.DirectToFieldMapping directtofieldmapping1 =
        new org.eclipse.persistence.mappings.DirectToFieldMapping();
    directtofieldmapping1.setAttributeName("minimumSalary");
    directtofieldmapping1.setIsReadOnly(false);
    directtofieldmapping1.setFieldName("RO_ACTOR.MIN_SAL");
    descriptor.addMapping(directtofieldmapping1);

    // SECTION: DIRECTTOFIELDMAPPING
    org.eclipse.persistence.mappings.DirectToFieldMapping directtofieldmapping2 =
        new org.eclipse.persistence.mappings.DirectToFieldMapping();
    directtofieldmapping2.setAttributeName("name");
    directtofieldmapping2.setIsReadOnly(false);
    directtofieldmapping2.setFieldName("RO_ACTOR.ACT_NAME");
    descriptor.addMapping(directtofieldmapping2);

    // SECTION: MANYTOMANYMAPPING
    org.eclipse.persistence.mappings.ManyToManyMapping manytomanymapping =
        new org.eclipse.persistence.mappings.ManyToManyMapping();
    manytomanymapping.setAttributeName("movies");
    manytomanymapping.setIsReadOnly(true);
    manytomanymapping.setUsesIndirection(false);
    manytomanymapping.setReferenceClass(
        org.eclipse.persistence.testing.models.readonly.Movie.class);
    manytomanymapping.setIsPrivateOwned(false);
    manytomanymapping.setRelationTableName("ACT_MOV");
    manytomanymapping.addSourceRelationKeyFieldName("ACT_MOV.ACT_ID", "RO_ACTOR.ACT_ID");
    manytomanymapping.addTargetRelationKeyFieldName("ACT_MOV.MOV_ID", "RO_MOVIE.MOV_ID");
    descriptor.addMapping(manytomanymapping);

    // ManyToManyMapping: charities
    ManyToManyMapping charitiesMapping = new ManyToManyMapping();
    charitiesMapping.setAttributeName("charities");
    charitiesMapping.setIsReadOnly(false);
    charitiesMapping.setUsesIndirection(false);
    charitiesMapping.setReferenceClass(ReadOnlyCharity.class);
    charitiesMapping.setIsPrivateOwned(false);
    charitiesMapping.setRelationTableName("ACT_CHA");
    charitiesMapping.setSourceRelationKeyFieldName("ACT_ID");
    charitiesMapping.setTargetRelationKeyFieldName("CHARITY_ID");
    descriptor.addMapping(charitiesMapping);

    // OneToOneMapping: hollywoodAgent
    OneToOneMapping hollywoodAgentMapping = new OneToOneMapping();
    hollywoodAgentMapping.setAttributeName("hollywoodAgent");
    hollywoodAgentMapping.setIsReadOnly(false);
    hollywoodAgentMapping.setUsesIndirection(false);
    hollywoodAgentMapping.setReferenceClass(ReadOnlyHollywoodAgent.class);
    hollywoodAgentMapping.setIsPrivateOwned(false);
    hollywoodAgentMapping.addForeignKeyFieldName("HOLLYWOODAGENT_ID", "HOLLYWOODAGENT_ID");
    descriptor.addMapping(hollywoodAgentMapping);

    addDescriptor(descriptor);
  }
  /** modifications are marked with "bjv" */
  protected void buildSalesRepDescriptor() {
    RelationalDescriptor descriptor = new RelationalDescriptor();

    // SECTION: DESCRIPTOR
    descriptor.setJavaClass(salesRepClass());
    Vector vector = new Vector();
    vector.addElement("SALEREP");
    descriptor.setTableNames(vector);
    descriptor.addPrimaryKeyFieldName("SALEREP.ID");

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

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

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

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

    // SECTION: DIRECTTOFIELDMAPPING
    org.eclipse.persistence.mappings.DirectToFieldMapping directtofieldmapping1 =
        new org.eclipse.persistence.mappings.DirectToFieldMapping();
    directtofieldmapping1.setAttributeName("name");
    directtofieldmapping1.setIsReadOnly(false);
    directtofieldmapping1.setFieldName("SALEREP.NAME");
    descriptor.addMapping(directtofieldmapping1);

    // SECTION: MANYTOMANYMAPPING
    org.eclipse.persistence.mappings.ManyToManyMapping manytomanymapping =
        new org.eclipse.persistence.mappings.ManyToManyMapping();
    manytomanymapping.setAttributeName("orders");
    manytomanymapping.setIsReadOnly(true);
    manytomanymapping.setUsesIndirection(false);
    manytomanymapping.setReferenceClass(this.orderClass()); // bjv
    manytomanymapping.setIsPrivateOwned(false);
    manytomanymapping.useCollectionClass(java.util.Vector.class);
    manytomanymapping.setRelationTableName("ORDREP");
    manytomanymapping.addSourceRelationKeyFieldName("ORDREP.SALEREP_ID", "SALEREP.ID");
    manytomanymapping.addTargetRelationKeyFieldName("ORDREP.ORDER_ID", "ORD.ID");
    descriptor.addMapping(manytomanymapping);

    // SECTION: MANYTOMANYMAPPING
    org.eclipse.persistence.mappings.ManyToManyMapping manytomanymapping1 =
        new org.eclipse.persistence.mappings.ManyToManyMapping();
    manytomanymapping1.setAttributeName("orders2");
    manytomanymapping1.setIsReadOnly(true);
    manytomanymapping1.setUsesIndirection(false);
    manytomanymapping1.setReferenceClass(this.orderClass()); // bjv
    manytomanymapping1.setIsPrivateOwned(false);
    manytomanymapping1.useCollectionClass(java.util.Vector.class);
    manytomanymapping1.setRelationTableName("ORDREP2");
    manytomanymapping1.addSourceRelationKeyFieldName("ORDREP2.SALEREP_ID", "SALEREP.ID");
    manytomanymapping1.addTargetRelationKeyFieldName("ORDREP2.ORDER_ID", "ORD.ID");
    descriptor.addMapping(manytomanymapping1);
    addDescriptor(descriptor);
  }
  /**
   * TopLink generated method. <b>WARNING</b>: This code was generated by an automated tool. Any
   * changes will be lost when the code is re-generated
   */
  protected void buildMovieDescriptor() {
    RelationalDescriptor descriptor = new RelationalDescriptor();

    // SECTION: DESCRIPTOR
    descriptor.setJavaClass(org.eclipse.persistence.testing.models.readonly.Movie.class);
    Vector vector = new Vector();
    vector.addElement("RO_MOVIE");
    descriptor.setTableNames(vector);
    descriptor.addPrimaryKeyFieldName("RO_MOVIE.MOV_ID");

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

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

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

    // SECTION: AGGREGATEOBJECTMAPPING
    org.eclipse.persistence.mappings.AggregateObjectMapping aggregateobjectmapping =
        new org.eclipse.persistence.mappings.AggregateObjectMapping();
    aggregateobjectmapping.setAttributeName("studio");
    aggregateobjectmapping.setIsReadOnly(true);
    aggregateobjectmapping.setReferenceClass(
        org.eclipse.persistence.testing.models.readonly.Studio.class);
    aggregateobjectmapping.setIsNullAllowed(false);
    descriptor.addMapping(aggregateobjectmapping);

    // SECTION: DIRECTTOFIELDMAPPING
    org.eclipse.persistence.mappings.DirectToFieldMapping directtofieldmapping =
        new org.eclipse.persistence.mappings.DirectToFieldMapping();
    directtofieldmapping.setAttributeName("id");
    directtofieldmapping.setIsReadOnly(false);
    directtofieldmapping.setFieldName("RO_MOVIE.MOV_ID");
    descriptor.addMapping(directtofieldmapping);

    // SECTION: DIRECTTOFIELDMAPPING
    org.eclipse.persistence.mappings.DirectToFieldMapping directtofieldmapping1 =
        new org.eclipse.persistence.mappings.DirectToFieldMapping();
    directtofieldmapping1.setAttributeName("title");
    directtofieldmapping1.setIsReadOnly(false);
    directtofieldmapping1.setFieldName("RO_MOVIE.TITLE");
    descriptor.addMapping(directtofieldmapping1);

    // SECTION: MANYTOMANYMAPPING
    org.eclipse.persistence.mappings.ManyToManyMapping manytomanymapping =
        new org.eclipse.persistence.mappings.ManyToManyMapping();
    manytomanymapping.setAttributeName("actors");
    manytomanymapping.setIsReadOnly(false);
    manytomanymapping.setUsesIndirection(false);
    manytomanymapping.setReferenceClass(
        org.eclipse.persistence.testing.models.readonly.Actor.class);
    manytomanymapping.setIsPrivateOwned(true);
    manytomanymapping.setRelationTableName("ACT_MOV");
    manytomanymapping.addSourceRelationKeyFieldName("ACT_MOV.MOV_ID", "RO_MOVIE.MOV_ID");
    manytomanymapping.addTargetRelationKeyFieldName("ACT_MOV.ACT_ID", "RO_ACTOR.ACT_ID");
    descriptor.addMapping(manytomanymapping);

    // SECTION: ONETOONEMAPPING
    org.eclipse.persistence.mappings.OneToOneMapping onetoonemapping =
        new org.eclipse.persistence.mappings.OneToOneMapping();
    onetoonemapping.setAttributeName("promoter");
    onetoonemapping.setIsReadOnly(false);
    onetoonemapping.setUsesIndirection(false);
    onetoonemapping.setReferenceClass(
        org.eclipse.persistence.testing.models.readonly.Promoter.class);
    onetoonemapping.setIsPrivateOwned(false);
    onetoonemapping.addForeignKeyFieldName("RO_MOVIE.PROMO_ID", "RO_PROMO.PROMO_ID");
    descriptor.addMapping(onetoonemapping);
    addDescriptor(descriptor);
  }