コード例 #1
0
 public boolean isRestaurantManagedByCentral(Key restaurant) {
   try {
     central = null;
     Query query = Datastore.getPersistanceManager().createNamedQuery("getRestaurantsCentral");
     query.setParameter("restaurant", restaurant);
     central = (Central) query.getSingleResult();
     return true;
   } catch (NoResultException e) {
     return false;
   }
 }
コード例 #2
0
 public Central getCentralByUniqueURL(String uniqueUrlName) {
   Query query = Datastore.getPersistanceManager().createNamedQuery("getCentralByUrl");
   query.setParameter("uniqueUrl", uniqueUrlName);
   return (Central) query.getSingleResult();
 }
コード例 #3
0
 public Central getCentralByUserBean(UserBean login) {
   Query query = Datastore.getPersistanceManager().createNamedQuery("getCentralByUserBean");
   query.setParameter("login", login);
   return (Central) query.getSingleResult();
 }