Project

General

Profile

« Previous | Next » 

Revision 5189

Added by daigle over 14 years ago

Add comments

View differences:

AccessionNumber.java
146 146
        throw new AccessionNumberException
147 147
                  ("Revision number is required");
148 148

  
149
      // Accession# is not current (not in xml_documents); throw an exception
149
      // Accession# is not current (not in xml_documents or xml_revisions); throw an exception
150 150
      } else if ( !accNumberIsCurrent(docid) ) {
151 151
        throw new AccessionNumberException
152 152
                  ("Document not found for Accession number " + docid);
......
205 205
    return hasAccNumber;
206 206
  }
207 207

  
208
  // check for existence of Accesssion Number in xml_documents table
208
  // Check for existence of Accesssion Number in xml_documents or xml_revisions
209
  // table.  We check xml_revisions because document may have been deleted, which 
210
  // will remove it from xml_documents, but a revision still exists.
209 211
  private boolean accNumberIsCurrent(String accNumber) throws SQLException {
210 212

  
211 213
    boolean hasCurrentAccNumber = false;

Also available in: Unified diff