class EntityServiceImpl implements EntityService {

    @Override
    public Entity updateEntity(Entity entity) throws EntityNotFoundException {
        AppEngineHelper.disableApiHooks();

        entity.getKey();

        DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
        datastore.put(entity);

        // This is required because put does not update the prototype in the reference
        return datastore.get(entity.getKey());
    }

    @Inject  EntityServiceImpl(
            DatastoreHelper datastoreHelper);

}