- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 32 of file ModelSearch.java.
◆ ModelSearch()
org.turro.contacts.model.ModelSearch.ModelSearch |
( |
| ) |
|
Definition at line 37 of file ModelSearch.java.
38 this.fieldContact =
"contact";
39 this.fieldRelation =
"relation";
40 this.fieldConnector =
"connector";
41 this.fieldAddress =
"address";
42 this.fieldSyndication =
"syndication";
43 this.fieldComment =
"comment";
44 this.useConnector =
false;
45 this.useAddress =
false;
46 this.useComment =
false;
◆ apply()
void org.turro.contacts.model.ModelSearch.apply |
( |
String |
operator, |
|
|
String |
value, |
|
|
WhereClause |
wc, |
|
|
boolean |
stopIfEmpty |
|
) |
| |
Definition at line 121 of file ModelSearch.java.
122 if(Strings.isBlank(value)) {
123 wc.addClause(
operator + (stopIfEmpty ?
" 1=2" :
" 1=1"));
124 }
else if(value.indexOf(
"=") > 0) {
125 applyPair(
operator, value, wc);
127 Set<String> fields =
new HashSet<>();
128 fields.add(
"contact.name");
129 fields.add(
"contact.globalIdentifier");
130 if(useConnector) fields.add(
"connector.value");
132 fields.add(
"address.city");
133 fields.add(
"address.zipCode");
134 fields.add(
"address.province");
135 fields.add(
"address.state");
136 fields.add(
"address.street");
138 if(useComment) fields.add(
"comment.comment");
139 wc.setPrefix(
operator);
140 wc.addLikeFields(fields.toArray(
new String[0]), value);
◆ getFieldAddress()
String org.turro.contacts.model.ModelSearch.getFieldAddress |
( |
| ) |
|
◆ getFieldComment()
String org.turro.contacts.model.ModelSearch.getFieldComment |
( |
| ) |
|
◆ getFieldConnector()
String org.turro.contacts.model.ModelSearch.getFieldConnector |
( |
| ) |
|
◆ getFieldContact()
String org.turro.contacts.model.ModelSearch.getFieldContact |
( |
| ) |
|
◆ getFieldRelation()
String org.turro.contacts.model.ModelSearch.getFieldRelation |
( |
| ) |
|
◆ getFieldSyndication()
String org.turro.contacts.model.ModelSearch.getFieldSyndication |
( |
| ) |
|
◆ isUseAddress()
boolean org.turro.contacts.model.ModelSearch.isUseAddress |
( |
| ) |
|
◆ isUseComment()
boolean org.turro.contacts.model.ModelSearch.isUseComment |
( |
| ) |
|
◆ isUseConnector()
boolean org.turro.contacts.model.ModelSearch.isUseConnector |
( |
| ) |
|
◆ setFieldAddress()
void org.turro.contacts.model.ModelSearch.setFieldAddress |
( |
String |
fieldAddress | ) |
|
◆ setFieldComment()
void org.turro.contacts.model.ModelSearch.setFieldComment |
( |
String |
fieldComment | ) |
|
◆ setFieldConnector()
void org.turro.contacts.model.ModelSearch.setFieldConnector |
( |
String |
fieldConnector | ) |
|
◆ setFieldContact()
void org.turro.contacts.model.ModelSearch.setFieldContact |
( |
String |
fieldContact | ) |
|
◆ setFieldRelation()
void org.turro.contacts.model.ModelSearch.setFieldRelation |
( |
String |
fieldRelation | ) |
|
◆ setFieldSyndication()
void org.turro.contacts.model.ModelSearch.setFieldSyndication |
( |
String |
fieldSyndication | ) |
|
Definition at line 85 of file ModelSearch.java.
86 this.fieldSyndication = fieldSyndication;
◆ setUseAddress()
void org.turro.contacts.model.ModelSearch.setUseAddress |
( |
boolean |
useAddress | ) |
|
◆ setUseComment()
void org.turro.contacts.model.ModelSearch.setUseComment |
( |
boolean |
useComment | ) |
|
◆ setUseConnector()
void org.turro.contacts.model.ModelSearch.setUseConnector |
( |
boolean |
useConnector | ) |
|
The documentation for this class was generated from the following file: