public class WikittyQueryMaker extends Object
Condition c = new WikittyQueryMaker().and().eq("ext.field", "toto").eq("ext.field2", 10).getCondition();
On peut aussi vouloir continuer avec un WikittyQuery pour cela on peut faire.
WikittyQuery q = new WikittyQueryMaker().and().[other condition].end();
Si un WikittyQuery est passé en parametre du constructeur et que la
method end() est appeler alors la condition creee est envoyee dans
le WikittyQuery et le constructeur est fermer (on ne peut plus ajouter de
condition)
Le WikittyQuery lie avec cet objet lorsqu'on le recupere via la method
getQuery() a en interne comme condition la valuer courante de la
condition en cours d'ecriture
| Modifier and Type | Field and Description |
|---|---|
protected Condition |
condition
query condition
|
protected Deque<Condition> |
openStack
stack des conditions non terminales ouvertes
|
protected WikittyQuery |
query
query where to send condition when end() method called
|
| Constructor and Description |
|---|
WikittyQueryMaker() |
WikittyQueryMaker(WikittyQuery query) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCondition(Condition c)
Ajout une condition
|
protected void |
addCondition(Condition c,
boolean terminal)
Ajout une condition.
|
WikittyQueryMaker |
and()
And (sub query).
|
WikittyQueryMaker |
bw(Element element) |
WikittyQueryMaker |
bw(Element element,
Object lowerValue,
Object upperValue) |
WikittyQueryMaker |
bw(String fqfield,
Object lowerValue,
Object upperValue)
Between.
|
WikittyQueryMaker |
close()
Close last non terminal condition (or, and, not, in).
|
protected void |
closeIfNecessary() |
WikittyQueryMaker |
condition(Condition c)
|
WikittyQueryMaker |
containsAll(Element element) |
<E> WikittyQueryMaker |
containsAll(Element element,
Collection<E> values)
Force l'ajout du containsAll en terminal (il n'y a pas besoin de faire
de
close() |
WikittyQueryMaker |
containsAll(String element) |
<E> WikittyQueryMaker |
containsAll(String fqfield,
Collection<E> values)
Contains.
|
<E> WikittyQueryMaker |
containsAll(String fqfield,
E value1,
E... values)
Search on lists (multivalued fields) that a field contains all the values
given in parameter.
|
WikittyQueryMaker |
containsOne(Element element) |
<E> WikittyQueryMaker |
containsOne(Element element,
Collection<E> values)
Force l'ajout du containsAll en terminal (il n'y a pas besoin de faire
de
close() |
WikittyQueryMaker |
containsOne(String element) |
<E> WikittyQueryMaker |
containsOne(String fqfield,
Collection<E> values)
Search if a field is contained in the list of values in parameter
Ex : The field with value titi is in [titi,tutu] but not in
[tutu,tata]
Force l'ajout du containsAll en terminal (il n'y a pas besoin de faire
de
close() |
<E> WikittyQueryMaker |
containsOne(String fqfield,
E value1,
E... values)
Search if a field is contained in the list of values in parameter
Ex : The field with value titi is in [titi,tutu] but not in
[tutu,tata]
Ps : Use wildcards in the values if you search for substrings.
|
protected static ConditionValue |
convertToConditionValue(Object o) |
WikittyQuery |
end()
Ferme la construction de la condition et la met en place dans la
WikittyQuery qui sera retournee
|
WikittyQueryMaker |
eq(Element element) |
WikittyQueryMaker |
eq(Element element,
Object value) |
WikittyQueryMaker |
eq(String fqfield,
Object value)
Equals.
|
WikittyQueryMaker |
eqIgnoreCaseAndAccent(Element element) |
WikittyQueryMaker |
eqIgnoreCaseAndAccent(Element element,
Object value) |
WikittyQueryMaker |
eqIgnoreCaseAndAccent(String fqfield,
Object value)
Equals.
|
WikittyQueryMaker |
ew(Element element,
Object value) |
WikittyQueryMaker |
ew(String fqfield,
Object value)
Ends with.
|
WikittyQueryMaker |
extContainsAll(Collection<String> extensionNames)
Extension equals.
|
WikittyQueryMaker |
extContainsAll(String ext1,
String... exts) |
WikittyQueryMaker |
extContainsOne(Collection<String> extensionNames)
Extension equals.
|
WikittyQueryMaker |
extContainsOne(String ext1,
String... exts) |
WikittyQueryMaker |
exteq(String extensionName)
Extension equals.
|
WikittyQueryMaker |
extne(String extensionName)
Extension not equals.
|
WikittyQueryMaker |
ge(Element element) |
WikittyQueryMaker |
ge(Element element,
Object value) |
WikittyQueryMaker |
ge(String fqfield,
Object value)
Greater than or equals.
|
Condition |
getCondition() |
protected Deque<Condition> |
getOpenStack()
Retourne le stack courant des conditions, si le stack est null cela
veut dire que le maker ne permet plus de modification
|
WikittyQuery |
getQuery()
La query passee dans le constructeur ou une nouvelle query si aucune
query n'avait ete passee dans le constructeur
|
WikittyQueryMaker |
gt(Element element) |
WikittyQueryMaker |
gt(Element element,
Object value) |
WikittyQueryMaker |
gt(String fqfield,
Object value)
Greater than.
|
WikittyQueryMaker |
ideq(Object idOrWikitty)
Id equals.
|
WikittyQueryMaker |
idne(Object idOrWikitty)
Id not equals.
|
WikittyQueryMaker |
isNotNull(Element element) |
WikittyQueryMaker |
isNotNull(String fqfield)
Is not null.
|
WikittyQueryMaker |
isNull(Element element) |
WikittyQueryMaker |
isNull(String fqfield)
Is null.
|
WikittyQueryMaker |
keyword()
Keyword.
|
WikittyQueryMaker |
keyword(Object value)
Keyword.
|
WikittyQueryMaker |
le(Element element) |
WikittyQueryMaker |
le(Element element,
Object value) |
WikittyQueryMaker |
le(String fqfield,
Object value)
Less than or equals.
|
WikittyQueryMaker |
like(Element element) |
WikittyQueryMaker |
like(Element element,
Object value) |
WikittyQueryMaker |
like(String fqfield,
Object value)
Like.
|
WikittyQueryMaker |
lt(Element element) |
WikittyQueryMaker |
lt(Element element,
Object value) |
WikittyQueryMaker |
lt(String fqfield,
Object value)
Less than.
|
WikittyQueryMaker |
ne(Element element) |
WikittyQueryMaker |
ne(Element element,
Object value) |
WikittyQueryMaker |
ne(String fqfield,
Object value)
Not equals.
|
WikittyQueryMaker |
neIgnoreCaseAndAccent(Element element) |
WikittyQueryMaker |
neIgnoreCaseAndAccent(Element element,
Object value) |
WikittyQueryMaker |
neIgnoreCaseAndAccent(String fqfield,
Object value)
Not equals.
|
WikittyQueryMaker |
not()
Not (sub query).
|
WikittyQueryMaker |
notew(Element element,
Object value) |
WikittyQueryMaker |
notew(String fqfield,
Object value)
Not ends with.
|
WikittyQueryMaker |
notsw(Element element,
String value) |
WikittyQueryMaker |
notsw(String fqfield,
String value)
Not starts with.
|
WikittyQueryMaker |
or()
Or (sub query).
|
WikittyQueryMaker |
parse(String query)
Parse et ajoute un bout de requete.
|
WikittyQueryMaker |
rFalse()
False.
|
WikittyQueryMaker |
rTrue()
True.
|
WikittyQueryMaker |
select(Element element) |
WikittyQueryMaker |
select(Element element,
Aggregate aggregate) |
WikittyQueryMaker |
select(String element)
Add
Select, this condition must be first or |
WikittyQueryMaker |
select(String element,
Aggregate aggregate)
Add
Select, this condition must be first or |
WikittyQueryMaker |
sw(Element element,
String value) |
WikittyQueryMaker |
sw(String fqfield,
String value)
Starts with.
|
WikittyQueryMaker |
unlike(Element element) |
WikittyQueryMaker |
unlike(Element element,
Object value) |
WikittyQueryMaker |
unlike(String fqfield,
Object value)
Unlike.
|
WikittyQueryMaker |
value(Object value) |
WikittyQueryMaker |
wikitty(BusinessEntityImpl e)
Ajoute une contrainte qui cree les conditions en prenant comme exemple
l'objet passer en parametre.
|
WikittyQueryMaker |
wikitty(Wikitty w)
Ajoute une contrainte qui cree les conditions en prenant comme exemple
l'objet passer en parametre.
|
protected WikittyQuery query
protected Condition condition
public WikittyQueryMaker()
public WikittyQueryMaker(WikittyQuery query)
public Condition getCondition()
public WikittyQuery getQuery()
protected Deque<Condition> getOpenStack()
protected void addCondition(Condition c)
protected void addCondition(Condition c, boolean terminal)
protected void closeIfNecessary()
protected static ConditionValue convertToConditionValue(Object o)
public WikittyQueryMaker value(Object value)
public WikittyQueryMaker condition(Condition c)
and(), or(), not(), #in()c - la condition a ajouterthis with the c restriction added.public WikittyQueryMaker parse(String query)
and(), or(), not(), #in()query - la requete a ajouter (peut-etre vide ou nul, dans ce cas, la
condition utiliser est "true")this with the c restriction added.public WikittyQueryMaker wikitty(Wikitty w)
w - le wikitty a prendre comme exemplethis with the w restriction added.public WikittyQueryMaker wikitty(BusinessEntityImpl e)
e - l'objet a prendre comme exemplethis with the e restriction added.public WikittyQueryMaker containsAll(Element element)
ContainsAll}public WikittyQueryMaker containsAll(String element)
ContainsAll}public <E> WikittyQueryMaker containsAll(String fqfield, Collection<E> values)
close()element - the element on which the restriction is putvalues - the values to search in the elementthis with the contains restriction added.ContainsAll}public <E> WikittyQueryMaker containsAll(Element element, Collection<E> values)
close()ContainsAll}public <E> WikittyQueryMaker containsAll(String fqfield, E value1, E... values)
close()element - the element on which the restriction is putvalue1 - first value to search in the fieldvalues - list of values to search in the fieldthis with the contains restriction added.ContainsAll}public WikittyQueryMaker containsOne(Element element)
ContainsOne}public WikittyQueryMaker containsOne(String element)
ContainsOne}public <E> WikittyQueryMaker containsOne(String fqfield, Collection<E> values)
close()element - the element on which the restriction is putvalues - list of values the field must be inthis with the in restriction added.ContainsOne}public <E> WikittyQueryMaker containsOne(Element element, Collection<E> values)
close()ContainsOne}public <E> WikittyQueryMaker containsOne(String fqfield, E value1, E... values)
close()element - the element on which the restriction is putvalue1 - first value the field must be invalues - list of values the field must be inthis with the in restriction added.ContainsOne}public WikittyQueryMaker eq(Element element)
Equals}public WikittyQueryMaker eq(String fqfield, Object value)
element - the field on which the search is madevalue - the value the element must be equals tothisEquals}public WikittyQueryMaker eq(Element element, Object value)
Equals}public WikittyQueryMaker eqIgnoreCaseAndAccent(Element element)
Equals}public WikittyQueryMaker eqIgnoreCaseAndAccent(String fqfield, Object value)
element - the field on which the search is madevalue - the value the element must be equals tothisEquals}public WikittyQueryMaker eqIgnoreCaseAndAccent(Element element, Object value)
Equals}public WikittyQueryMaker exteq(String extensionName)
s - the extension to restrict the results tothis with the exteq restriction added.Equals}public WikittyQueryMaker ideq(Object idOrWikitty)
value - the id or wikitty to restrict the results tothis with the ideq restriction added.Equals}public WikittyQueryMaker extContainsAll(Collection<String> extensionNames)
extensionNames - list of the extension to restrict the results tothis with the exteq restriction added.ContainsAll}public WikittyQueryMaker extContainsAll(String ext1, String... exts)
ContainsAll}public WikittyQueryMaker extContainsOne(Collection<String> extensionNames)
extensionNames - list of the extension to restrict the results tothis with the exteq restriction added.ContainsAll}public WikittyQueryMaker extContainsOne(String ext1, String... exts)
ContainsOne}public WikittyQueryMaker ne(Element element)
NotEquals}public WikittyQueryMaker ne(String fqfield, Object value)
fqfield - the element on which the restriction is putvalue - the value the element must not be equals to.this with the neq restriction added.NotEquals}public WikittyQueryMaker ne(Element element, Object value)
NotEquals}public WikittyQueryMaker neIgnoreCaseAndAccent(Element element)
NotEquals}public WikittyQueryMaker neIgnoreCaseAndAccent(String fqfield, Object value)
fqfield - the element on which the restriction is putvalue - the value the element must not be equals to.this with the neq restriction added.NotEquals}public WikittyQueryMaker neIgnoreCaseAndAccent(Element element, Object value)
NotEquals}public WikittyQueryMaker extne(String extensionName)
extensionName - the extension that the wikitties must not have.this with the extneq restriction added.NotEquals}public WikittyQueryMaker idne(Object idOrWikitty)
idOrWikitty - the id the wikitties must not have.this with the idne restriction added.NotEquals}public WikittyQueryMaker gt(Element element)
Greater}public WikittyQueryMaker gt(String fqfield, Object value)
fqfield - the element on which the restriction is putvalue - the value to be compared tothis with the gt restriction added.Greater}public WikittyQueryMaker gt(Element element, Object value)
Greater}public WikittyQueryMaker ge(Element element)
GreaterOrEquals}public WikittyQueryMaker ge(String fqfield, Object value)
fqfield - the field on which the search is madevalue - the value to be compared tothis with the ge restriction added.GreaterOrEquals}public WikittyQueryMaker ge(Element element, Object value)
GreaterOrEquals}public WikittyQueryMaker lt(Element element)
Less}public WikittyQueryMaker lt(String fqfield, Object value)
fqfield - the element on which the restriction is putvalue - the value to be compared tothis with the lt restriction added.Less}public WikittyQueryMaker lt(Element element, Object value)
Less}public WikittyQueryMaker le(Element element)
LessOrEquals}public WikittyQueryMaker le(String fqfield, Object value)
fqfield - the element on which the restriction is put.value - the value to be compared to.this with the le restriction added.LessOrEquals}public WikittyQueryMaker le(Element element, Object value)
LessOrEquals}public WikittyQueryMaker bw(Element element)
Between}public WikittyQueryMaker bw(String fqfield, Object lowerValue, Object upperValue)
fqfield - the element on which the restriction is put.lowerValue - the lower bound.upperValue - the upper bound.this with the le restriction added.Between}public WikittyQueryMaker bw(Element element, Object lowerValue, Object upperValue)
Between}public WikittyQueryMaker sw(String fqfield, String value)
fqfield - the element on which the restriction is put.value - the value the element must start with.this with the sw restriction added.Equals}public WikittyQueryMaker sw(Element element, String value)
Equals}public WikittyQueryMaker notsw(String fqfield, String value)
fqfield - the element on which the restriction is put.value - the value the element must not start with.this with the nsw restriction added.NotEquals}public WikittyQueryMaker notsw(Element element, String value)
NotEquals}public WikittyQueryMaker ew(String fqfield, Object value)
fqfield - the element on which the restriction is putvalue - the value the element must ends with.this with the ew restriction added.Equals}public WikittyQueryMaker ew(Element element, Object value)
Equals}public WikittyQueryMaker notew(String fqfield, Object value)
fqfield - the element on which the restriction is putvalue - the value the element must not ends with.this with the notew restriction added.NotEquals}public WikittyQueryMaker notew(Element element, Object value)
NotEquals}public WikittyQueryMaker keyword()
value - the value to find.this with the keyword restriction added.Keyword}public WikittyQueryMaker keyword(Object value)
value - the value to find.this with the keyword restriction added.Keyword}public WikittyQueryMaker isNull(String fqfield)
fqfield - the field that must be null.this with the isNull restriction added.Null}public WikittyQueryMaker isNull(Element element)
Null}public WikittyQueryMaker isNotNull(String fqfield)
fqfield - the field that must not be null.this with the isNotNull restriction added.NotNull}public WikittyQueryMaker isNotNull(Element element)
NotNull}public WikittyQueryMaker rFalse()
this with the rFalse restriction added.False}public WikittyQueryMaker rTrue()
this with the rTrue restriction added.True}public WikittyQueryMaker like(Element element)
Like}public WikittyQueryMaker like(String fqfield, Object value)
fqfield - the element on which the restriction is putvalue - thisLike}public WikittyQueryMaker like(Element element, Object value)
Like}public WikittyQueryMaker unlike(Element element)
Unlike}public WikittyQueryMaker unlike(String fqfield, Object value)
fqfield - the element on which the restriction is putvalue - searchAs - thisUnlike}public WikittyQueryMaker unlike(Element element, Object value)
Unlike}public WikittyQueryMaker not()
close()
Not}public WikittyQueryMaker or()
close()
Or}public WikittyQueryMaker and()
close()
And}public WikittyQueryMaker select(String element)
Select, this condition must be first orelement - le champs dont il faut extraire les donneesthisSelect}public WikittyQueryMaker select(String element, Aggregate aggregate)
Select, this condition must be first orelement - le champs dont il faut extraire les donneesthisSelect}public WikittyQueryMaker select(Element element)
public WikittyQueryMaker select(Element element, Aggregate aggregate)
public WikittyQueryMaker close()
public WikittyQuery end()
Copyright © 2009-2012 CodeLutin. All Rights Reserved.