public final class PassThroughConverter extends Converter<RiakObject>
RiakObject
rather than domain types.Converter.ContentAndType, Converter.OrmExtracted
Constructor and Description |
---|
PassThroughConverter() |
Modifier and Type | Method and Description |
---|---|
Converter.ContentAndType |
fromDomain(RiakObject domainObject)
Provide the value portion of a RiakObject from the domain object.
|
Converter.OrmExtracted |
fromDomain(RiakObject domainObject,
Namespace namespace,
BinaryValue key)
Convert from a domain object to a RiakObject.
|
RiakObject |
toDomain(BinaryValue value,
String contentType)
Convert the value portion of a RiakObject to a domain object.
|
RiakObject |
toDomain(RiakObject obj,
Location location)
Converts from a RiakObject to a domain object.
|
newDomainInstance
public RiakObject toDomain(RiakObject obj, Location location)
Converter
toDomain
in class Converter<RiakObject>
obj
- the RiakObject to be convertedlocation
- The location of this RiakObject in Riakpublic Converter.OrmExtracted fromDomain(RiakObject domainObject, Namespace namespace, BinaryValue key)
Converter
The domain object itself may be completely annotated with everything
required to produce a RiakObject except for the value portion.
This will prefer annotated
items over the Location
passed in.
fromDomain
in class Converter<RiakObject>
domainObject
- a domain object to be stored in Riak.namespace
- the namespace in Riakkey
- the key for the objectpublic RiakObject toDomain(BinaryValue value, String contentType)
Converter
Implementations override this method to convert the value contained in
a RiakObject
to an instance of a domain object.
toDomain
in class Converter<RiakObject>
value
- the value portion of a RiakObject to convert to a domain objectcontentType
- The content type of the RiakObjectpublic Converter.ContentAndType fromDomain(RiakObject domainObject)
Converter
Implementations override this method to provide the value portion of the RiakObject to be stored from the supplied domain object.
fromDomain
in class Converter<RiakObject>
domainObject
- the domain object.Copyright © 2014. All rights reserved.