Class EntityField

java.lang.Object
com.liferay.portal.odata.entity.EntityField
Direct Known Subclasses:
BooleanEntityField, CollectionEntityField, ComplexEntityField, DateEntityField, DateTimeEntityField, DoubleEntityField, IdEntityField, IntegerEntityField, StringEntityField

public class EntityField extends Object
Models an entity field.
  • Constructor Details

    • EntityField

      public EntityField(String name, EntityField.Type type, Function<Locale,String> sortableFieldNameFunction, Function<Locale,String> filterableFieldNameFunction, Function<Object,String> filterableFieldValueFunction)
      Creates a new EntityField 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 name
      type - the type
      sortableFieldNameFunction - the sortable field name Function
      filterableFieldNameFunction - the filterable field name Function
      filterableFieldValueFunction - the filterable field value Function
  • Method Details

    • getFilterableName

      public String getFilterableName(Locale locale)
      Returns the entity field's filterable name.
      Parameters:
      locale - the locale
      Returns:
      the filterable name
    • getFilterableValue

      public String getFilterableValue(Object fieldValue)
      Returns the entity field's filterable value.
      Parameters:
      fieldValue - the field value
      Returns:
      the filterable field value
    • getName

      public String getName()
      Returns the entity field's name.
      Returns:
      the name
    • getSortableName

      public String getSortableName(Locale locale)
      Returns the entity field's sortable name for a locale.
      Parameters:
      locale - the locale
      Returns:
      the sortable name
    • getType

      public EntityField.Type getType()
      Returns the entity field's type.
      Returns:
      the type
    • toString

      public String toString()
      Overrides:
      toString in class Object