Xpace
Xpace::JavaTableSink Class Reference

#include <table_j.h>

Inheritance diagram for Xpace::JavaTableSink:
Xpace::Table::Sink Xpace::Sink< uint > Xpace::SinkBase

Public Member Functions

virtual uint add (const String &name, DerivedDataType type, uint column=~0, bool *added=0) override
 Add a column by name. More...
 
virtual bool setCount (uint64 count) override
 Inform the Sink how many documents/records/rows to expect. More...
 
virtual int64 start (uint64 row) override
 Begin a new document/record/row, committing current one (if any) More...
 
virtual bool set (uint column, int64 value) override
 Write an int64. More...
 
virtual bool set (uint column, const Xpace::DecimalFloat &value) override
 Add a DecimalFloat. More...
 
virtual bool set (uint column, const Xpace::String8 &value) override
 Add a String8. More...
 
virtual bool set (uint column, const Xpace::String16 &value) override
 Add a String16. More...
 
virtual bool set (uint column, const Xpace::BytesRef &value) override
 Add a BytesRef. More...
 
virtual bool set (uint column, const Xpace::DateTime &value)
 Add a DateTime. More...
 
virtual void close () override
 We're finshed with this Sink. More...
 
- Public Member Functions inherited from Xpace::Sink< uint >
virtual uint add (const Configuration &config, uintlocation, bool *added=0)
 Add a field from a Configuration. More...
 
virtual bool move (uintlocation)
 Move without setting data. More...
 
- Public Member Functions inherited from Xpace::SinkBase
virtual ~SinkBase ()
 

Static Public Member Functions

static std::unique_ptr< Table::Sinkcreate (JNIEnv *jnienv, jobject jsink)
 

Additional Inherited Members

- Protected Member Functions inherited from Xpace::SinkBase
 SinkBase ()
 

Detailed Description

Definition at line 23 of file table_j.h.

Member Function Documentation

static std::unique_ptr<Table::Sink> Xpace::JavaTableSink::create ( JNIEnv *  jnienv,
jobject  jsink 
)
static
virtual uint Xpace::JavaTableSink::add ( const String name,
DerivedDataType  type,
uint  columnNum = ~0,
bool added = 0 
)
inlineoverridevirtual

Add a column by name.

Parameters
namethe name of the column
typethe type of the column
columnNuma proposed column number
Return values
addedtrue iff the field or column was added
Returns
the actual column number, ~0 to stop

Implements Xpace::Table::Sink.

Definition at line 32 of file table_j.h.

References added, Xpace::BaseDataType::btInt, Xpace::BaseDataType::btUint, column, convert_pass(), and setCount().

virtual bool Xpace::JavaTableSink::setCount ( uint64  docs)
inlineoverridevirtual

Inform the Sink how many documents/records/rows to expect.

Parameters
docsthe number of documents/records/rows
Returns
true to receive, false to stop

Reimplemented from Xpace::SinkBase.

Definition at line 51 of file table_j.h.

References convert_pass(), and start().

Referenced by add().

virtual int64 Xpace::JavaTableSink::start ( uint64  docNum)
inlineoverridevirtual

Begin a new document/record/row, committing current one (if any)

Parameters
docNuma suggested document
Returns
-1 to stop, otherwise a document number

Reimplemented from Xpace::SinkBase.

Definition at line 58 of file table_j.h.

References convert_pass().

Referenced by setCount().

virtual bool Xpace::JavaTableSink::set ( uint  location,
int64  value 
)
inlineoverridevirtual

Write an int64.

Parameters
location
value
Returns
a RET, usually a bool

Reimplemented from Xpace::Sink< uint >.

Definition at line 65 of file table_j.h.

References convert_pass(), and value.

virtual bool Xpace::JavaTableSink::set ( uint  location,
const Xpace::DecimalFloat value 
)
inlineoverridevirtual

Add a DecimalFloat.

Parameters
location
value
Returns
a RET, usually a bool

Reimplemented from Xpace::Sink< uint >.

Definition at line 74 of file table_j.h.

References convert_pass(), and value.

virtual bool Xpace::JavaTableSink::set ( uint  location,
const Xpace::String8 value 
)
inlineoverridevirtual

Add a String8.

Parameters
location
value
Returns
a RET, usually a bool

Reimplemented from Xpace::Sink< uint >.

Definition at line 84 of file table_j.h.

References convert_pass(), and value.

virtual bool Xpace::JavaTableSink::set ( uint  location,
const Xpace::String16 value 
)
inlineoverridevirtual

Add a String16.

Parameters
location
value
Returns
a RET, usually a bool

Reimplemented from Xpace::Sink< uint >.

Definition at line 92 of file table_j.h.

References convert_pass(), and value.

virtual bool Xpace::JavaTableSink::set ( uint  location,
const Xpace::BytesRef value 
)
inlineoverridevirtual

Add a BytesRef.

Parameters
location
value
Returns
a RET, usually a bool

Reimplemented from Xpace::Sink< uint >.

Definition at line 100 of file table_j.h.

References convert_pass(), and value.

virtual bool Xpace::JavaTableSink::set ( uint  location,
const Xpace::DateTime value 
)
inlinevirtual

Add a DateTime.

Parameters
location
value
Returns
a RET, usually a bool

Reimplemented from Xpace::Sink< uint >.

Definition at line 108 of file table_j.h.

References close(), convert_pass(), and value.

virtual void Xpace::JavaTableSink::close ( )
inlineoverridevirtual

We're finshed with this Sink.

Reimplemented from Xpace::SinkBase.

Definition at line 125 of file table_j.h.

Referenced by set().


The documentation for this class was generated from the following file:

current as of Wed Jun 10 2026 12:00:06