com.jamasoftware.contour.review.dao
Interface RevisionDao


public interface RevisionDao


Method Summary
 void deleteRevision(java.lang.Integer revisionId)
           
 void deleteRevision(Revision revision)
           
 java.util.List<Revision> getAllExpiredActiveRevisions()
           
 java.util.List<java.lang.Integer> getChangedRevisionItemIds(java.lang.Integer revisionId)
          Obtains the Revision_Item ids for those items whose associated Documents have been updated from the immediately preceding Revision.
 java.util.List<java.lang.Integer> getNonLatestRevisionItemIds(java.lang.Integer revisionId)
          Obtains the Revision_Item ids for those associated with Documents that are not the more recent versions.
 Revision getRevision(java.lang.Integer revisionId)
           
 java.util.List<com.jamasoftware.contour.review.dto.RevisionDocumentTypeDTO> getRevisionDocumentTypes(Revision revision)
           
 java.util.List<com.jamasoftware.contour.review.dto.RevisionDocumentTypeDTO> getRevisionDocumentTypesIncludingLayoutFields(Revision revision, com.jamasoftware.contour.service.assembler.DocumentTypeAssembler documentTypeAssembler)
           
 java.util.List<java.lang.String> getRevisionEmailAddresses(java.lang.Integer revisionId)
          Gets a list of the e-mail addresses for everyone in the review, including reviewers, approvers and author(s).
 java.util.List<Revision> getRevisionsInReview(java.lang.Integer reviewId)
           
 java.util.List<Revision> getRevisionsToNotify()
           
 java.lang.Integer getVersionIdFromPreviousRevision(java.lang.Integer revisionItemId)
          For the given Revision_Item, this method gets the Revision_Item from the Revision immediately prior to the one that the passed in Revision_Item is associated with, and then returns the ContourItem associated with it.
 void populateNumbers(com.jamasoftware.contour.review.dto.RevisionStatsDTO revisionStats)
          Populates the numbers of the RevisionStatsDTO in an efficient way
 Revision saveRevision(Revision revision)
           
 

Method Detail

getRevision

Revision getRevision(java.lang.Integer revisionId)

getRevisionsInReview

java.util.List<Revision> getRevisionsInReview(java.lang.Integer reviewId)

getAllExpiredActiveRevisions

java.util.List<Revision> getAllExpiredActiveRevisions()

saveRevision

Revision saveRevision(Revision revision)

deleteRevision

void deleteRevision(java.lang.Integer revisionId)

getRevisionDocumentTypes

java.util.List<com.jamasoftware.contour.review.dto.RevisionDocumentTypeDTO> getRevisionDocumentTypes(Revision revision)

getRevisionDocumentTypesIncludingLayoutFields

java.util.List<com.jamasoftware.contour.review.dto.RevisionDocumentTypeDTO> getRevisionDocumentTypesIncludingLayoutFields(Revision revision,
                                                                                                                          com.jamasoftware.contour.service.assembler.DocumentTypeAssembler documentTypeAssembler)

populateNumbers

void populateNumbers(com.jamasoftware.contour.review.dto.RevisionStatsDTO revisionStats)
Populates the numbers of the RevisionStatsDTO in an efficient way

Parameters:
revisionStats - The stats to populate (must have a non-null id)

getRevisionsToNotify

java.util.List<Revision> getRevisionsToNotify()

getChangedRevisionItemIds

java.util.List<java.lang.Integer> getChangedRevisionItemIds(java.lang.Integer revisionId)
Obtains the Revision_Item ids for those items whose associated Documents have been updated from the immediately preceding Revision. If there are no previous Revisions, this will be an empty list.

Parameters:
revisionId - The id of a Revision]
Returns:
A List of Revision_Item ids that have been updated since the last Revision

getVersionIdFromPreviousRevision

java.lang.Integer getVersionIdFromPreviousRevision(java.lang.Integer revisionItemId)
For the given Revision_Item, this method gets the Revision_Item from the Revision immediately prior to the one that the passed in Revision_Item is associated with, and then returns the ContourItem associated with it. The idea being that the user of this method expects that such a ContourItem will be different than the ContourItem associated with the given Revision_Item already. The user may know this by, for example, examining the ids given by getChangedRevisionItemIds(Integer)

Parameters:
revisionItemId - The id of a Revision_Item
Returns:
The ContourItem associated with the corresponding Revision_Item from the immediately previous Revision

getNonLatestRevisionItemIds

java.util.List<java.lang.Integer> getNonLatestRevisionItemIds(java.lang.Integer revisionId)
Obtains the Revision_Item ids for those associated with Documents that are not the more recent versions.

Parameters:
revisionId - The id of a Revision
Returns:
The list of non-latest ids of Revision_Items

deleteRevision

void deleteRevision(Revision revision)
Parameters:
revision - The Revision to delete

getRevisionEmailAddresses

java.util.List<java.lang.String> getRevisionEmailAddresses(java.lang.Integer revisionId)
Gets a list of the e-mail addresses for everyone in the review, including reviewers, approvers and author(s).

Parameters:
revisionId - id of a Revision
Returns:
list of emails


Copyright (c) 2010 Jama Software, Inc. All Rights Reserved.