}
public static void deleteByUsername(String username) {
UserAuthorityEntity role;
try {
Objectify ofy = OS.begin();
// OQuery<UserAuthorityEntity> q =
// OS.createQuery(UserAuthorityEntity.class);
Query<UserAuthorityEntity> q = ofy.query(UserAuthorityEntity.class);
q.filter("username", username);
ofy.delete(q);
// Iterable<UserAuthorityEntity> it = ofy.prepare(q).asIterable();
// for (UserAuthorityEntity groupAuthorityEntity : it) {
// ofy.delete(groupAuthorityEntity);
// }
} catch (NullPointerException npe) {