Oracle NoSQL Database Examples
version 11gR2.2.0.26

externaltables
Class MyFormatter

java.lang.Object
  extended by externaltables.MyFormatter
All Implemented Interfaces:
Formatter

public class MyFormatter
extends Object
implements Formatter

A simple Formatter implementation used by the External Tables Cookbook example. This class formats UserInfo records from the NoSQL Database to be suitable for reading by the NOSQL_DATA Oracle Database table. The Formatter.toOracleLoaderFormat(oracle.kv.KeyValueVersion, oracle.kv.KVStore) method accepts a KeyValueVersion and returns a String which can be interpreted by the ACCESS PARAMETERS of the External Table definition.


Method Summary
 String toOracleLoaderFormat(KeyValueVersion kvv, KVStore kvStore)
          Convert a KeyValueVersion into a String which can be interpreted by the Oracle External Table definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toOracleLoaderFormat

public String toOracleLoaderFormat(KeyValueVersion kvv,
                                   KVStore kvStore)
Description copied from interface: oracle.kv.exttab.Formatter
Convert a KeyValueVersion into a String which can be interpreted by the Oracle External Table definition. If this method throws an exception the record is ignored.

Specified by:
toOracleLoaderFormat in interface Formatter
Parameters:
kvv - the Key and Value to be formatted.
kvStore - the KV Store object related to this record so that the Formatter may retrieve (e.g.) Avro bindings.
Returns:
The formatted record suitable for interpretation by Oracle and/or its affiliates. If null is returned, then this record will not be passed to Oracle and/or its affiliates.

Oracle NoSQL Database Examples
version 11gR2.2.0.26

Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.