Preconditions.checkNotNull(userEmail, "Null email");
log.info("Fetching user credentials for email " + userEmail);
Entity e = new RetryHelper().run(
new RetryHelper.Body<Entity>() {
@Override public Entity run() throws RetryableFailure, PermanentFailure {
CheckedPreparedQuery q = datastore.prepareNontransactionalQuery(
new Query(ENTRY_KIND).setFilter(
FilterOperator.EQUAL.of(USER_EMAIL_PROPERTY, userEmail)));
return q.asSingleEntity();
}
});
return convertEntity(e);
}