src/org/ohmage/service/DocumentServices.java
public void ensureDocumentExistence(final String documentId) 
			throws ServiceException {
		
		try {
			if(! documentQueries.getDocumentExists(documentId)) {
				throw new ServiceException(
						ErrorCode.DOCUMENT_INVALID_ID, 
						"The document with the given document ID does not exist: " + 
							documentId);
			}
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
/**
	 * Ensures that a document exists. 
	 * 
	 * @param documentId The unique document ID for the document in question.
	 * 
	 * @throws ServiceException Thrown if the document doesn't exist or there 
	 * 							is an error.
	 */
Ensures that a document exists.

@param documentId The unique document ID for the document in question.

@throws ServiceException Thrown if the document doesn't exist or there
is an error.
Ensures that a document exists . @param documentId The unique document ID for the document in question . @throws ServiceException Thrown if the document doesn ' t exist or there is an error .
public void ensureDocumentExistence(final String documentId) 
			throws ServiceException {
		try {
			if(! documentQueries.getDocumentExists(documentId)) {
				throw new ServiceException(
						ErrorCode.DOCUMENT_INVALID_ID, 
						"The document with the given document ID does not exist: " + 
							documentId);
			}
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
public void ensureDocumentExistence ( final String documentId ) throws ServiceException { try { if ( ! documentQueries . getDocumentExists ( documentId ) ) { throw new ServiceException ( ErrorCode . DOCUMENT_INVALID_ID , "The document with the given document ID does not exist: " + documentId ) ; } } catch ( DataAccessException e ) { throw new ServiceException ( e ) ; } }
Ensures that a document exists.
Ensures that a document exists .