|
Spring Data Couchbase | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.couchbase.core.mapping.CouchbaseList
public class CouchbaseList
A CouchbaseList is an abstract list that represents an array stored in a (most of the times JSON) document.
This CouchbaseList is part of the potentially nested structure inside one or more
CouchbaseDocuments. It can also contain them recursively, depending on how the document is modeled.
| Constructor Summary | |
|---|---|
CouchbaseList()
Create a new (empty) list. |
|
CouchbaseList(List<Object> initialPayload)
Create a new list with a given payload on construction. |
|
| Method Summary | |
|---|---|
boolean |
containsValue(Object value)
Returns true if it contains the given value. |
List<Object> |
export()
Returns the current payload, including all recursive elements. |
Object |
get(int index)
Return the stored element at the given index. |
boolean |
isEmpty()
Checks if the underlying payload is empty or not. |
CouchbaseList |
put(Object value)
Add content to the underlying list. |
int |
size()
Returns the size of the attributes in this document (not nested). |
int |
size(boolean recursive)
Retruns the size of the attributes in this and recursive documents. |
String |
toString()
A string reprensation of the payload. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CouchbaseList()
public CouchbaseList(List<Object> initialPayload)
initialPayload - the initial data to store.| Method Detail |
|---|
public final CouchbaseList put(Object value)
value - the value to be added.
CouchbaseList object for chaining purposes.public final Object get(int index)
index - the index where the document is located.
public final int size()
public final int size(boolean recursive)
recursive - wheter nested attributes should be taken into account.
public final List<Object> export()
public final boolean containsValue(Object value)
value - the value to check for.
public final boolean isEmpty()
public String toString()
toString in class Object
|
Spring Data Couchbase | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||