com.atlassian.jira.util
Class LuceneUtils

java.lang.Object
  extended by com.atlassian.jira.util.LuceneUtils

public class LuceneUtils
extends Object

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)
           
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

localDateToString

public static String localDateToString(LocalDate localDate)

stringToLocalDate

public static LocalDate stringToLocalDate(String indexValue)

dateToString

public static String dateToString(Date date)
Turns a given date-time (point in time) value into a String suitable for storing and searching in Lucene.

The date-time is stored with second precision using GMT eg 2011-05-05 10:59:39.000 EST (GMT+10) would return "20110505005939". Note that the lexigraphical ordering of such Strings are in line with the ordering of the represented timestamps.

Parameters:
date - the date to be converted
Returns:
a string in format YYYYMMDDHHMMSS in GMT timezone.

stringToDate

public static Date stringToDate(String s)


Copyright © 2002-2012 Atlassian. All Rights Reserved.