public class DocumentImpl extends Object implements Document
Constructor and Description |
---|
DocumentImpl() |
Modifier and Type | Method and Description |
---|---|
void |
add(Field field) |
void |
addDate(String name,
Date value) |
void |
addDate(String name,
Date[] values) |
void |
addDateSortable(String name,
Date value) |
void |
addDateSortable(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 |
addGeoLocation(double latitude,
double longitude) |
void |
addGeoLocation(String name,
double latitude,
double longitude) |
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 |
addNumber(String name,
BigDecimal value) |
void |
addNumber(String name,
BigDecimal[] values) |
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 |
addNumberSortable(String name,
BigDecimal value) |
void |
addNumberSortable(String name,
BigDecimal[] values) |
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 Field |
createField(String name) |
protected Field |
createField(String name,
boolean sortable,
String... values) |
protected Field |
createField(String name,
Map<Locale,String> localizedValues) |
protected Field |
createField(String name,
Map<Locale,String> localizedValues,
boolean sortable) |
protected Field |
createField(String name,
String... values) |
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>> |
createNumberField(String name,
boolean typify,
T... values) |
protected void |
createNumberField(String name,
Number value) |
protected <T extends Number & Comparable<? super T>> |
createNumberField(String name,
T... values) |
protected void |
createNumberFieldWithTypedSortable(String name,
Number value) |
protected <T extends Number & Comparable<? super T>> |
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>> |
createSortableNumericField(String name,
boolean typify,
T... values) |
protected void |
createSortableTextField(String name,
String value) |
protected void |
createSortableTextField(String name,
String[] values) |
protected Field |
doGetField(String name,
boolean createIfNew) |
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() |
protected void |
toString(StringBundler sb,
Collection<Field> fields) |
public static String getLocalizedName(Locale locale, String name)
public static String getLocalizedName(String languageId, String name)
public static String getSortableFieldName(String name)
public static String getSortFieldName(Sort sort, String scoreFieldName)
public static boolean isSortableFieldName(String name)
public static boolean isSortableTextField(String name)
public void addDateSortable(String name, Date value)
addDateSortable
in interface Document
public void addDateSortable(String name, Date[] values)
addDateSortable
in interface Document
public void addFile(String name, byte[] bytes, String fileExt)
public void addFile(String name, File file, String fileExt) throws IOException
public void addFile(String name, InputStream is, String fileExt)
public void addFile(String name, InputStream is, String fileExt, int maxStringLength)
public void addGeoLocation(double latitude, double longitude)
addGeoLocation
in interface Document
public void addGeoLocation(String name, double latitude, double longitude)
addGeoLocation
in interface Document
public void addKeyword(String name, boolean value)
addKeyword
in interface Document
public void addKeyword(String name, Boolean value)
addKeyword
in interface Document
public void addKeyword(String name, boolean[] values)
addKeyword
in interface Document
public void addKeyword(String name, Boolean[] values)
addKeyword
in interface Document
public void addKeyword(String name, double value)
addKeyword
in interface Document
public void addKeyword(String name, Double value)
addKeyword
in interface Document
public void addKeyword(String name, double[] values)
addKeyword
in interface Document
public void addKeyword(String name, Double[] values)
addKeyword
in interface Document
public void addKeyword(String name, float value)
addKeyword
in interface Document
public void addKeyword(String name, Float value)
addKeyword
in interface Document
public void addKeyword(String name, float[] values)
addKeyword
in interface Document
public void addKeyword(String name, Float[] values)
addKeyword
in interface Document
public void addKeyword(String name, int value)
addKeyword
in interface Document
public void addKeyword(String name, int[] values)
addKeyword
in interface Document
public void addKeyword(String name, Integer value)
addKeyword
in interface Document
public void addKeyword(String name, Integer[] values)
addKeyword
in interface Document
public void addKeyword(String name, long value)
addKeyword
in interface Document
public void addKeyword(String name, Long value)
addKeyword
in interface Document
public void addKeyword(String name, long[] values)
addKeyword
in interface Document
public void addKeyword(String name, Long[] values)
addKeyword
in interface Document
public void addKeyword(String name, short value)
addKeyword
in interface Document
public void addKeyword(String name, Short value)
addKeyword
in interface Document
public void addKeyword(String name, short[] values)
addKeyword
in interface Document
public void addKeyword(String name, Short[] values)
addKeyword
in interface Document
public void addKeyword(String name, String value)
addKeyword
in interface Document
public void addKeyword(String name, String value, boolean lowerCase)
addKeyword
in interface Document
public void addKeyword(String name, String[] values)
addKeyword
in interface Document
public void addKeywordSortable(String name, Boolean value)
addKeywordSortable
in interface Document
public void addKeywordSortable(String name, Boolean[] values)
addKeywordSortable
in interface Document
public void addKeywordSortable(String name, String value)
addKeywordSortable
in interface Document
public void addKeywordSortable(String name, String[] values)
addKeywordSortable
in interface Document
public void addLocalizedKeyword(String name, Map<Locale,String> values)
addLocalizedKeyword
in interface Document
public void addLocalizedKeyword(String name, Map<Locale,String> values, boolean lowerCase)
addLocalizedKeyword
in interface Document
public void addLocalizedKeyword(String name, Map<Locale,String> values, boolean lowerCase, boolean sortable)
addLocalizedKeyword
in interface Document
public void addLocalizedText(String name, Map<Locale,String> values)
addLocalizedText
in interface Document
public void addNumber(String name, BigDecimal value)
public void addNumber(String name, BigDecimal[] values)
public void addNumber(String name, double value)
public void addNumber(String name, Double value)
public void addNumber(String name, double[] values)
public void addNumber(String name, Double[] values)
public void addNumber(String name, float value)
public void addNumber(String name, Float value)
public void addNumber(String name, float[] values)
public void addNumber(String name, Float[] values)
public void addNumber(String name, int value)
public void addNumber(String name, int[] values)
public void addNumber(String name, Integer value)
public void addNumber(String name, Integer[] values)
public void addNumber(String name, long value)
public void addNumber(String name, Long value)
public void addNumber(String name, long[] values)
public void addNumber(String name, Long[] values)
public void addNumber(String name, String value)
public void addNumber(String name, String[] values)
public void addNumberSortable(String name, BigDecimal value)
addNumberSortable
in interface Document
public void addNumberSortable(String name, BigDecimal[] values)
addNumberSortable
in interface Document
public void addNumberSortable(String name, Double value)
addNumberSortable
in interface Document
public void addNumberSortable(String name, Double[] values)
addNumberSortable
in interface Document
public void addNumberSortable(String name, Float value)
addNumberSortable
in interface Document
public void addNumberSortable(String name, Float[] values)
addNumberSortable
in interface Document
public void addNumberSortable(String name, Integer value)
addNumberSortable
in interface Document
public void addNumberSortable(String name, Integer[] values)
addNumberSortable
in interface Document
public void addNumberSortable(String name, Long value)
addNumberSortable
in interface Document
public void addNumberSortable(String name, Long[] values)
addNumberSortable
in interface Document
public void addText(String name, String[] values)
public void addTextSortable(String name, String value)
addTextSortable
in interface Document
public void addTextSortable(String name, String[] values)
addTextSortable
in interface Document
public void addUID(String portletId, long field1, String field2)
public void addUID(String portletId, Long field1, String field2)
public void addUID(String portletId, String field1)
public void addUID(String portletId, String field1, String field2)
public void addUID(String portletId, String field1, String field2, String field3)
public void addUID(String portletId, String field1, String field2, String field3, String field4)
public Object clone()
public String get(Locale locale, String name, String defaultName)
public Date getDate(String name) throws ParseException
public String getPortletId()
getPortletId
in interface Document
public boolean isDocumentSortableTextField(String name)
isDocumentSortableTextField
in interface Document
public void setFields(Map<String,Field> fields)
public void setSortableTextFields(String[] sortableTextFields)
setSortableTextFields
in interface Document
public String toString()
toString
in class Object
protected Field createField(String name)
protected Field createField(String name, boolean sortable, String... values)
protected Field createField(String name, Map<Locale,String> localizedValues)
protected Field createField(String name, Map<Locale,String> localizedValues, boolean sortable)
protected Field createField(String name, String... values)
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)
protected Field doGetField(String name, boolean createIfNew)
protected void setSortableTextFields(Set<String> sortableTextFields)
protected void toString(StringBundler sb, Collection<Field> fields)