/**
 * Created by vadim on 10/28/14.
 */
function all(type) {
  var count = 0;
  var res = "";
  var iter = txn.getAll(type).iterator();
  while (count++ < 1000 && iter.hasNext()) {
    var item = iter.next();
    res += entityToString(item) + "\n\r";
  }

  if (iter.hasNext()) {
    res += "And more...\n\r"
  }

  res += "Total " + txn.getAll(type).size();
  return res;
}

function entityToString(item) {
  var res = item.getType() + " " + item.getId() + "\n\r";

  var properties = item.getPropertyNames().iterator();
  while (properties.hasNext()) {
    var property = properties.next();
    res += property + "=[" + item.getProperty(property) + "]\n\r"
  }

  return res;
}

@@ -1,44 +1,110 @@
-/**%0A * Created by vadim on 10/28/14.%0A */
+var MAX_ITEMS_TO_PRINT = 1000;%0A%0Afunction all(type) %7B%0A  return entityIterableToString(txn.getAll(type));%0A%7D%0A
 %0Afun
@@ -113,118 +113,291 @@
 ion 
-all
+find
 (type
-) %7B%0A  var count = 0;%0A  var res = %22%22;%0A  var iter = txn.getAll(type).iterator();%0A  while (count++ %3C 1000
+, propertyName, propertyValue) %7B%0A  return entityIterableToString(txn.find(type, propertyName, propertyValue));%0A%7D%0A%0Afunction entityIterableToString(entityIterable) %7B%0A  var iter = entityIterable.iterator();%0A  var count = 0;%0A  var res = %22%22;%0A  while (count++ %3C MAX_ITEMS_TO_PRINT
  && 
@@ -567,32 +567,30 @@
 tal %22 + 
-txn.getAll(type)
+entityIterable
 .size();

add find method for console