Package com.googlecode.objectify

Examples of com.googlecode.objectify.Objectify


    return existingEntity;
  }

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


    WikiGroup role = (WikiGroup) cache.get(name);
    if (role != null) {
      return role;
    }
    try {
      Objectify ofy = OS.begin();
      // OQuery<WikiGroup> q = OS.createQuery(WikiGroup.class);
      Query<WikiGroup> q = ofy.query(WikiGroup.class);
      q.filter("name", name);
      // role = ofy.prepare(q).asSingle();
      role = q.get();
      cache.put(role.getName(), role);
      return role;
View Full Code Here

    }
    return null;
  }

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

      // e.printStackTrace();
    }
  }

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

  }

  public static VirtualWiki update(VirtualWiki role) {
    VirtualWiki existingEntity = null;
    try {
      Objectify ofy = OS.begin();
      existingEntity = ofy.get(VirtualWiki.class, role.getVirtualWikiId());
      existingEntity.setName(role.getName());
      existingEntity.setDefaultTopicName(role.getDefaultTopicName());
      ofy.put(existingEntity);
      cache.put(existingEntity.getName(), existingEntity);
    } catch (EntityNotFoundException enf) {
    }
    return existingEntity;
  }
View Full Code Here

    return existingEntity;
  }

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

    VirtualWiki role = (VirtualWiki) cache.get(name);
    if (role != null) {
      return role;
    }
    try {
      Objectify ofy = OS.begin();
      // OQuery<VirtualWiki> q = OS.createQuery(VirtualWiki.class);
      Query<VirtualWiki> q = ofy.query(VirtualWiki.class);
      q.filter("title", name);
      // role = ofy.prepare(q).asSingle();
      // cache.put(role.getName(), role);
      return q.get();
    } catch (NullPointerException npe) {
View Full Code Here

    }
    return null;
  }

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

      // e.printStackTrace();
    }
  }

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

  // return existingEntity;
  // }

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

TOP

Related Classes of com.googlecode.objectify.Objectify

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.