|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.LuceneUtils
public class LuceneUtils
A simple utility class for our common Lucene usage methods.
Method Summary | |
---|---|
static String |
dateToString(Date date)
Turns a given date-time (point in time) value into a String suitable for storing and searching in Lucene. |
static String |
localDateToString(LocalDate localDate)
Turns a given LocalDate value into a String suitable for storing and searching in Lucene. |
static Date |
stringToDate(String s)
|
static LocalDate |
stringToLocalDate(String indexValue)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String localDateToString(LocalDate localDate)
LocalDate
value into a String suitable for storing and searching in Lucene.
The date is stored as "YYYYMMDD". If the date is null we store "99999999" which causes nulls to sort to the end. (This is traditional JIRA behaviour)
localDate
- the date to be converted. May be null
public static LocalDate stringToLocalDate(String indexValue)
public static String dateToString(Date date)
The date-time is stored as the number of seconds. If the date is null we store the encoded form of Long.MAX_VALUE which causes nulls to sort to the end. (This is traditional JIRA behaviour)
date
- the date to be converted. May be null
public static Date stringToDate(String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |