amazonwebservices/aws-sdk-for-java — pull request #20 by itoshkov (2012-05-24 20:53:41+00:00)
Title: [Improvement] Support type hierarchies while loading objects using DynamoDBMapper

Suppose we have the following type hierarchy, describing user accounts:

```java
class User { ... }
class Manager extends User { ... }
class Administrator extends User { ... }
```

The data is stored in the same DynamoDB table (e.g. Users). We want to be able to tell the DynamoDBMapper which is the type of each item, so that it is correctly loaded. AFAICT this isn't possible at the moment.

This patch adds the interface TypeDispatcher, which describes a dispatcher (or mapper) between loaded item and Java class. DynamoDBMapper's load, query and scan methods are patched to support such mappers.