forked from marcust/HelenaORM
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
27 lines (17 loc) · 1.02 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
HelenaORM is a simple ORM Mapping Tool for Apache Cassandra based on Hector
It is work in progress :).
final HelenaORMDAOFactory factory = HelenaORMDAOFactory.withConfig(
"localhost",
9160,
"Keyspace1", SerializeUnknownClasses.YES );
final PublicEvent exampleEvent = new PublicEvent();
exampleEvent.setName( "Session im Irish Rover" );
exampleEvent.setDescription( "Gute Irische Livemusik" );
exampleEvent.setId( UUID.randomUUID() );
exampleEvent.setUrl( URI.create( "http://www.thiesen.org" ) );
final HelenaDAO<PublicEvent> dao = factory.forClassAndColumnFamily( PublicEvent.class, "Standard1" );
dao.insert( exampleEvent );
System.out.println( "Stored as " + exampleEvent.getId() );
final PublicEvent publicEvent = dao.get( exampleEvent.getId().toString() );
System.out.println( publicEvent );
See org.thiesen.helenaorm.example.Main for more examples.