Revision 5201
Added by daigle over 14 years ago
DBUtil.java | ||
---|---|---|
823 | 823 |
return MAXMUM; |
824 | 824 |
} |
825 | 825 |
} |
826 |
|
|
827 |
/** |
|
828 |
* Method to return max rev number in xml_revision for given docid. |
|
829 |
* @param docId |
|
830 |
* @return integer that holds max revision number |
|
831 |
* @throws SQLException |
|
832 |
*/ |
|
833 |
public static int getMaxRevFromRevisionTable(String docIdWithoutRev) throws SQLException |
|
834 |
{ |
|
835 |
int rev = NONEEXIST; |
|
836 |
|
|
837 |
Vector<Integer> revList = getRevListFromRevisionTable(docIdWithoutRev); |
|
838 |
|
|
839 |
for (Integer currentRev : revList) { |
|
840 |
if (currentRev > rev) { |
|
841 |
rev = currentRev; |
|
842 |
} |
|
843 |
} |
|
844 |
|
|
845 |
return rev; |
|
846 |
} |
|
826 | 847 |
|
827 | 848 |
/** |
828 | 849 |
* Method to return a rev list in xml_revision for given docid. |
Also available in: Unified diff
Get the latest revision from metacat when a modify call docid does not have a revision number.