code: @SuppressWarnings("unchecked")
  	public static AppEngineGlobalTransaction toTransaction(
  			Iterable<Entity> transactions, AppEngineDatastoreService datastore) {
  		AppEngineGlobalTransaction transaction = null;
  		Map<Long, Entity> logs = new TreeMap<Long, Entity>();
  		
  		for (Entity tx : transactions) {
  			if (tx.getKind().equals(TRANSACTION_KIND)) {
  				transaction = new AppEngineGlobalTransaction(tx.getKey().getName(), null, null);
  			} else if (tx.getKind().equals(LOG_KIND)) {
  				logs.put(tx.getKey().getId(), tx);
  			}
  		}
  		
  		for (Long sequence : logs.keySet()) {
  			Entity log = logs.get(sequence);
  			List<Entity> entities = new ArrayList<Entity>();
  			
  			for (Blob proto : (List<Blob>) log.getProperty(PROTO_PROPERTY)) {
  				OnestoreEntity.EntityProto entityProto = new OnestoreEntity.EntityProto();
  				entityProto.mergeFrom(proto.getBytes());
  				entities.add(EntityTranslator.createFromPb(entityProto));
  			}
  			
  			try {
  				Log l = new Log(sequence, 
  						Enum.valueOf(Log.Operation.class, (String) log.getProperty(OPERATION_PROPERTY)), 
  						toObject(Class.forName((String) log.getProperty(CLASS_PROPERTY)), 
  								entities, new HashMap<com.google.appengine.api.datastore.Key, Object>(0), datastore));
  				l.state(State.PREPARED);
  				transaction.logs().add(l);
  			} catch (ClassNotFoundException e) {
  				throw new UncheckedException(e);
  			}
  		}
  		
  		return transaction;
  	}
docs: Translates Google App Engine Datastore entities to Acid House
  {@code AppEngineTransaction} entity with {@code AppEngineDatastoreService}.
  
  @param transactions Google App Engine Datastore entities.
  @param datastore {@code AppEngineDatastoreService}.
  @return Acid House {@code AppEngineTransaction} entity translated from
  Google App Engine Datastore entities.