Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Creative commons Attribution-NonCommercial license. http://creativecommons.org/licenses/by-nc/2.5/au/deed.en_GB NO WARRANTY IS GIVEN OR IMPLIED, USE AT YOUR OWN RISK.
 
 package base.jee.api.sql.util;
 
Lookup the person ID associated with a token.
public class PersonUuidForToken {
	//TODO: Fix class name
Check if the given token is allocated the specified role.

Parameters:
c
token
role
Returns:
Returns zero, or the personId associated with this token.
Throws:
java.sql.SQLException
	public static UUID personUuidForToken(Connection cString tokenthrows SQLException {
		UUID personUuid = null;
		PreparedStatement s = null;
				"select t.person_uuid "+
				"from token t "+
				"where t.token=?"
				);
		s.setString(1, token);
		if(r.next()) {
			personUuid = UUID.fromString(r.getString(1));
		}
		r.close();
		s.close();
		return personUuid;
	}
New to GrepCode? Check out our FAQ X