Acid House is currently in incubation.Acid House is Google App Engine Datastore transaction and command manipulation API developed by Eiichiro Uchiumi (Eiichiro.org) and can be performed on JDK 6 and later Java platform. Acid House's goal is to free Google App Engine Java developers from several
... [More]
App Engine Datastore constraints.
Acid House includes the following features:
Transaction control in multiple entity groups Typesafe Command builder API Aggregation API
Basic update operation// Construct a new DatastoreSession instance.
DatastoreSession session = new JDODatastoreSession("transactions-optional");
// Begin transactional session.
session.begin();
// Get entities corresponding to be updated.
SimpleJDOEntity updatedEntity = session.get(SimpleJDOEntity.class, "entity1.key");
SimpleJDOEntity updatedEntity2 = session.get(SimpleJDOEntity.class, "entity2.key");
updatedEntity.setValue("entity1.value_updated");
updatedEntity2.setValue("entity2.value_updated");
try {
// Update entity instances in transaction.
session.update(updatedEntity);
session.update(updatedEntity2);
// Commit transactional session.
session.commit();
} catch (ConsistencyException e) {
// Begin compensation transaction if the data consistency is broken.
session.cancel();
} catch (Exception e) {
// Roll back transactional session if any exception has occurred.
session.rollback();
} finally {
// Close DatastoreSession.
session.close();
}Get list commandimport static org.eiichiro.acidhouse.metamodel.Metamodels.*;
// Generate metamodel instance from the entity class that you attempt to get.
ParentJDOEntity_ parentJDOEntity = metamodel(ParentJDOEntity.class);
// Construct a new DatastoreSession instance.
DatastoreSession session = new JDODatastoreSession("transactions-optional");
// Build GetListCommand to get entity list of ParentJDOEntity kind.
List entities = session.get(ParentJDOEntity.class)
// Filter entities to be retrieved as their 'value' property is
// greater than "value5".
.filter(parentJDOEntity.value.greaterThan("value5"),
// Filter entities to be retrieved as their 'child.value'
// property is "child.value7" or "child.value8" or
// "child.value9".
parentJDOEntity.child.value.in("child.value7",
"child.value8",
"child.value9"))
// Qualify the result range from index 0 to "no upper limit".
.range(0, GetListCommand.NO_UPPER_LIMIT)
// Sort by 'key' property in descending order
.sort(parentJDOEntity.key.desc)
// Execute command.
.execute();Summary aggregationimport static org.eiichiro.acidhouse.Aggregations.*;
import static org.eiichiro.acidhouse.metamodel.Metamodels.*;
// Generate metamodel instance from the entity class that you attempt to
// aggregate.
SimpleJDOEntity_ simpleJDOEntity = metamodel(SimpleJDOEntity.class);
// Construct a new DatastoreSession instance.
DatastoreSession session = new JDODatastoreSession("transactions-optional");
// Build GetScalarCommand to aggregate sum of 'value2' property.
// Pass a Sum (Aggregation extension) instance to DatastoreSession#get method
// by invoking Aggregations#sum method.
int sum = session.get(sum(simpleJDOEntity.value2))
// Filter entities to be retrieved as their 'value2' property is
// greater than 8.
.filter(simpleJDOEntity.value2.greaterThan(8))
// Execute command.
.execute();NewsDec 19, 2009 - Acid House 0.0.6 has been releasedAcid House 0.0.6 has been released. This is unstable release for "Command builder API" and "Aggregation API".
Nov 12, 2009 - Acid House 0.0.3 has been releasedAcid House 0.0.3 has been released. Added unique key constraint verification in put operation.
Nov 7, 2009 - Acid House 0.0.2 has been releasedNow, Acid House, Google App Engine Datastore Transaction and Query Manipulator 0.0.2 has been released. This is a first stable release and currently supports atomic transactional operation in multiple entity groups.
Test code and Javadoc have been available since this release and the next release is planned to be unstable milestone for "Typesafe criteria query".
Sep 23, 2009 - Acid House has been launchedAcid House has been launched. Currently supported Atomic transaction control in multiple entity group for simple JDO entity only. [Less]