public class PlainIndexableObject extends Object implements IndexableObject, org.elasticsearch.common.xcontent.ToXContent, Comparable<IndexableObject>
Constructor and Description |
---|
PlainIndexableObject() |
Modifier and Type | Method and Description |
---|---|
String |
build()
Build a string that can be used for indexing.
|
protected boolean |
checkCollapsedMapLength(Map<String,Object> map)
Check if the map is empty, after optional null value removal.
|
int |
compareTo(IndexableObject o) |
boolean |
equals(Object o) |
int |
hashCode() |
String |
id()
Get the ID
|
IndexableObject |
id(String id)
Set the ID
|
IndexableObject |
ignoreNull(boolean ignorenull) |
String |
index()
Get the index
|
IndexableObject |
index(String index)
Set the index
|
boolean |
isEmpty() |
String |
meta(String key) |
IndexableObject |
meta(String key,
String value)
Set meta data of this indexable object
|
String |
optype()
Get the operation type
|
IndexableObject |
optype(String optype)
Set the operation type, either "index", "create", or "delete"
|
Map<String,Object> |
source() |
IndexableObject |
source(Map<String,Object> source) |
String |
toString() |
org.elasticsearch.common.xcontent.XContentBuilder |
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder,
org.elasticsearch.common.xcontent.ToXContent.Params params) |
protected org.elasticsearch.common.xcontent.XContentBuilder |
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder,
org.elasticsearch.common.xcontent.ToXContent.Params params,
List list) |
protected org.elasticsearch.common.xcontent.XContentBuilder |
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder,
org.elasticsearch.common.xcontent.ToXContent.Params params,
Map<String,Object> map)
Recursive method to build XContent from a key/value map of Values
|
String |
type()
Get the type
|
IndexableObject |
type(String type)
Set the type
|
public PlainIndexableObject()
public IndexableObject ignoreNull(boolean ignorenull)
ignoreNull
in interface IndexableObject
public IndexableObject optype(String optype)
IndexableObject
optype
in interface IndexableObject
optype
- the operaion typepublic String optype()
IndexableObject
optype
in interface IndexableObject
public IndexableObject index(String index)
IndexableObject
index
in interface IndexableObject
index
- the indexpublic String index()
IndexableObject
index
in interface IndexableObject
public IndexableObject type(String type)
IndexableObject
type
in interface IndexableObject
type
- the typepublic String type()
IndexableObject
type
in interface IndexableObject
public IndexableObject id(String id)
IndexableObject
id
in interface IndexableObject
id
- the IDpublic String id()
IndexableObject
id
in interface IndexableObject
public IndexableObject meta(String key, String value)
IndexableObject
meta
in interface IndexableObject
key
- the meta data keyvalue
- the meta data valuepublic String meta(String key)
meta
in interface IndexableObject
public IndexableObject source(Map<String,Object> source)
source
in interface IndexableObject
public String build() throws IOException
build
in interface IndexableObject
IOException
- when build gave an errorpublic org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
toXContent
in interface org.elasticsearch.common.xcontent.ToXContent
IOException
protected org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params, Map<String,Object> map) throws IOException
builder
- the buildermap
- the mapIOException
- when method gave an errorprotected boolean checkCollapsedMapLength(Map<String,Object> map)
map
- the map to checkprotected org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params, List list) throws IOException
IOException
public boolean isEmpty()
isEmpty
in interface IndexableObject
public int compareTo(IndexableObject o)
compareTo
in interface Comparable<IndexableObject>
elasticsearch-river-jdbc