public final class Properties extends Object
properties
.Type | Property and Description |
---|---|
static PropertyType |
emptyList
This factory method creates a new
property representing the empty list. |
Modifier and Type | Method and Description |
---|---|
static PropertyType |
delete()
This factory creates a new
property that marks a property in an index data map as to delete. |
static PropertyType |
emptyListProperty()
This factory method creates a new
property representing the empty list. |
static PropertyType |
listPropertyFromValue(Collection<?> value)
This factory method creates a new list
property by determining the element type from the
first list element. |
static PropertyType |
newListPropertyType(Object value,
FieldTypeEnum memberType)
This factory method for
property types creates list properties. |
static PropertyType |
newPropertyType(Boolean value)
This factory method creates a new
property of type FieldTypeEnum.BOOLEAN with the
given value. |
static PropertyType |
newPropertyType(Collection<?> value)
This factory method creates a new
property of type FieldTypeEnum.LIST with the
given value. |
static PropertyType |
newPropertyType(Date value)
This factory method creates a new
property of type FieldTypeEnum.DATETIME with the
given value. |
static PropertyType |
newPropertyType(Date value)
This factory method creates a new
property of type FieldTypeEnum.DATE with the
given value. |
static PropertyType |
newPropertyType(Number value)
This factory method creates a new
property with the given value. |
static PropertyType |
newPropertyType(Object value,
FieldTypeEnum type)
This is the literal factory method for
property types . |
static PropertyType |
newPropertyType(String value)
This factory method creates a new
property of type FieldTypeEnum.STRING with the
given value. |
static PropertyType |
newPropertyType(Time value)
This factory method creates a new
property of type FieldTypeEnum.TIME with the
given value. |
static PropertyType |
propertyTypeFromValue(Object value)
This convenience factory method analyzes the class of given value and returns a
PropertyType with the
given value and an appropriate type. |
public static PropertyType emptyListProperty
property
representing the empty list.public static PropertyType newPropertyType(Object value, FieldTypeEnum type)
property types
.value
- the value of the propertytype
- the field type of the propertypublic static PropertyType newListPropertyType(Object value, FieldTypeEnum memberType)
property types
creates list properties.value
- the value of the propertymemberType
- the field type of the elements of the propertypublic static PropertyType propertyTypeFromValue(Object value)
PropertyType
with the
given value and an appropriate type. If the given value is null, null is returned.
Note that since the only indication of the field type is the class of the given value there are
field types
that will never be generated by this method. For example a java double will
always result in a property with the type FieldTypeEnum.FLOAT
and never in
FieldTypeEnum.CURRENCY
. See newPropertyType(Object, FieldTypeEnum)
for a more specific factory.value
- the value of the propertypublic static PropertyType listPropertyFromValue(Collection<?> value)
property
by determining the element type from the
first list element. If the first element does not exist emptyListProperty()
will be called.value
- the list to create a property fromproperty
by determining the element type from the first list elementpublic static PropertyType emptyListProperty()
property
representing the empty list.public static PropertyType newPropertyType(Collection<?> value)
property
of type FieldTypeEnum.LIST
with the
given value.value
- the value of the propertypublic static PropertyType newPropertyType(Date value)
property
of type FieldTypeEnum.DATETIME
with the
given value.value
- the value of the propertypublic static PropertyType newPropertyType(Boolean value)
property
of type FieldTypeEnum.BOOLEAN
with the
given value.value
- the value of the propertypublic static PropertyType newPropertyType(Number value)
property
with the given value. If given number is a float
or double then the field type of the property will be FieldTypeEnum.FLOAT
otherwise it will be
FieldTypeEnum.INTEGER
.value
- the value of the propertypublic static PropertyType newPropertyType(String value)
property
of type FieldTypeEnum.STRING
with the
given value.value
- the value of the propertypublic static PropertyType newPropertyType(Date value)
property
of type FieldTypeEnum.DATE
with the
given value.value
- the value of the propertypublic static PropertyType newPropertyType(Time value)
property
of type FieldTypeEnum.TIME
with the
given value.value
- the value of the propertypublic static PropertyType delete()
property
that marks a property in an index data map as to delete.Copyright © 2016 Lexmark Enterprise Software Deutschland GmbH. All rights reserved.