use of com.pratilipi.data.type.gae.AuditLogEntity in project pratilipi by Pratilipi.
the class TestApi method get.
@Get
public static GenericResponse get(GenericRequest request) throws UnexpectedServerException {
String primaryContentId = 4920371378651136L + "";
Query<AuditLogEntity> query = ObjectifyService.ofy().load().type(AuditLogEntity.class).filter("PRIMARY_CONTENT_ID", primaryContentId).filter("CREATION_DATE >=", new Date(new Date().getTime() - TimeUnit.DAYS.toMillis(1))).order("CREATION_DATE").chunk(100).limit(100);
List<AuditLog> responseList = new ArrayList<AuditLog>();
QueryResultIterator<AuditLogEntity> iterator = query.iterator();
while (iterator.hasNext()) responseList.add(iterator.next());
System.out.println(responseList.size());
return new GenericResponse();
}
Aggregations