src/org/ohmage/service/UserAnnotationServices.java
public void verifyUserOwnsAnnotation(final String username, final UUID annotationId) throws ServiceException {
		try {
			if(! annotationQueries.userOwnsAnnotation(username, annotationId)) {
				throw new ServiceException(ErrorCode.ANNOTATION_INSUFFICIENT_PERMISSIONS, 
				"The logged-in user does not have the permissions to update a survey response annotation.");
			}
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
/**
	 * Dispatches to the data layer to check whether the user
	 * is the owner of the annotation. Only supervisors can 
	 * create annotations and then they are the only users
	 * (aside from admins) that can read those annotations.
	 * 
	 * @param username       The username in question.
	 * @param annotationId   The annotation in question.
	 *
	 * @throws DataAccessException if an error occurs.
	 */
Dispatches to the data layer to check whether the user
is the owner of the annotation. Only supervisors can
create annotations and then they are the only users
(aside from admins) that can read those annotations.

@param username       The username in question.
@param annotationId   The annotation in question.

@throws DataAccessException if an error occurs.
Dispatches to the data layer to check whether the user is the owner of the annotation . Only supervisors can create annotations and then they are the only users ( aside from admins ) that can read those annotations . @param username The username in question . @param annotationId The annotation in question . @throws DataAccessException if an error occurs .
public void verifyUserOwnsAnnotation(final String username, final UUID annotationId) throws ServiceException {
		try {
			if(! annotationQueries.userOwnsAnnotation(username, annotationId)) {
				throw new ServiceException(ErrorCode.ANNOTATION_INSUFFICIENT_PERMISSIONS, 
				"The logged-in user does not have the permissions to update a survey response annotation.");
			}
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
public void verifyUserOwnsAnnotation ( final String username , final UUID annotationId ) throws ServiceException { try { if ( ! annotationQueries . userOwnsAnnotation ( username , annotationId ) ) { throw new ServiceException ( ErrorCode . ANNOTATION_INSUFFICIENT_PERMISSIONS , "The logged-in user does not have the permissions to update a survey response annotation." ) ; } } catch ( DataAccessException e ) { throw new ServiceException ( e ) ; } }
Dispatches to the data layer to check whether the user
 is the owner of the annotation.
Dispatches to the data layer to check whether the user is the owner of the annotation .