Package com.couchbase.client.java.view
Class DefaultView
java.lang.Object
com.couchbase.client.java.view.DefaultView
- All Implemented Interfaces:
View
public class DefaultView extends Object implements View
Implementation of a regular, non spatial view.
- Since:
- 2.0.0
- Author:
- Michael Nitschinger
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultView(String name, String map, String reduce) -
Method Summary
Modifier and Type Method Description static Viewcreate(String name, String map)Create a new representation of a regular, non-spatial view without reduce function.static Viewcreate(String name, String map, String reduce)Create a new representation of a regular, non-spatial view.booleanequals(Object o)inthashCode()booleanhasReduce()If a reduce function is set or not.Stringmap()The map functionStringname()The name of the view.Stringreduce()The reduce function.StringtoString()
-
Constructor Details
-
DefaultView
-
-
Method Details
-
create
Create a new representation of a regular, non-spatial view.- Parameters:
name- the name of the view.map- the map function (javascript) for the view.reduce- the reduce function (prebuilt name or custom javascript) for the view. Usecreate(String, String)or null if you don't need one.- Returns:
- the view object.
-
create
Create a new representation of a regular, non-spatial view without reduce function.- Parameters:
name- the name of the view.map- the map function (javascript) for the view.- Returns:
- the view object.
-
name
Description copied from interface:ViewThe name of the view. -
map
Description copied from interface:ViewThe map function -
reduce
Description copied from interface:ViewThe reduce function. -
hasReduce
public boolean hasReduce()Description copied from interface:ViewIf a reduce function is set or not. -
toString
-
equals
-
hashCode
public int hashCode()
-