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.cassandra.util;
 
Lookup the person ID associated with an LDAP username.
Lookup the person ID associated with an LDAP username.

Parameters:
s
ldapUsername username to lookup = * @return Returns zero, or the personId associated with this email address.
Throws:
java.sql.SQLException
	public static UUID getPersonUuidForLdapUsername(Session sString ldapUsernamethrows SQLException {
		UUID uuid = null;
		PreparedStatement p = s.prepare("select uuid from person where username=?");
		ResultSet r = s.execute(p.bind(ldapUsername));
		for(Row row : r) {
			return row.getUUID(1);
		}
		return null;
	}
New to GrepCode? Check out our FAQ X