/** INTERNAL: Process the primary key join columms for this accessors annotated element. */
  protected List<PrimaryKeyJoinColumnMetadata> processPrimaryKeyJoinColumns(
      PrimaryKeyJoinColumnsMetadata primaryKeyJoinColumns) {
    // If the primary key join columns were not specified (that is empty),
    // this call will add any defaulted columns as necessary.
    List<PrimaryKeyJoinColumnMetadata> pkJoinColumns = primaryKeyJoinColumns.values(m_descriptor);

    if (m_descriptor.hasCompositePrimaryKey()) {
      // Validate the number of primary key fields defined.
      if (pkJoinColumns.size() != m_descriptor.getPrimaryKeyFields().size()) {
        throw ValidationException.incompletePrimaryKeyJoinColumnsSpecified(getAnnotatedElement());
      }

      // All the primary and foreign key field names should be specified.
      for (PrimaryKeyJoinColumnMetadata pkJoinColumn : pkJoinColumns) {
        if (pkJoinColumn.isPrimaryKeyFieldNotSpecified()
            || pkJoinColumn.isForeignKeyFieldNotSpecified()) {
          throw ValidationException.incompletePrimaryKeyJoinColumnsSpecified(getAnnotatedElement());
        }
      }
    } else {
      if (pkJoinColumns.size() > 1) {
        throw ValidationException.excessivePrimaryKeyJoinColumnsSpecified(getAnnotatedElement());
      }
    }

    return pkJoinColumns;
  }
 /**
  * INTERNAL: Common table processing for table, secondary table, join table and collection table.
  */
 protected void processTable(TableMetadata table, String defaultName) {
   getProject()
       .processTable(
           table, defaultName, m_descriptor.getDefaultCatalog(), m_descriptor.getDefaultSchema());
 }
 /** INTERNAL: Return the java class associated with this accessor's descriptor. */
 public MetadataClass getJavaClass() {
   return m_descriptor.getJavaClass();
 }