Class DefaultValueFunction

java.lang.Object
org.springframework.data.solr.core.query.AbstractFunction
org.springframework.data.solr.core.query.DefaultValueFunction
All Implemented Interfaces:
Function

public class DefaultValueFunction extends AbstractFunction
Implementation of def(field|function,defaultValue)
Since:
1.1
  • Method Details

    • defaultValue

      public static DefaultValueFunction defaultValue(String fieldName, Object defaultValue)
      Creates new DefaultValueFunction representing def(fieldname, defaultValue))
      Parameters:
      fieldName - must not be empty
      defaultValue - must not be null
      Returns:
    • defaultValue

      public static DefaultValueFunction defaultValue(Field field, Object defaultValue)
      Creates new DefaultValueFunction representing def(field.getName(), defaultValue))
      Parameters:
      field - must not be null
      defaultValue - must not be null
      Returns:
    • defaultValue

      public static DefaultValueFunction defaultValue(Function function, Object defaultValue)
      Creates new DefaultValueFunction representing def(function, defaultValue))
      Parameters:
      function - must not be null
      defaultValue - must not be null
      Returns:
    • getOperation

      public String getOperation()
      Description copied from interface: Function
      solr readable representation of function
      Returns: