src/org/ohmage/query/impl/DocumentQueries.java
private void updatePrivacyState(String documentId, Document.PrivacyState privacyState) throws CacheMissException, DataAccessException {
		if(privacyState == null) {
			return;
		}
		
		// Update the document's privacy state.
		try {
			getJdbcTemplate().update(SQL_UPDATE_PRIVACY_STATE, new Object[] { privacyState.toString(), documentId });
		}
		catch(org.springframework.dao.DataAccessException e) {
			throw new DataAccessException("Error executing SQL '" + SQL_UPDATE_PRIVACY_STATE + "' with parameters: " +
					privacyState + ", " + documentId, e);
		}
	}
/**
	 * Updates the privacy state of the document if one exists in the request.
	 * 
	 * @param request The request containing the new privacy state if one
	 * 				  exists.
	 * 
	 * @throws CacheMissException The privacy state is unknown to the cache.
	 * 							  This should never happen as it has already
	 * 							  been validated.
	 */
Updates the privacy state of the document if one exists in the request.

@param request The request containing the new privacy state if one
exists.

@throws CacheMissException The privacy state is unknown to the cache.
This should never happen as it has already
been validated.
Updates the privacy state of the document if one exists in the request . @param request The request containing the new privacy state if one exists . @throws CacheMissException The privacy state is unknown to the cache . This should never happen as it has already been validated .
private void updatePrivacyState(String documentId, Document.PrivacyState privacyState) throws CacheMissException, DataAccessException {
		if(privacyState == null) {
			return;
		}
		try {
			getJdbcTemplate().update(SQL_UPDATE_PRIVACY_STATE, new Object[] { privacyState.toString(), documentId });
		}
		catch(org.springframework.dao.DataAccessException e) {
			throw new DataAccessException("Error executing SQL '" + SQL_UPDATE_PRIVACY_STATE + "' with parameters: " +
					privacyState + ", " + documentId, e);
		}
	}
private void updatePrivacyState ( String documentId , Document . PrivacyState privacyState ) throws CacheMissException , DataAccessException { if ( privacyState == null ) { return ; } try { getJdbcTemplate ( ) . update ( SQL_UPDATE_PRIVACY_STATE , new Object [ ] { privacyState . toString ( ) , documentId } ) ; } catch ( org . springframework . dao . DataAccessException e ) { throw new DataAccessException ( "Error executing SQL '" + SQL_UPDATE_PRIVACY_STATE + "' with parameters: " + privacyState + ", " + documentId , e ) ; } }
Updates the privacy state of the document if one exists in the request.
Updates the privacy state of the document if one exists in the request .
// Update the document's privacy state.