/**
   * Create a SubscriptionDescription. The concrete subclass must call this constructor.
   *
   * @param key the primary key of the SubscriptionDescription
   * @param partnerId composite super-key attribute that uniquely identifies child combined with
   *     child sub-key and any other parent super-keys
   * @param descriptionType the type of description: Default Individual Institution Commercial
   * @param header the header text for the section display
   */
  public AbstractSubscriptionDescription(
      IPrimaryKey key,
      java.lang.String partnerId,
      java.lang.String descriptionType,
      java.lang.String header) {
    this.key = key;

    this.partnerId = partnerId;

    this.descriptionType = descriptionType;

    if (descriptionType == null) {
      throw new com.poesys.db.InvalidParametersException(
          "descriptionType is required for " + key.getValueList());
    }

    this.header = header;

    if (header == null) {
      throw new com.poesys.db.InvalidParametersException(
          "header is required for " + key.getValueList());
    }

    // Setter arrays (create if null)
    if (querySetters == null) {
      querySetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();
    }
    if (insertQuerySetters == null) {
      insertQuerySetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();
    }
    if (insertSetters == null) {
      insertSetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();
    }
    if (preSetters == null) {
      preSetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();
    }
    if (postSetters == null) {
      postSetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();
    }
    if (readObjectSetters == null) {
      readObjectSetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();
    }

    // Add the setters for the partner property.
    querySetters.add(new QueryPartnerSetter());
    // Set the object property primary key with a factory method.
    // TODO: fix problem with foreign keys/associated keys VND-168
    // partnerKey = org.phoenixbioinformatics.api.db.api.ApiFactory.getPartnerPrimaryKey();
    insertSetters.add(new InsertPartnerSetter());
    preSetters.add(new InsertPartnerSetter());
    postSetters.add(new UpdatePartnerSetter());

    // Add the many-to-many collection setters for the items property.
    querySetters.add(new QueryItemsSetter());
    readObjectSetters.add(new ReadItemsSetter());
    insertSetters.add(new InsertItemsSetter());
    postSetters.add(new UpdateItemsSetter());
    abstractClass = false;
    createInserters();
  }
 public String getSql(IPrimaryKey key) {
   return SQL + key.getSqlWhereExpression("");
 }