|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.couchbase.client.protocol.views.DesignDocument<T>
public class DesignDocument<T>
The DesignDocument represents a design document stored and retrieved from a Couchbase cluster.
Constructor Summary | |
---|---|
DesignDocument(java.lang.String name)
Create a new DesignDocument with a name. |
|
DesignDocument(java.lang.String name,
java.util.List<ViewDesign> views,
java.util.List<SpatialViewDesign> spatialViews)
Create a new DesignDocument with a name and (spatial) views. |
Method Summary | |
---|---|
java.lang.String |
getLanguage()
Get the language of the views. |
java.lang.String |
getName()
Get the name of the design document. |
java.util.List<SpatialViewDesign> |
getSpatialViews()
Return a list of all stored spatial views. |
java.util.List<ViewDesign> |
getViews()
Get the list of the associated view designs. |
DesignDocument |
setName(java.lang.String n)
Set the name of the design document. |
DesignDocument |
setSpatialView(SpatialViewDesign spatialView)
Add a single spatial view to the list of stored DpatialViewDesign objects. |
DesignDocument |
setSpatialViews(java.util.List<SpatialViewDesign> sv)
Set a list of SpatialViewDesigns. |
DesignDocument |
setView(ViewDesign view)
Add a single view to the list of stored ViewDesign objects. |
DesignDocument |
setViews(java.util.List<ViewDesign> v)
Set a list of ViewDesigns. |
java.lang.String |
toJson()
Create a JSON representation of the design document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DesignDocument(java.lang.String name)
name
- the name of the DesignDocument.public DesignDocument(java.lang.String name, java.util.List<ViewDesign> views, java.util.List<SpatialViewDesign> spatialViews)
name
- the name of the DesignDocument.views
- a list of ViewDesigns, which represent the views.spatialViews
- a list of SpatialViewDesigns, which represent
the spatial views.Method Detail |
---|
public java.lang.String getLanguage()
public java.lang.String getName()
public java.util.List<ViewDesign> getViews()
public DesignDocument setViews(java.util.List<ViewDesign> v)
v
- the list of ViewDesign objects representing the views.
public DesignDocument setView(ViewDesign view)
view
- a single view to be added.
public java.util.List<SpatialViewDesign> getSpatialViews()
public DesignDocument setSpatialViews(java.util.List<SpatialViewDesign> sv)
sv
- the list of SpatialViewDesign objects.
public DesignDocument setSpatialView(SpatialViewDesign spatialView)
spatialView
- a single spatial view to be added.
public DesignDocument setName(java.lang.String n)
n
- the name of the design document.
public java.lang.String toJson()
java.lang.RuntimeException
- when no view or no name is set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |