pellucidanalytics/datomisca — pull request #42 by dwhjames (2013-03-07 15:27:30+00:00)
Title: Refactor Attribute2EntityReader (fixes #41)

This makes a better distinction between `Attribute2EntityReader` and `Attribute2EntityReaderCast` implicits.

`Attribute2EntityReader` is used exclusively for `SchemaDEntityOps.apply` and `SchemaDEntityOps.get`. There is no type parameter on these methods, we we use `Attribute2EntityReader` to uniquely determine the return type of reading from the entity. For references, just `DatomicData` is returned. For non-reference values, the return type is determined by `FromDatomicInj`.

The cast form is now used for everything else:
- `SchemaDEntityOps.read`
- `SchemaDEntityOps.readOpt`
- `SchemaDEntityOps.getIdView`
- `SchemaDEntityOps.getIdView`
- `AttributeOps.read`
- `AttributeOps.readOpt`
All of these methods have a type parameter, so the user must specify which type they intend.

Before we merge, are we happy with the names `Attribute2EntityReader` and `Attribute2EntityReaderCast`?