|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mguennewig.pobjects.AbstractPObjJoin<T>
de.mguennewig.pobjects.PObjMap<T>
public class PObjMap<T extends Record>
Wrapper object for map valued joins between two tables.
Please note that the methods of this class resemble that of the
standard collection class Map, but that the semantics
usually differ to some degree. In particular, every method call is
an operation on the RDBMS, and the backing store's semantics do not
follow those of Java. For example, given statement level read
consistency on the RDBMS, a size() followed by a
findAll().length may produce different results.
Even thought the methods of this map are synchronized is there still the chance for concurrent modifications made by other database users.
| Constructor Summary | |
|---|---|
PObjMap(PObject parent,
java.lang.Class<? extends Record> elementClass)
Creates a new map. |
|
| Method Summary | |
|---|---|
boolean |
containsKey(java.lang.Object... key)
Return true if the given key exists in this map. |
T |
get(java.lang.Object... key)
Return the map element matching the given key, or null if no such row exists. |
T |
put(java.lang.Object... keyValues)
Add the given arguments as an element to the map. |
T |
putIfAbsent(java.lang.Object... keyValues)
If the specified key is not already associated with a value, associate it with the given value. |
boolean |
remove(java.lang.Object... key)
Remove the given arguments as an element from the map. |
boolean |
remove(T obj)
Remove the give record obj as an element from the
map. |
| Methods inherited from class de.mguennewig.pobjects.AbstractPObjJoin |
|---|
clear, findAll, getContainer, getElementClass, getElementDecl, getParent, isEmpty, size |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PObjMap(PObject parent,
java.lang.Class<? extends Record> elementClass)
| Method Detail |
|---|
public T get(java.lang.Object... key)
null if no such row exists.
java.lang.IllegalArgumentException - if key.length !=
pk.length-1.public boolean containsKey(java.lang.Object... key)
true if the given key exists in this map.
java.lang.IllegalArgumentException - if key.length !=
pk.length-1.
public T put(java.lang.Object... keyValues)
throws PObjConstraintException,
PObjSQLException
put() method resembles
store() on a newly created PObject.
keyValues - the list of keys followed by the list of values
null if the
key didn't exist before.
PObjConstraintException
PObjSQLException
public final T putIfAbsent(java.lang.Object... keyValues)
throws PObjConstraintException,
PObjSQLException
keyValues - the list of keys followed by the list of values
null if the
key didn't exist before.
PObjConstraintException
PObjSQLExceptionget(Object[]),
put(Object[])
public boolean remove(T obj)
throws PObjConstraintException,
PObjSQLException
obj as an element from the
map. If the element exists prior to the call, then the result is
true. The data is stored immediately in the RDBMS.
In this, the remove() method resembles
store() on a delete PObject.
PObjConstraintException
PObjSQLException
public boolean remove(java.lang.Object... key)
throws PObjConstraintException,
PObjSQLException
true. The data is stored immediately in the RDBMS.
In this, the put() method resembles
store() on a deleted PObject.
PObjConstraintException
PObjSQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||