Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 68517 invoked from network); 5 Jul 2009 23:47:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Jul 2009 23:47:17 -0000 Received: (qmail 9522 invoked by uid 500); 5 Jul 2009 23:47:26 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 9436 invoked by uid 500); 5 Jul 2009 23:47:26 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 9426 invoked by uid 99); 5 Jul 2009 23:47:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jul 2009 23:47:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of karl.wettin@gmail.com designates 209.85.219.216 as permitted sender) Received: from [209.85.219.216] (HELO mail-ew0-f216.google.com) (209.85.219.216) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jul 2009 23:47:12 +0000 Received: by ewy12 with SMTP id 12so5083285ewy.11 for ; Sun, 05 Jul 2009 16:46:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=3WDkiEI6XeYXUEMGm7JYXvZ6AN1bZS8k0V6Jph3X0kk=; b=WjXuHlOwXnjwmRoedgqbBrQ73Ay8+f/iRwI9Zspywlk7ovINdp5kVhkIVe/mEhf7kN u62agynpqdztnQ5gDbRmgf3dWlikOBy0coSrDsE9fGZ3/kh7mT2axtzblcR11X1Fwu4f dil4efC98AXosUmSr9lyfbxFj9FIW7Npm5cEA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=VAmxFUEvOACq3j2LafbYPjVKYUGkLXpaooVaELUFkNbYDLmDVrwsXCpRDGQ/Ztse7N cmNWs/1ZJHECOq1a241YBwr1jGOczqq9Qb7vTAUhVAVFLda79IJktU+z7Icegox/PayD cPgikTiBpctTYmKeeiRHdEvWfQitKEA9kq1xc= Received: by 10.210.37.11 with SMTP id k11mr2966477ebk.23.1246837611573; Sun, 05 Jul 2009 16:46:51 -0700 (PDT) Received: from Elf-Ulfving.sweforce.com (95-36-32-119.dsl.alice.nl [95.36.32.119]) by mx.google.com with ESMTPS id 28sm9965552eye.46.2009.07.05.16.46.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 05 Jul 2009 16:46:50 -0700 (PDT) Sender: karl wettin Message-Id: <5C122C29-EBFA-49BA-A3F9-03C9B7F269A1@apache.org> From: Karl Wettin To: user@couchdb.apache.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: [ANN] New java bindings Date: Mon, 6 Jul 2009 01:46:50 +0200 X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org Hi forum, I've implemented a new Java bindings library with a consumer API similar to BDB JE, but without some of the limitations in the latter. Except for beeing faster than any of the binding I've tried it also features normalization of aggregated entities, and "abortable sessions" with a limited set of features similar to those one can find in transactions: begin, commit and rollbacks but with conflict caveats. http://kodapan.se/foo/couchdb-entitystore http://kodapan.se/foo/couchdb-entitystore.tar.gz The tarball contains a large and complex demo application with lots of data in XML-format, thus the file size. Here is smaller example also available on the webpage: public class Service { private EntityStore store; private PrimaryIndex artists; private PrimaryIndex albums; private PrimaryIndex tracks; public Service() { store = new EntityStore(); store.open("localhost", 5984); artists = store.getPrimaryIndex(Long.class, Artist.class); albums = store.getPrimaryIndex(Long.class, Album.class); tracks = store.getPrimaryIndex(Long.class, Track.class); } public static void main(String[] args) throws Exception { Service service = new Service(); Artist artist = new Artist(); // create a graph service.artists.put(artist); Artist artist2 = service.get(artist.getId()); assertFalse(artist == artist2); assertEquals(artist, artist2); } } @Entity public class Artist { @PrimaryKey private Long id; private String name; @Normalized(paths={"name", "tracks.title"}) private List albums; // getters and setters... } @Entity public class Album { @PrimaryKey private Long id; private String name; @Normalized(paths={"name", "artist.name"}) private List tracks; @Normalized(paths={"name"}) private Artist mainArtist; // getters and setters... } @Entity public class Track { @PrimaryKey private Long id; private String title; @Normalized(path={"name"}); private Artist artist; private int length; private int discNumber; // getters and setters... } karl