Liferay 6.2-ce-ga5

com.liferay.portal.kernel.search
Class DocumentImpl

java.lang.Object
  extended by com.liferay.portal.kernel.search.DocumentImpl
All Implemented Interfaces:
Document, Serializable, Cloneable

public class DocumentImpl
extends Object
implements Document

See Also:
Serialized Form

Constructor Summary
DocumentImpl()
           
 
Method Summary
 void add(Field field)
           
 void addDate(String name, Date value)
           
 void addDate(String name, Date[] values)
           
 void addFile(String name, byte[] bytes, String fileExt)
           
 void addFile(String name, File file, String fileExt)
           
 void addFile(String name, InputStream is, String fileExt)
           
 void addFile(String name, InputStream is, String fileExt, int maxStringLength)
           
 void addKeyword(String name, boolean value)
           
 void addKeyword(String name, Boolean value)
           
 void addKeyword(String name, boolean[] values)
           
 void addKeyword(String name, Boolean[] values)
           
 void addKeyword(String name, double value)
           
 void addKeyword(String name, Double value)
           
 void addKeyword(String name, double[] values)
           
 void addKeyword(String name, Double[] values)
           
 void addKeyword(String name, float value)
           
 void addKeyword(String name, Float value)
           
 void addKeyword(String name, float[] values)
           
 void addKeyword(String name, Float[] values)
           
 void addKeyword(String name, int value)
           
 void addKeyword(String name, int[] values)
           
 void addKeyword(String name, Integer value)
           
 void addKeyword(String name, Integer[] values)
           
 void addKeyword(String name, long value)
           
 void addKeyword(String name, Long value)
           
 void addKeyword(String name, long[] values)
           
 void addKeyword(String name, Long[] values)
           
 void addKeyword(String name, short value)
           
 void addKeyword(String name, Short value)
           
 void addKeyword(String name, short[] values)
           
 void addKeyword(String name, Short[] values)
           
 void addKeyword(String name, String value)
           
 void addKeyword(String name, String[] values)
           
 void addKeyword(String name, String value, boolean lowerCase)
           
 void addKeywordSortable(String name, Boolean value)
           
 void addKeywordSortable(String name, Boolean[] values)
           
 void addKeywordSortable(String name, String value)
           
 void addKeywordSortable(String name, String[] values)
           
 void addLocalizedKeyword(String name, Map<Locale,String> values)
           
 void addLocalizedKeyword(String name, Map<Locale,String> values, boolean lowerCase)
           
 void addLocalizedKeyword(String name, Map<Locale,String> values, boolean lowerCase, boolean sortable)
           
 void addLocalizedText(String name, Map<Locale,String> values)
           
 void addModifiedDate()
          Deprecated. As of 6.1.0
 void addModifiedDate(Date modifiedDate)
          Deprecated. As of 6.1.0
 void addNumber(String name, double value)
           
 void addNumber(String name, Double value)
           
 void addNumber(String name, double[] values)
           
 void addNumber(String name, Double[] values)
           
 void addNumber(String name, float value)
           
 void addNumber(String name, Float value)
           
 void addNumber(String name, float[] values)
           
 void addNumber(String name, Float[] values)
           
 void addNumber(String name, int value)
           
 void addNumber(String name, int[] values)
           
 void addNumber(String name, Integer value)
           
 void addNumber(String name, Integer[] values)
           
 void addNumber(String name, long value)
           
 void addNumber(String name, Long value)
           
 void addNumber(String name, long[] values)
           
 void addNumber(String name, Long[] values)
           
 void addNumber(String name, String value)
           
 void addNumber(String name, String[] values)
           
 void addNumber(String name, String[] values, Class<? extends Number> clazz)
          Deprecated. As of 7.0.0
 void addNumber(String name, String value, Class<? extends Number> clazz)
          Deprecated. As of 7.0.0
 void addNumberSortable(String name, Double value)
           
 void addNumberSortable(String name, Double[] values)
           
 void addNumberSortable(String name, Float value)
           
 void addNumberSortable(String name, Float[] values)
           
 void addNumberSortable(String name, Integer value)
           
 void addNumberSortable(String name, Integer[] values)
           
 void addNumberSortable(String name, Long value)
           
 void addNumberSortable(String name, Long[] values)
           
 void addText(String name, String value)
           
 void addText(String name, String[] values)
           
 void addTextSortable(String name, String value)
           
 void addTextSortable(String name, String[] values)
           
 void addUID(String portletId, long field1)
           
 void addUID(String portletId, Long field1)
           
 void addUID(String portletId, long field1, String field2)
           
 void addUID(String portletId, Long field1, String field2)
           
 void addUID(String portletId, String field1)
           
 void addUID(String portletId, String field1, String field2)
           
 void addUID(String portletId, String field1, String field2, String field3)
           
 void addUID(String portletId, String field1, String field2, String field3, String field4)
           
 Object clone()
           
protected  void createKeywordField(String name, String value, boolean lowerCase)
           
protected  void createNumberField(String name, boolean typify, Number value)
           
protected
<T extends Number & Comparable<? super T>>
void
createNumberField(String name, boolean typify, T... values)
           
protected  void createNumberField(String name, Number value)
           
protected
<T extends Number & Comparable<? super T>>
void
createNumberField(String name, T... values)
           
protected  void createNumberFieldWithTypedSortable(String name, Number value)
           
protected
<T extends Number & Comparable<? super T>>
void
createNumberFieldWithTypedSortable(String name, T... values)
           
protected  void createSortableKeywordField(String name, String value)
           
protected  void createSortableKeywordField(String name, String[] values)
           
protected  void createSortableNumericField(String name, boolean typify, String value, Class<? extends Number> clazz)
           
protected
<T extends Number & Comparable<? super T>>
void
createSortableNumericField(String name, boolean typify, T... values)
           
protected  void createSortableTextField(String name, String value)
           
protected  void createSortableTextField(String name, String[] values)
           
 String get(Locale locale, String name)
           
 String get(Locale locale, String name, String defaultName)
           
 String get(String name)
           
 String get(String name, String defaultName)
           
 Date getDate(String name)
           
 Field getField(String name)
           
 Map<String,Field> getFields()
           
static String getLocalizedName(Locale locale, String name)
           
static String getLocalizedName(String languageId, String name)
           
 String getPortletId()
           
static String getSortableFieldName(String name)
           
static String getSortFieldName(Sort sort, String scoreFieldName)
           
 String getUID()
           
 String[] getValues(String name)
           
 boolean hasField(String name)
           
 boolean isDocumentSortableTextField(String name)
           
static boolean isSortableFieldName(String name)
           
static boolean isSortableTextField(String name)
           
 void remove(String name)
           
 void setFields(Map<String,Field> fields)
           
protected  void setSortableTextFields(Set<String> sortableTextFields)
           
 void setSortableTextFields(String[] sortableTextFields)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DocumentImpl

public DocumentImpl()
Method Detail

getLocalizedName

public static String getLocalizedName(Locale locale,
                                      String name)

getLocalizedName

public static String getLocalizedName(String languageId,
                                      String name)

getSortableFieldName

public static String getSortableFieldName(String name)

getSortFieldName

public static String getSortFieldName(Sort sort,
                                      String scoreFieldName)

isSortableFieldName

public static boolean isSortableFieldName(String name)

isSortableTextField

public static boolean isSortableTextField(String name)

add

public void add(Field field)
Specified by:
add in interface Document

addDate

public void addDate(String name,
                    Date value)
Specified by:
addDate in interface Document

addDate

public void addDate(String name,
                    Date[] values)
Specified by:
addDate in interface Document

addFile

public void addFile(String name,
                    byte[] bytes,
                    String fileExt)
Specified by:
addFile in interface Document

addFile

public void addFile(String name,
                    File file,
                    String fileExt)
             throws IOException
Specified by:
addFile in interface Document
Throws:
IOException

addFile

public void addFile(String name,
                    InputStream is,
                    String fileExt)
Specified by:
addFile in interface Document

addFile

public void addFile(String name,
                    InputStream is,
                    String fileExt,
                    int maxStringLength)
Specified by:
addFile in interface Document

addKeyword

public void addKeyword(String name,
                       boolean value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       Boolean value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       boolean[] values)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       Boolean[] values)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       double value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       Double value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       double[] values)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       Double[] values)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       float value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       Float value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       float[] values)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       Float[] values)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       int value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       int[] values)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       Integer value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       Integer[] values)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       long value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       Long value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       long[] values)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       Long[] values)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       short value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       Short value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       short[] values)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       Short[] values)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       String value)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       String value,
                       boolean lowerCase)
Specified by:
addKeyword in interface Document

addKeyword

public void addKeyword(String name,
                       String[] values)
Specified by:
addKeyword in interface Document

addKeywordSortable

public void addKeywordSortable(String name,
                               Boolean value)
Specified by:
addKeywordSortable in interface Document

addKeywordSortable

public void addKeywordSortable(String name,
                               Boolean[] values)
Specified by:
addKeywordSortable in interface Document

addKeywordSortable

public void addKeywordSortable(String name,
                               String value)
Specified by:
addKeywordSortable in interface Document

addKeywordSortable

public void addKeywordSortable(String name,
                               String[] values)
Specified by:
addKeywordSortable in interface Document

addLocalizedKeyword

public void addLocalizedKeyword(String name,
                                Map<Locale,String> values)
Specified by:
addLocalizedKeyword in interface Document

addLocalizedKeyword

public void addLocalizedKeyword(String name,
                                Map<Locale,String> values,
                                boolean lowerCase)
Specified by:
addLocalizedKeyword in interface Document

addLocalizedKeyword

public void addLocalizedKeyword(String name,
                                Map<Locale,String> values,
                                boolean lowerCase,
                                boolean sortable)
Specified by:
addLocalizedKeyword in interface Document

addLocalizedText

public void addLocalizedText(String name,
                             Map<Locale,String> values)
Specified by:
addLocalizedText in interface Document

addModifiedDate

public void addModifiedDate()
Deprecated. As of 6.1.0

Specified by:
addModifiedDate in interface Document

addModifiedDate

public void addModifiedDate(Date modifiedDate)
Deprecated. As of 6.1.0

Specified by:
addModifiedDate in interface Document

addNumber

public void addNumber(String name,
                      double value)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      Double value)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      double[] values)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      Double[] values)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      float value)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      Float value)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      float[] values)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      Float[] values)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      int value)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      int[] values)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      Integer value)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      Integer[] values)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      long value)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      Long value)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      long[] values)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      Long[] values)
Specified by:
addNumber in interface Document

addNumber

public void addNumber(String name,
                      String value)
Specified by:
addNumber in interface Document

addNumber

@Deprecated
public void addNumber(String name,
                                 String value,
                                 Class<? extends Number> clazz)
Deprecated. As of 7.0.0


addNumber

public void addNumber(String name,
                      String[] values)
Specified by:
addNumber in interface Document

addNumber

@Deprecated
public void addNumber(String name,
                                 String[] values,
                                 Class<? extends Number> clazz)
Deprecated. As of 7.0.0


addNumberSortable

public void addNumberSortable(String name,
                              Double value)
Specified by:
addNumberSortable in interface Document

addNumberSortable

public void addNumberSortable(String name,
                              Double[] values)
Specified by:
addNumberSortable in interface Document

addNumberSortable

public void addNumberSortable(String name,
                              Float value)
Specified by:
addNumberSortable in interface Document

addNumberSortable

public void addNumberSortable(String name,
                              Float[] values)
Specified by:
addNumberSortable in interface Document

addNumberSortable

public void addNumberSortable(String name,
                              Integer value)
Specified by:
addNumberSortable in interface Document

addNumberSortable

public void addNumberSortable(String name,
                              Integer[] values)
Specified by:
addNumberSortable in interface Document

addNumberSortable

public void addNumberSortable(String name,
                              Long value)
Specified by:
addNumberSortable in interface Document

addNumberSortable

public void addNumberSortable(String name,
                              Long[] values)
Specified by:
addNumberSortable in interface Document

addText

public void addText(String name,
                    String value)
Specified by:
addText in interface Document

addText

public void addText(String name,
                    String[] values)
Specified by:
addText in interface Document

addTextSortable

public void addTextSortable(String name,
                            String value)
Specified by:
addTextSortable in interface Document

addTextSortable

public void addTextSortable(String name,
                            String[] values)
Specified by:
addTextSortable in interface Document

addUID

public void addUID(String portletId,
                   long field1)
Specified by:
addUID in interface Document

addUID

public void addUID(String portletId,
                   long field1,
                   String field2)
Specified by:
addUID in interface Document

addUID

public void addUID(String portletId,
                   Long field1)
Specified by:
addUID in interface Document

addUID

public void addUID(String portletId,
                   Long field1,
                   String field2)
Specified by:
addUID in interface Document

addUID

public void addUID(String portletId,
                   String field1)
Specified by:
addUID in interface Document

addUID

public void addUID(String portletId,
                   String field1,
                   String field2)
Specified by:
addUID in interface Document

addUID

public void addUID(String portletId,
                   String field1,
                   String field2,
                   String field3)
Specified by:
addUID in interface Document

addUID

public void addUID(String portletId,
                   String field1,
                   String field2,
                   String field3,
                   String field4)
Specified by:
addUID in interface Document

clone

public Object clone()
Specified by:
clone in interface Document
Overrides:
clone in class Object

get

public String get(Locale locale,
                  String name)
Specified by:
get in interface Document

get

public String get(Locale locale,
                  String name,
                  String defaultName)
Specified by:
get in interface Document

get

public String get(String name)
Specified by:
get in interface Document

get

public String get(String name,
                  String defaultName)
Specified by:
get in interface Document

getDate

public Date getDate(String name)
             throws ParseException
Specified by:
getDate in interface Document
Throws:
ParseException

getField

public Field getField(String name)
Specified by:
getField in interface Document

getFields

public Map<String,Field> getFields()
Specified by:
getFields in interface Document

getPortletId

public String getPortletId()
Specified by:
getPortletId in interface Document

getUID

public String getUID()
Specified by:
getUID in interface Document

getValues

public String[] getValues(String name)
Specified by:
getValues in interface Document

hasField

public boolean hasField(String name)
Specified by:
hasField in interface Document

isDocumentSortableTextField

public boolean isDocumentSortableTextField(String name)
Specified by:
isDocumentSortableTextField in interface Document

remove

public void remove(String name)
Specified by:
remove in interface Document

setFields

public void setFields(Map<String,Field> fields)

setSortableTextFields

public void setSortableTextFields(String[] sortableTextFields)
Specified by:
setSortableTextFields in interface Document

toString

public String toString()
Overrides:
toString in class Object

createKeywordField

protected void createKeywordField(String name,
                                  String value,
                                  boolean lowerCase)

createNumberField

protected void createNumberField(String name,
                                 boolean typify,
                                 Number value)

createNumberField

protected <T extends Number & Comparable<? super T>> void createNumberField(String name,
                                                                           boolean typify,
                                                                           T... values)

createNumberField

protected void createNumberField(String name,
                                 Number value)

createNumberField

protected <T extends Number & Comparable<? super T>> void createNumberField(String name,
                                                                           T... values)

createNumberFieldWithTypedSortable

protected void createNumberFieldWithTypedSortable(String name,
                                                  Number value)

createNumberFieldWithTypedSortable

protected <T extends Number & Comparable<? super T>> void createNumberFieldWithTypedSortable(String name,
                                                                                            T... values)

createSortableKeywordField

protected void createSortableKeywordField(String name,
                                          String value)

createSortableKeywordField

protected void createSortableKeywordField(String name,
                                          String[] values)

createSortableNumericField

protected void createSortableNumericField(String name,
                                          boolean typify,
                                          String value,
                                          Class<? extends Number> clazz)

createSortableNumericField

protected <T extends Number & Comparable<? super T>> void createSortableNumericField(String name,
                                                                                    boolean typify,
                                                                                    T... values)

createSortableTextField

protected void createSortableTextField(String name,
                                       String value)

createSortableTextField

protected void createSortableTextField(String name,
                                       String[] values)

setSortableTextFields

protected void setSortableTextFields(Set<String> sortableTextFields)

Liferay 6.2-ce-ga5