public class MapBuilder
extends java.lang.Object
Map
object which is to be indexed in solr.
The MapBuilder allows only solr supported values to be put in the map object.Constructor and Description |
---|
MapBuilder() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
build() |
boolean |
isAllowedType(java.lang.Object v) |
boolean |
isNotAllowedType(java.lang.Object v) |
MapBuilder |
merge(java.util.Map<java.lang.String,java.lang.Object> map)
Merges values of provided map to the
values
Ignores values that is not accepted by solr like nested map. |
static MapBuilder |
newBuilder() |
MapBuilder |
setBoolean(java.lang.String key,
java.lang.Boolean value) |
MapBuilder |
setBooleans(java.lang.String key,
java.lang.Boolean[] value) |
MapBuilder |
setBooleans(java.lang.String key,
java.util.Collection<java.lang.Boolean> value) |
MapBuilder |
setDate(java.lang.String key,
java.util.Date value) |
MapBuilder |
setDates(java.lang.String key,
java.util.Collection<java.util.Date> value) |
MapBuilder |
setDates(java.lang.String key,
java.util.Date[] value) |
MapBuilder |
setDouble(java.lang.String key,
java.lang.Double value) |
MapBuilder |
setDoubles(java.lang.String key,
java.util.Collection<java.lang.Double> value) |
MapBuilder |
setDoubles(java.lang.String key,
java.lang.Double[] value) |
MapBuilder |
setFloat(java.lang.String key,
java.lang.Float value) |
MapBuilder |
setFloats(java.lang.String key,
java.util.Collection<java.lang.Float> value) |
MapBuilder |
setFloats(java.lang.String key,
java.lang.Float[] value) |
MapBuilder |
setInteger(java.lang.String key,
java.lang.Integer value) |
MapBuilder |
setIntegers(java.lang.String key,
java.util.Collection<java.lang.Integer> value) |
MapBuilder |
setIntegers(java.lang.String key,
java.lang.Integer[] value) |
MapBuilder |
setLong(java.lang.String key,
java.lang.Long value) |
MapBuilder |
setLongs(java.lang.String key,
java.util.Collection<java.lang.Long> value) |
MapBuilder |
setLongs(java.lang.String key,
java.lang.Long[] value) |
MapBuilder |
setString(java.lang.String key,
java.lang.String value) |
MapBuilder |
setStrings(java.lang.String key,
java.util.Collection<java.lang.String> value) |
MapBuilder |
setStrings(java.lang.String key,
java.lang.String[] value) |
public static MapBuilder newBuilder()
public MapBuilder setLong(java.lang.String key, java.lang.Long value)
public MapBuilder setInteger(java.lang.String key, java.lang.Integer value)
public MapBuilder setDouble(java.lang.String key, java.lang.Double value)
public MapBuilder setFloat(java.lang.String key, java.lang.Float value)
public MapBuilder setString(java.lang.String key, java.lang.String value)
public MapBuilder setDate(java.lang.String key, java.util.Date value)
public MapBuilder setBoolean(java.lang.String key, java.lang.Boolean value)
public MapBuilder setStrings(java.lang.String key, java.lang.String[] value)
public MapBuilder setIntegers(java.lang.String key, java.lang.Integer[] value)
public MapBuilder setLongs(java.lang.String key, java.lang.Long[] value)
public MapBuilder setDoubles(java.lang.String key, java.lang.Double[] value)
public MapBuilder setFloats(java.lang.String key, java.lang.Float[] value)
public MapBuilder setDates(java.lang.String key, java.util.Date[] value)
public MapBuilder setBooleans(java.lang.String key, java.lang.Boolean[] value)
public MapBuilder setStrings(java.lang.String key, java.util.Collection<java.lang.String> value)
public MapBuilder setIntegers(java.lang.String key, java.util.Collection<java.lang.Integer> value)
public MapBuilder setLongs(java.lang.String key, java.util.Collection<java.lang.Long> value)
public MapBuilder setDoubles(java.lang.String key, java.util.Collection<java.lang.Double> value)
public MapBuilder setFloats(java.lang.String key, java.util.Collection<java.lang.Float> value)
public MapBuilder setDates(java.lang.String key, java.util.Collection<java.util.Date> value)
public MapBuilder setBooleans(java.lang.String key, java.util.Collection<java.lang.Boolean> value)
public MapBuilder merge(java.util.Map<java.lang.String,java.lang.Object> map)
values
Ignores values that is not accepted by solr like nested map.map
- map of key value pairpublic boolean isAllowedType(java.lang.Object v)
public boolean isNotAllowedType(java.lang.Object v)
public java.util.Map<java.lang.String,java.lang.Object> build()