public class ElasticsearchCalendarBridge extends EncodingStringBridge<Calendar> implements TwoWayFieldBridge, ParameterizedBridge, IgnoreAnalyzerBridge
java.util.Calendar
to a String
using the ISO 8601 standard which is the default date format
of Elasticsearch. The time zone of the calendar is stored in the index.
Typically, a java.util.Calendar
will be converted to "2016-04-28T15:24:25+01:00".Modifier and Type | Field and Description |
---|---|
static ElasticsearchCalendarBridge |
DATE_DAY |
static ElasticsearchCalendarBridge |
DATE_HOUR |
static ElasticsearchCalendarBridge |
DATE_MILLISECOND |
static ElasticsearchCalendarBridge |
DATE_MINUTE |
static ElasticsearchCalendarBridge |
DATE_MONTH |
static ElasticsearchCalendarBridge |
DATE_SECOND |
static ElasticsearchCalendarBridge |
DATE_YEAR |
Constructor and Description |
---|
ElasticsearchCalendarBridge() |
ElasticsearchCalendarBridge(Resolution resolution) |
Modifier and Type | Method and Description |
---|---|
Object |
get(String name,
org.apache.lucene.document.Document document) |
String |
objectToString(Object object) |
protected Calendar |
parseIndexNullAs(String indexNullAs) |
void |
set(String name,
Object value,
org.apache.lucene.document.Document document,
LuceneOptions luceneOptions) |
void |
setParameterValues(Map<String,String> parameters) |
createNullMarker, getEncodingType
public static final ElasticsearchCalendarBridge DATE_YEAR
public static final ElasticsearchCalendarBridge DATE_MONTH
public static final ElasticsearchCalendarBridge DATE_DAY
public static final ElasticsearchCalendarBridge DATE_HOUR
public static final ElasticsearchCalendarBridge DATE_MINUTE
public static final ElasticsearchCalendarBridge DATE_SECOND
public static final ElasticsearchCalendarBridge DATE_MILLISECOND
public ElasticsearchCalendarBridge()
public ElasticsearchCalendarBridge(Resolution resolution)
public void set(String name, Object value, org.apache.lucene.document.Document document, LuceneOptions luceneOptions)
set
in interface FieldBridge
public Object get(String name, org.apache.lucene.document.Document document)
get
in interface TwoWayFieldBridge
public String objectToString(Object object)
objectToString
in interface StringBridge
objectToString
in interface TwoWayFieldBridge
public void setParameterValues(Map<String,String> parameters)
setParameterValues
in interface ParameterizedBridge
protected Calendar parseIndexNullAs(String indexNullAs) throws IllegalArgumentException
parseIndexNullAs
in class EncodingStringBridge<Calendar>
IllegalArgumentException
Copyright © 2006–2017 Hibernate. All rights reserved.