|
Cool documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
represents an interface for the unique Key of an AspectRow.
Key objects are strict value objects. That is, two objects are equal, if they have
the same value (same number and order of fields with equal values for corresponding key fields), and
not only if they are represented by the same Java reference.
This makes a Key object a good way to identify an AspectRow, even across caching,
transactions or connection boundaries.
Even if AspectRows or Aspects get invalid, the Key object remains valid and
usable. If data equivalent to the original Aspect is retrieved again from backend and returned as a new
Aspect instance, then the equivalent AspectRow can be found by its Key.
After a successful insert operation, the value of a Key cannot change anymore. But if we have an insert, where the Key was not known before insert, we have a transition from local Key ( no or incomplete field values ) to complete business Key from Backend. Cause this transition from local to complete Key leads to a hashCode change, a local Key should not be used in a HashMap or somethig like this, or you have to consider this after a flush of inserted AspectRows.
| Method Summary | |
java.lang.String[] |
getFields()
Returns a copy of the Key fields of this Key as String array, or null,
if Key is a local Key. |
boolean |
isLocalKey()
Returns true if this key is a local key, not yet knwon to the backend. |
java.lang.String |
toString()
returns a String representation of this Key. |
| Method Detail |
public boolean isLocalKey()
public java.lang.String[] getFields()
Key as String array, or null,
if Key is a local Key.Key as String array, or null,
if Key is a local Key.public java.lang.String toString()
Key. If Key contains the
fields "name1" and "name2" for example the String representation looks like:
[name1, name2]
toString in class java.lang.ObjectKey
|
Cool documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||