orm - JDBI like layer for cassandra -


i developing module having cassandra backend. searching jdbi sort of library cassandra. cassandra java driver primary option. know if there exists library higher level abstraction on top of cassandra java driver.

the latest java driver comes object mapping api.

basically, can annotate java class:

@table(keyspace = "complex", name = "accounts") public class account {     @partitionkey     private string email;     private string name;     @column (name = "addr")     @frozen     private address address; 

then can perform typical crud operations this:

mapper<account> mapper = new mappingmanager(getsession()).mapper(account.class); phone phone = new phone("home", "707-555-3537"); list<phone> phones = new arraylist<phone>(); phones.add(phone); address address = new address("25800 arnold drive", "sonoma", 95476, phones); account account = new account("john doe", "jd@example.com", address); mapper.save(account); account = mapper.get("jd@example.com"); system.out.println("account name: " + whose.getname()); mapper.delete(account); 

check out datastax doc complete explanation (with code).


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -