public static PropertyEntity findByKey(String key) { try { Objectify ofy = OS.begin(); return ofy.get(PropertyEntity.class, key); } catch (EntityNotFoundException enf) { } return null; }
public static void saveAll(Properties properties) { PropertyEntity page; Objectify ofy = OS.begin(); Enumeration<Object> keyEnum = properties.keys(); while (keyEnum.hasMoreElements()) { String key = (String) keyEnum.nextElement(); String value = (String) properties.get(key.toString()); if (value != null) { page = new PropertyEntity(key, value); ofy.put(page); } } }
public static QueryResultIterable<PropertyEntity> getAll() { Objectify ofy = OS.begin(); Query<PropertyEntity> q = ofy.query(PropertyEntity.class); return q; }
public static void delete(PropertyEntity property) { Objectify ofy = OS.begin(); ofy.delete(property); }
public static PropertyEntity save(PropertyEntity page) { Objectify ofy = OS.begin(); ofy.put(page); return page; }