<commit_before># JOhm

JOhm is a Object-hash mapping library for Java inspired on the awesome [Ohm](http://github.com/soveran/ohm).

JOhm is a library for storing objects in [Redis](http://github.com/antirez/redis), a persistent key-value database.

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

- Basic attribute persistence (String, Integer, etc...)
- Auto-numeric Ids
- References
- Indexes
- Deletion
- List, Set, SortedSet and Map relationship
- Search on attributes, collections and references

Stay close! It is growing pretty fast!

## How do I use it?

You can download the latest build at [http://github.com/xetorthio/johm/downloads](http://github.com/xetorthio/johm/downloads)

And this is a small example (getters and setters are not included for the sake of simplicity):
    
    @Model
    class User {
        @Id
        private Integer id;
    	@Attribute
    	private String name;
    	@Attribute
    	@Indexed
    	private int age;
    	@Reference
    	private Country country;
    	@CollectionList(of = Comment.class)
    	private List<Comment> comments;
    	@CollectionSet(of = Item.class)
    	private Set<Item> purchases;
    }

    @Model
	class Comment {
	    @Id
	    private Integer id;
    	@Attribute
    	private String text;
	}
<commit_msg>Updated the readme file to reflect recent feature additions and basic model-demo.<commit_after># JOhm

JOhm is a Object-hash mapping library for Java inspired on the awesome [Ohm](http://github.com/soveran/ohm).

JOhm is a library for storing objects in [Redis](http://github.com/antirez/redis), a persistent key-value database.

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

- Basic attribute persistence (String, Integer, etc...)
- Auto-numeric Ids
- References
- Arrays
- Indexes
- Deletion
- List, Set, SortedSet and Map relationship
- Search on attributes, arrays, collections and references

Stay close! It is growing pretty fast!

## How do I use it?

You can download the latest build at [http://github.com/xetorthio/johm/downloads](http://github.com/xetorthio/johm/downloads)

And this is a small example (getters and setters are not included for the sake of simplicity):
    
    @Model
    class User {
        @Id
        private Integer id;
    	@Attribute
    	private String name;
    	@Attribute
    	@Indexed
    	private int age;
    	@Reference
    	@Indexed
    	private Country country;
    	@CollectionList(of = Comment.class)
    	@Indexed
    	private List<Comment> comments;
    	@CollectionSet(of = Item.class)
    	@Indexed
    	private Set<Item> purchases;
    	@CollectionMap(key = Integer.class, value = Item.class)
        @Indexed
        private Map<Integer, Item> favoritePurchases;
        @CollectionSortedSet(of = Item.class, by = "price")
        @Indexed
        private Set<Item> orderedPurchases;
        @Array(of = Item.class, length = 3)
        @Indexed
        private Item[] threeLatestPurchases;
    }

    @Model
	class Comment {
	    @Id
	    private Integer id;
    	@Attribute
    	private String text;
	}

{'fraction_non_alphanumeric': 0.08533501896333755, 'fraction_numerical': 0.0003160556257901391, 'mean_word_length': 2.9761306532663316, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6753793', 'n_tokens_mistral': 963, 'n_tokens_neox': 940, 'n_words': 339}