Package com.google.appengine.api.datastore

Examples of com.google.appengine.api.datastore.PreparedQuery.asSingleEntity()


    DatastoreService datastore = DatastoreSingleton.getInstance();
    Filter loginFilter = new FilterPredicate("login", FilterOperator.EQUAL, loginOrEmail);
    Filter emailFilter = new FilterPredicate("email", FilterOperator.EQUAL, loginOrEmail);
    Query q = new Query("User").setFilter(CompositeFilterOperator.or(loginFilter, emailFilter));
    PreparedQuery pq = datastore.prepare(q);
    Entity e = pq.asSingleEntity();
    if(e == null) {
      return null;
    }
    return createModel(e);
  }
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.