glaforge/gaelyk — pull request #121 by musketyr (2012-02-29 15:56:19+00:00)
Title: New @Entity annotation + transformation which solves #92 and #93

Added new Entity annotation provides AST transformations which adds following new behavior, methods and field into the annotated class

### New behavior
All the properties are now unindexed unless annotated with `@Indexed` or the entity is annotated with `@Entity(unindexed=false)`.

### New global behavior
Peoperties with value returning `false` for `asBoolean()` method call will be removed from the datastore instead. This is first step to provide not-saving behavior for default values as Objectify does.

### Instance methods

```
pogo.save() // saves the pogo
pogo.delete() // delete the pogo

// helper methods not to be used by end users

pogo.get$key() // returns the key
pogo.set$key() // sets the key

```

### Static methods

```
Pogo.get(key) // fetch the pogo by key
Pogo.exists(key) // checks whether pogo with given id exists
Pogo.count { ...query dsl... } // counts pogos based on given query dsl
Pogo.count() // counts all pogos
Pogo.find { ...query dsl... } // find single pogo based on given query dsl
Pogo.findAll { ...query dsl... } // finds pogos based on given query dsl
Pogo.findAll() // finds all pogos
Pogo.iterate { ...query dsl... } // iterates pogos based on given query dsl
Pogo.iterate() // iterate all pogos
```

### Field

If no property is annotated with `@Key` , adds new property `@Key long id` to the class.