Skip to content

Commit

Permalink
Patch for issue xetorthio#29 - JOhm to support long id's in line with…
Browse files Browse the repository at this point in the history
… the update to Jedis incr()
  • Loading branch information
gsharma authored and Jonathan Leibiusky committed Jan 30, 2011
1 parent c024337 commit 8458442
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# JOhm

JOhm is a Object-hash mapping library for Java inspired on the awesome [Ohm](http://github.com/soveran/ohm).
JOhm is a blazingly fast Object-Hash Mapping library for Java inspired by the awesome [Ohm](http://github.com/soveran/ohm). The JOhm OHM is a
modern-day avatar of the old ORM's like Hibernate with the difference being that we are not dealing with an RDBMS here but with a NoSQL rockstar.

JOhm is a library for storing objects in [Redis](http://github.com/antirez/redis), a persistent key-value database.
JOhm is a library for storing objects in [Redis](http://github.com/antirez/redis), a persistent key-value database. JOhm is designed to be
minimally-invasive and relies wholly on reflection aided by annotation hooks for persistence. The fundamental idea is to allow large existing
codebases to easily plug into Redis without the need to extend framework base classes or provide excessive configuration metadata.

Durable data storage is available via the Redis Append-only file (AOF). The default persistence strategy is Snapshotting.

## What can I do with JOhm?
Right now it is still in development. So just the following features are available.
JOhm is still in active development. The following features are currently available:

- Basic attribute persistence (String, Integer, etc...)
- Auto-numeric Ids
Expand All @@ -27,7 +32,7 @@ And this is a small example (getters and setters are not included for the sake o
@Model
class User {
@Id
private Integer id;
private Long id;
@Attribute
private String name;
@Attribute
Expand Down Expand Up @@ -56,22 +61,21 @@ And this is a small example (getters and setters are not included for the sake o
@Model
class Comment {
@Id
private Integer id;
private Long id;
@Attribute
private String text;
}

@Model
class Item {
@Id
private Integer id;
private Long id;
@Attribute
private String name;
}

Initiating JOhm:
jedisPool = new JedisPool("localhost");
jedisPool.init();
jedisPool = new JedisPool(new Config(), "localhost");
JOhm.setPool(jedisPool);

Creating a User and persisting it:
Expand Down

0 comments on commit 8458442

Please sign in to comment.