public interface DocumentCondition
| Modifier and Type | Interface and Description |
|---|---|
static interface |
DocumentCondition.DocumentConditionProvider
A provider of
DocumentCondition where it will create from two parameters:
The first one is Document
The second one is the Condition |
| Modifier and Type | Method and Description |
|---|---|
static DocumentCondition |
and(DocumentCondition... conditions)
Returns a new
DocumentCondition aggregating ,as ¨AND", all the conditions as just one condition. |
DocumentCondition |
and(DocumentCondition condition)
Creates a new
DocumentCondition using the Condition.AND |
static DocumentCondition |
between(Document document)
Creates a
DocumentCondition that has a Condition.BETWEEN,
it means a select will scanning to a document collection that is between two values informed
on a document name. |
static DocumentCondition |
eq(Document document)
Creates a
DocumentCondition that has a Condition.EQUALS, it means a select will scanning to a
document collection that has the same name and equals value informed in this document. |
Condition |
getCondition()
Gets the conditions to be used in the select
|
Document |
getDocument()
Gets the document to be used in the select
|
static DocumentCondition |
gt(Document document)
Creates a
DocumentCondition that has a Condition.GREATER_THAN,
it means a select will scanning to a document collection that has the same name and the value
greater than informed in this document. |
static DocumentCondition |
gte(Document document)
Creates a
DocumentCondition that has a Condition.GREATER_EQUALS_THAN,
it means a select will scanning to a document collection that has the same name and the value
greater or equals than informed in this document. |
static DocumentCondition |
in(Document document)
Creates a
DocumentCondition that has a Condition.IN, it means a select will scanning to a
document collection that has the same name and the value is within informed in this document. |
static DocumentCondition |
like(Document document)
Creates a
DocumentCondition that has a Condition.LIKE, it means a select will scanning to a
document collection that has the same name and the value is like than informed in this document. |
static DocumentCondition |
lt(Document document)
Creates a
DocumentCondition that has a Condition.LESSER_THAN, it means a select will scanning to a
document collection that has the same name and the value lesser than informed in this document. |
static DocumentCondition |
lte(Document document)
Creates a
DocumentCondition that has a Condition.LESSER_EQUALS_THAN,
it means a select will scanning to a document collection that has the same name and the value
lesser or equals than informed in this document. |
DocumentCondition |
negate()
Creates a new
DocumentCondition negating the current one |
static DocumentCondition |
or(DocumentCondition... conditions)
Returns a new
DocumentCondition aggregating ,as ¨OR", all the conditions as just one condition. |
DocumentCondition |
or(DocumentCondition condition)
Creates a new
DocumentCondition using the Condition.OR |
Document getDocument()
Condition getCondition()
ConditionDocumentCondition and(DocumentCondition condition)
DocumentCondition using the Condition.ANDcondition - the condition to be agregatedNullPointerException - when the condition is nullDocumentCondition negate()
DocumentCondition negating the current oneCondition.NOTDocumentCondition or(DocumentCondition condition)
DocumentCondition using the Condition.ORcondition - the condition to be agregatedNullPointerException - when the condition is nullstatic DocumentCondition eq(Document document)
DocumentCondition that has a Condition.EQUALS, it means a select will scanning to a
document collection that has the same name and equals value informed in this document.document - a column instanceDocumentCondition with Condition.EQUALSNullPointerException - when column is nullstatic DocumentCondition gt(Document document)
DocumentCondition that has a Condition.GREATER_THAN,
it means a select will scanning to a document collection that has the same name and the value
greater than informed in this document.document - a column instanceDocumentCondition with Condition.GREATER_THANNullPointerException - when column is nullstatic DocumentCondition gte(Document document)
DocumentCondition that has a Condition.GREATER_EQUALS_THAN,
it means a select will scanning to a document collection that has the same name and the value
greater or equals than informed in this document.document - a column instanceDocumentCondition with Condition.GREATER_EQUALS_THANNullPointerException - when column is nullstatic DocumentCondition lt(Document document)
DocumentCondition that has a Condition.LESSER_THAN, it means a select will scanning to a
document collection that has the same name and the value lesser than informed in this document.document - a column instanceDocumentCondition with Condition.LESSER_THANNullPointerException - when column is nullstatic DocumentCondition lte(Document document)
DocumentCondition that has a Condition.LESSER_EQUALS_THAN,
it means a select will scanning to a document collection that has the same name and the value
lesser or equals than informed in this document.document - a document instanceDocumentCondition with Condition.LESSER_EQUALS_THANNullPointerException - when column is nullstatic DocumentCondition in(Document document)
DocumentCondition that has a Condition.IN, it means a select will scanning to a
document collection that has the same name and the value is within informed in this document.document - a column instanceDocumentCondition with Condition.INNullPointerException - when column is nullstatic DocumentCondition like(Document document)
DocumentCondition that has a Condition.LIKE, it means a select will scanning to a
document collection that has the same name and the value is like than informed in this document.document - a column instanceDocumentCondition with Condition.LIKENullPointerException - when column is nullstatic DocumentCondition between(Document document)
DocumentCondition that has a Condition.BETWEEN,
it means a select will scanning to a document collection that is between two values informed
on a document name.
The document must have a Document.get() an Iterable implementation
with just two elements.document - a column instanceNullPointerException - when document is nullIllegalArgumentException - When the document neither has an Iterable instance or two elements on
an Iterable.static DocumentCondition and(DocumentCondition... conditions)
DocumentCondition aggregating ,as ¨AND", all the conditions as just one condition.
The Document will storage the Condition.getNameField() as key and the value gonna be
the List of all conditions, in other words.
Given:
Document age = Document.of("age", 26);
Document name = Document.of("name", "otavio");
DocumentCondition condition = DocumentCondition.eq(name).and(DocumentCondition.gte(age));
The getDocument() will have "_AND" as key and the list of condition as value.conditions - the conditions to be aggregatedDocumentCondition instanceNullPointerException - when the conditions is nullstatic DocumentCondition or(DocumentCondition... conditions)
DocumentCondition aggregating ,as ¨OR", all the conditions as just one condition.
The Document will storage the Condition.getNameField() as key and the value gonna be
the List of all conditions, in other words.
Given:
Document age = Document.of("age", 26);
Document name = Document.of("name", "otavio");
ColumnCondition condition = DocumentCondition.eq(name).or(DocumentCondition.gte(age));
The getDocument() will have "_OR" as key and the list of condition as value.conditions - the conditions to be aggregatedDocumentCondition instanceNullPointerException - when the condition is nullCopyright © 2017–2020 Eclipse Foundation. All rights reserved.