Package info.bliki.gae.model

Examples of info.bliki.gae.model.AuthorityEntity


    ofy.put(page);
    return page;
  }

  public static AuthorityEntity update(AuthorityEntity role) {
    AuthorityEntity existingEntity = null;
    try {
      Objectify ofy = OS.begin();
      existingEntity = ofy.get(AuthorityEntity.class, role.getAuthorityId());
      existingEntity.setUsername(role.getUsername());
      existingEntity.setAuthority(role.getAuthority());
      ofy.put(existingEntity);
    } catch (EntityNotFoundException enf) {
    }
    return existingEntity;
  }
View Full Code Here


    Objectify ofy = OS.begin();
    ofy.delete(role);
  }

  public static void deleteByName(String name) {
    AuthorityEntity role;
    try {
      Objectify ofy = OS.begin();
      Query<AuthorityEntity> q = ofy.query(AuthorityEntity.class);
      // OS.createQuery(AuthorityEntity.class);
      q.filter("username", name);
View Full Code Here

      // status = DatabaseConnection.startTransaction();
      AuthorityService.deleteByName(username);
      for (String authority : roles) {
        this.validateAuthority(authority);
        // this.queryHandler().insertUserAuthority(username, authority, conn);
        AuthorityService.save(new AuthorityEntity(username, authority));
      }
    } catch (WikiException e) {
      // DatabaseConnection.rollbackOnException(status, e);
      throw e;
    }
View Full Code Here

TOP

Related Classes of info.bliki.gae.model.AuthorityEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.