try {
PersistentAccess pa = PersistentAccessFactory.getInstance();
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("timestamp", date);
params.put("now", new Date());
List<Persistent> l = pa.search("from Usuario where timestamp <= :now and timestamp >= :timestamp",params);
for (Persistent persistent : l) {
Usuario user = (Usuario) persistent;
users.add(user);
}