Examples of Objectify


Examples of com.googlecode.objectify.Objectify

      // e.printStackTrace();
    }
  }

  public static WikiUserDetails save(WikiUserDetails wikiUser) {
    Objectify ofy = OS.begin();
    ofy.put(wikiUser);
    WIKIUSER_CACHE.put(wikiUser.getUsername(), wikiUser);
    return wikiUser;
  }
View Full Code Here

Examples of com.googlecode.objectify.Objectify

    return wikiUser;
  }

  public static void delete(WikiUserDetails wikiUser) {
    WIKIUSER_CACHE.remove(wikiUser.getUsername());
    Objectify ofy = OS.begin();
    ofy.delete(wikiUser);
  }
View Full Code Here

Examples of com.googlecode.objectify.Objectify

  public static WikiUserDetails findByName(String username) {
    if (username==null) {
      return null;
    }
    Objectify ofy = OS.begin();
    return ofy.find(WikiUserDetails.class, username);
  }
View Full Code Here

Examples of com.googlecode.objectify.Objectify

    Objectify ofy = OS.begin();
    return ofy.find(WikiUserDetails.class, username);
  }

  public static QueryResultIterable<WikiUserDetails> getAll() {
    Objectify ofy = OS.begin();
    Query<WikiUserDetails> q = ofy.query(WikiUserDetails.class);
    return q;
  }
View Full Code Here

Examples of com.googlecode.objectify.Objectify

import com.googlecode.objectify.Query;

public class UserAuthorityService {

  public static UserAuthorityEntity save(UserAuthorityEntity page) {
    Objectify ofy = OS.begin();
    ofy.put(page);
    return page;
  }
View Full Code Here

Examples of com.googlecode.objectify.Objectify

  // }
  // return existingEntity;
  // }

  public static void delete(UserAuthorityEntity role) {
    Objectify ofy = OS.begin();
    ofy.delete(role);
  }
View Full Code Here

Examples of com.googlecode.objectify.Objectify

  }

  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) {
View Full Code Here

Examples of com.googlecode.objectify.Objectify

    } catch (NullPointerException npe) {
    }
  }

  public static QueryResultIterable<UserAuthorityEntity> getAll() {
    Objectify ofy = OS.begin();
    Query<UserAuthorityEntity> q = ofy.query(UserAuthorityEntity.class);
    return q;
  }
View Full Code Here

Examples of com.googlecode.objectify.Objectify

      // e.printStackTrace();
    }
  }

  public static WikiGroup save(WikiGroup page) {
    Objectify ofy = OS.begin();
    ofy.put(page);
    return page;
  }
View Full Code Here

Examples of com.googlecode.objectify.Objectify

  }

  public static WikiGroup update(WikiGroup role) {
    WikiGroup existingEntity = null;
    try {
      Objectify ofy = OS.begin();
      existingEntity = ofy.get(WikiGroup.class, role.getGroupId());
      existingEntity.setName(role.getName());
      existingEntity.setDescription(role.getDescription());
      ofy.put(existingEntity);
      cache.put(existingEntity.getName(), existingEntity);
    } catch (EntityNotFoundException enf) {
    }
    return existingEntity;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.