Package com.liferay.portal.odata.entity
Class EntityField
java.lang.Object
com.liferay.portal.odata.entity.EntityField
- Direct Known Subclasses:
BooleanEntityField
,CollectionEntityField
,ComplexEntityField
,DateEntityField
,DateTimeEntityField
,DoubleEntityField
,IdEntityField
,IntegerEntityField
,StringEntityField
Models an entity field.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEntityField
(String name, EntityField.Type type, Function<Locale, String> sortableFieldNameFunction, Function<Locale, String> filterableFieldNameFunction, Function<Object, String> filterableFieldValueFunction) Creates a newEntityField
with separate functions for converting the entity field's name to a sortable and filterable field name for a locale. -
Method Summary
Modifier and TypeMethodDescriptiongetFilterableName
(Locale locale) Returns the entity field's filterable name.getFilterableValue
(Object fieldValue) Returns the entity field's filterable value.getName()
Returns the entity field's name.getSortableName
(Locale locale) Returns the entity field's sortable name for a locale.getType()
Returns the entity field's type.toString()
-
Constructor Details
-
EntityField
public EntityField(String name, EntityField.Type type, Function<Locale, String> sortableFieldNameFunction, Function<Locale, String> filterableFieldNameFunction, Function<Object, String> filterableFieldValueFunction) Creates a newEntityField
with separate functions for converting the entity field's name to a sortable and filterable field name for a locale.- Parameters:
name
- the entity field's nametype
- the typesortableFieldNameFunction
- the sortable field nameFunction
filterableFieldNameFunction
- the filterable field nameFunction
filterableFieldValueFunction
- the filterable field valueFunction
-
-
Method Details
-
getFilterableName
Returns the entity field's filterable name.- Parameters:
locale
- the locale- Returns:
- the filterable name
-
getFilterableValue
Returns the entity field's filterable value.- Parameters:
fieldValue
- the field value- Returns:
- the filterable field value
-
getName
Returns the entity field's name.- Returns:
- the name
-
getSortableName
Returns the entity field's sortable name for a locale.- Parameters:
locale
- the locale- Returns:
- the sortable name
-
getType
Returns the entity field's type.- Returns:
- the type
-
toString
-