Spring Data Solr

org.springframework.data.solr.core.query
Class DefaultValueFunction

java.lang.Object
  extended by org.springframework.data.solr.core.query.AbstractFunction
      extended by 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
Author:
Christoph Strobl

Method Summary
static DefaultValueFunction defaultValue(Field field, Object defaultValue)
          Creates new DefaultValueFunction representing def(field.getName(), defaultValue))
static DefaultValueFunction defaultValue(Function function, Object defaultValue)
          Creates new DefaultValueFunction representing def(function, defaultValue))
static DefaultValueFunction defaultValue(String fieldName, Object defaultValue)
          Creates new DefaultValueFunction representing def(fieldname, defaultValue))
 String getOperation()
          solr readable representation of function
 
Methods inherited from class org.springframework.data.solr.core.query.AbstractFunction
addArgument, getArguments, hasArguments, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

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:

Spring Data Solr

Copyright © 2011-2014-2014 Pivotal. All Rights Reserved.