code: @SuppressWarnings("unchecked")
      public ManagedUser getManagedUser(final String username) {
          final Query query = pm.newQuery(ManagedUser.class, "username == :username");
          final List<ManagedUser> result = (List<ManagedUser>) query.execute(username);
          return Collections.isEmpty(result) ? null : result.get(0);
      }
docs: Returns a ManagedUser with the specified username. If the username
  does not exist, returns null.
  @param username The username to retrieve
  @return a ManagedUser
  @since 1.0.0