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, getEncodingTypepublic 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 FieldBridgepublic Object get(String name, org.apache.lucene.document.Document document)
get in interface TwoWayFieldBridgepublic String objectToString(Object object)
objectToString in interface StringBridgeobjectToString in interface TwoWayFieldBridgepublic void setParameterValues(Map<String,String> parameters)
setParameterValues in interface ParameterizedBridgeprotected Calendar parseIndexNullAs(String indexNullAs) throws IllegalArgumentException
parseIndexNullAs in class EncodingStringBridge<Calendar>IllegalArgumentExceptionCopyright © 2006–2017 Hibernate. All rights reserved.