|
Project Wonder 5.0.0.8795 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecter.extensions.eof.ERXKey<T>
T - the type of the value of this keypublic class ERXKey<T>
ERXKey provides a rich wrapper around a keypath. When combined with chainable qualifiers, ERXKey provides a starting point for the qualifier chain. As an example:
<code>
public class Person extends ERXGenericRecord {
...
public static final ERXKey<Country> country = new ERXKey<Country>(Person.COUNTRY_KEY);
public static final ERXKey<NSTimestamp> birthDate = new ERXKey<NSTimestamp>(Person.BIRTH_DATE_KEY);
...
}
Country germany = ...;
NSTimestamp someRandomDate = ...;
EOQualifier qualifier = Person.country.is(germany).and(Person.birthDate.after(someRandomDate));
</code>
| Nested Class Summary | |
|---|---|
static class |
ERXKey.Type
Enums to desribe the type of key this represents. |
static interface |
ERXKey.ValueCoding
|
| Constructor Summary | |
|---|---|
ERXKey(String key)
Constructs an ERXKey. |
|
| Method Summary | ||
|---|---|---|
ERXKeyValueQualifier |
after(NSTimestamp when)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorGreaterThan, value); |
|
|
append(ERXKey<U> key)
Returns a new ERXKey that appends the given key to this keypath. |
|
|
append(String key)
Returns a new ERXKey that appends the given key to this keypath. |
|
|
appendAsArray(ERXKey<U> key)
Returns a new ERXKey that appends the given key to this keypath. |
|
NSArray<T> |
arrayValueInObject(Object obj)
Returns the value of this keypath on the given object cast as an NSArray. |
|
ERXSortOrdering |
asc()
Equivalent to ERXS.asc(key()) |
|
ERXSortOrdering |
ascInsensitive()
Equivalent to ERXS.ascInsensitive(key()) |
|
ERXSortOrdering.ERXSortOrderings |
ascInsensitives()
Equivalent to ERXS.ascInsensitives(key()) |
|
ERXSortOrdering.ERXSortOrderings |
ascs()
Equivalent to ERXS.ascs(key()) |
|
ERXKeyValueQualifier |
before(NSTimestamp when)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorLessThan, value); |
|
EOQualifier |
between(T lowerBound,
T upperBound)
Equivalent to key > lowerBound and key < upperBound (exclusive). |
|
EOQualifier |
between(T lowerBound,
T upperBound,
boolean inclusive)
Equivalent to key >= lowerBound and key <= upperBound (inclusive). |
|
ERXKeyValueQualifier |
contains(String value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.OperatorCaseInsensitiveLike, "*" + value + "*"). |
|
ERXAndQualifier |
containsAll(String tokens)
Returns a qualifier that evalutes to true when the value of the given key contains all of the given tokens (insensitively) in the search string. |
|
ERXAndQualifier |
containsAll(String[] tokens)
Returns a qualifier that evalutes to true when the value of the given key contains all of the given tokens (insensitively). |
|
ERXOrQualifier |
containsAny(String tokens)
Returns a qualifier that evalutes to true when the value of the given key contains any of the given tokens (insensitively) in the search string. |
|
ERXOrQualifier |
containsAny(String[] tokens)
Returns a qualifier that evalutes to true when the value of the given key contains any of the given tokens (insensitively). |
|
ERXSortOrdering |
desc()
Equivalent to ERXS.desc(key()) |
|
ERXSortOrdering |
descInsensitive()
Equivalent to ERXS.descInsensitive(key()) |
|
ERXSortOrdering.ERXSortOrderings |
descInsensitives()
Equivalent to ERXS.descInsensitives(key()) |
|
ERXSortOrdering.ERXSortOrderings |
descs()
Equivalent to ERXS.descs(key()) |
|
|
dot(ERXKey<U> key)
Calls append(key) |
|
|
dot(String key)
Calls append(key) |
|
|
dotArray(ERXKey<U> key)
Calls appendAsArray(key). |
|
ERXKeyValueQualifier |
eq(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorEqual, value); |
|
boolean |
equals(Object obj)
|
|
ERXKeyValueQualifier |
greaterThan(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorGreaterThan, value); |
|
ERXKeyValueQualifier |
greaterThanOrEqualTo(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorGreaterThanOrEqualTo, value); |
|
ERXKeyValueQualifier |
gt(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorGreaterThan, value); |
|
ERXKeyValueQualifier |
gte(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorGreaterThanOrEqualTo, value); |
|
int |
hashCode()
|
|
ERXKeyValueQualifier |
ilike(String value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorCaseInsensitiveLike, value); |
|
ERXOrQualifier |
in(NSArray<T> values)
Equivalent to a new ERXOrQualifier of EOKeyValueQualifier with key equals value for each value. |
|
ERXOrQualifier |
inObjects(T... values)
Equivalent to a new ERXOrQualifier of EOKeyValueQualifier with key equals value for each value. |
|
ERXKeyValueQualifier |
is(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorEqual, value); |
|
ERXKeyValueQualifier |
isFalse()
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorEqual, Boolean.FALSE); |
|
ERXKeyValueQualifier |
isNot(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorNotEqual, value); |
|
ERXKeyValueQualifier |
isNotNull()
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorNotEqual, null); |
|
ERXKeyValueQualifier |
isNull()
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorEqual, null); |
|
ERXKeyValueQualifier |
isTrue()
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorEqual, Boolean.TRUE); |
|
ERXKeyValueQualifier |
isUnlessNull(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorEqual, value) only if the value is not null. |
|
String |
key()
Returns the keypath that this ERXKey represents. |
|
ERXKeyValueQualifier |
lessThan(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorLessThan, value); |
|
ERXKeyValueQualifier |
lessThanOrEqualTo(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorLessThanOrEqualTo, value); |
|
ERXKeyValueQualifier |
like(String value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorLike, value); |
|
ERXKeyValueQualifier |
likeInsensitive(String value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorCaseInsensitiveLike, value); |
|
ERXKeyValueQualifier |
lt(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorLessThan, value); |
|
ERXKeyValueQualifier |
lte(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorLessThanOrEqualTo, value); |
|
ERXKeyValueQualifier |
ne(T value)
Equivalent to new ERXKeyValueQualifier(key, EOQualifier.QualifierOperatorNotEqual, value); |
|
ERXAndQualifier |
notIn(NSArray<T> values)
Equivalent to a new ERXAndQualifier of EONotQualifier(EOKeyValueQualifier) with key equals value for each value. |
|
Object |
rawValueInObject(Object obj)
Returns the value of this keypath on the given object. |
|
void |
takeValueInObject(T value,
Object obj)
Sets the value of this keypath on the given object. |
|
String |
toString()
|
|
T |
valueInObject(Object obj)
Returns the value of this keypath on the given object. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ERXKey(String key)
key - the underlying keypath| Method Detail |
|---|
public ERXSortOrdering asc()
public ERXSortOrdering.ERXSortOrderings ascs()
public ERXSortOrdering desc()
public ERXSortOrdering.ERXSortOrderings descs()
public ERXSortOrdering ascInsensitive()
public ERXSortOrdering.ERXSortOrderings ascInsensitives()
public ERXSortOrdering descInsensitive()
public ERXSortOrdering.ERXSortOrderings descInsensitives()
public String key()
public ERXKeyValueQualifier isTrue()
public ERXKeyValueQualifier isFalse()
public ERXKeyValueQualifier isUnlessNull(T value)
value - the value
public ERXKeyValueQualifier is(T value)
value - the value
public ERXKeyValueQualifier eq(T value)
value - the value
public ERXKeyValueQualifier isNot(T value)
value - the value
public ERXKeyValueQualifier ne(T value)
value - the value
public ERXKeyValueQualifier greaterThan(T value)
value - the value
public ERXKeyValueQualifier gt(T value)
value - the value
public ERXKeyValueQualifier lessThan(T value)
value - the value
public ERXKeyValueQualifier lt(T value)
value - the value
public ERXKeyValueQualifier greaterThanOrEqualTo(T value)
value - the value
public ERXKeyValueQualifier gte(T value)
value - the value
public ERXKeyValueQualifier lessThanOrEqualTo(T value)
value - the value
public ERXKeyValueQualifier lte(T value)
value - the value
public ERXKeyValueQualifier like(String value)
value - the value
public ERXKeyValueQualifier likeInsensitive(String value)
value - the value
public ERXKeyValueQualifier ilike(String value)
value - the value
public ERXKeyValueQualifier isNull()
public ERXKeyValueQualifier isNotNull()
public ERXOrQualifier inObjects(T... values)
values - the values
public ERXOrQualifier in(NSArray<T> values)
values - the values
public ERXAndQualifier notIn(NSArray<T> values)
values - the values
public ERXKeyValueQualifier before(NSTimestamp when)
when - the date to compare with
public ERXKeyValueQualifier after(NSTimestamp when)
when - the date to compare with
public EOQualifier between(T lowerBound,
T upperBound)
lowerBound - the lower bound valueupperBound - the upper bound value
public EOQualifier between(T lowerBound,
T upperBound,
boolean inclusive)
lowerBound - the lower bound valueupperBound - the upper bound valueinclusive - whether or not the between includes the endpoints
public ERXKeyValueQualifier contains(String value)
value - the substring value
public ERXOrQualifier containsAny(String tokens)
tokens - a whitespace separated list of tokens to search for
public ERXOrQualifier containsAny(String[] tokens)
tokens - the list of tokens to search for
public ERXAndQualifier containsAll(String tokens)
tokens - a whitespace separated list of tokens to search for
public ERXAndQualifier containsAll(String[] tokens)
tokens - the list of tokens to search for
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic <U> ERXKey<U> append(String key)
U - the type of the next keykey - the key to append to this keypath
public <U> ERXKey<U> dot(String key)
U - the key typekey - the key to append to this keypath
public <U> ERXKey<U> append(ERXKey<U> key)
U - the type of the next keykey - the key to append to this keypath
public <U> ERXKey<U> dot(ERXKey<U> key)
U - the key typekey - the key to append to this keypath
public <U> ERXKey<NSArray<U>> appendAsArray(ERXKey<U> key)
<code>
ERXKey<String> k = new ERXKey<String>("foo");
ERXKey<NSArray<String>> a = new ERXKey<NSArray<String>>("foos");
k = k.append(k);
a = a.append(k);
a = k.appendAsArray(k);
k = k.appendAsArray(k);
a = k.appendAsArray(a);
a = a.appendAsArray(k);
a = a.appendAsArray(a);
</code>
U - the type of the next key in the arraykey - the key to append to this keypath
public <U> ERXKey<NSArray<U>> dotArray(ERXKey<U> key)
U - the typekey - the key to append to this keypath
public T valueInObject(Object obj)
obj - the target object to apply this keypath on
public Object rawValueInObject(Object obj)
obj - the target object to apply this keypath on
public NSArray<T> arrayValueInObject(Object obj)
obj - the target object to apply this keypath on
public void takeValueInObject(T value,
Object obj)
value - the value to setobj - the object to set the value onpublic String toString()
toString in class Object
|
Last updated: Fri, Jan 9, 2009 04:35 AM EST | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||