The trick is to use Entity.KEY_RESERVED_PROPERTY instead of the property name:
Query q = new Query("MyEntity"); q.setFilter(new Query.FilterPredicate(Entity.KEY_RESERVED_PROPERTY, Query.FilterOperator.GREATER_THAN, KeyFactory.createKey("MyEntity", "somevalue")));
All MyEntity entities with a key greater than somevalue will be found somevalue .
source share