Spring Data Couchbase

org.springframework.data.couchbase.core.convert.translation
Interface TranslationService

All Known Implementing Classes:
JacksonTranslationService

public interface TranslationService

Defines a translation service to encode/decode responses into the CouchbaseStorable format.

Author:
Michael Nitschinger

Method Summary
 CouchbaseStorable decode(Object source, CouchbaseStorable target)
          Decodes the target format into a CouchbaseDocument
 Object encode(CouchbaseStorable source)
          Encodes a CouchbaseDocument into the target format.
 

Method Detail

encode

Object encode(CouchbaseStorable source)
Encodes a CouchbaseDocument into the target format.

Parameters:
source - the source document to encode.
Returns:
the encoded document representation.

decode

CouchbaseStorable decode(Object source,
                         CouchbaseStorable target)
Decodes the target format into a CouchbaseDocument

Parameters:
source - the source formatted document.
target - the target of the populated data.
Returns:
a properly populated document to work with.

Spring Data Couchbase

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.