net.vz.mongodb.jackson.internal.util
Class IdHandler<K,D>
java.lang.Object
net.vz.mongodb.jackson.internal.util.IdHandler<K,D>
- Direct Known Subclasses:
- IdHandler.ByteArrayToObjectIdHandler, IdHandler.NoopIdHandler, IdHandler.StringToObjectIdHandler
public abstract class IdHandler<K,D>
- extends Object
Handler for ids. Converts them between the objects type and the database type
- Since:
- 1.0
- Author:
- James Roper
Method Summary |
static
|
create(org.codehaus.jackson.map.BeanProperty beanProperty,
Class<K> keyType)
|
abstract K |
fromDbId(D dbId)
Convert the given database id to the java objects id |
abstract D |
toDbId(K id)
Convert the given java object id to the databases id |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdHandler
public IdHandler()
fromDbId
public abstract K fromDbId(D dbId)
- Convert the given database id to the java objects id
- Parameters:
dbId
- The database id to convert from
- Returns:
- The converted id
toDbId
public abstract D toDbId(K id)
- Convert the given java object id to the databases id
- Parameters:
id
- The java object id to convert from
- Returns:
- The converted database id
create
public static <K> IdHandler<K,?> create(org.codehaus.jackson.map.BeanProperty beanProperty,
Class<K> keyType)
Copyright © 2011-2012 VZ Netzwerke. All Rights Reserved.