|
||||||||||
| 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.PObjSet<T>
public class PObjSet<T extends Record>
Wrapper object for set valued joins between two tables.
Please note that the methods of this class resemble that of the
standard collection class Set, 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.
| Constructor Summary | |
|---|---|
PObjSet(PObject parent,
java.lang.Class<? extends Record> elementClass)
Creates a new set. |
|
| Method Summary | |
|---|---|
void |
add(java.lang.Object... key)
Add the given arguments as an element to the set. |
boolean |
addIfAbsent(java.lang.Object... key)
Add the given arguments as an element to the set if no such already exists. |
boolean |
contains(java.lang.Object... key)
Return true if the given key exists in this set. |
T |
find(java.lang.Object... key)
Return the set element matching the given key, or null if no such row exists. |
boolean |
remove(java.lang.Object... key)
Remove the given arguments as an element from the set. |
boolean |
remove(T obj)
Remove the give record obj as an element from the
set. |
| 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 PObjSet(PObject parent,
java.lang.Class<? extends Record> elementClass)
| Method Detail |
|---|
public T find(java.lang.Object... key)
null if no such row exists.
java.lang.IllegalArgumentException - if key.length !=
pk.length-1.public boolean contains(java.lang.Object... key)
true if the given key exists in this set.
java.lang.IllegalArgumentException - if key.length !=
pk.length-1.
public void add(java.lang.Object... key)
throws PObjConstraintException,
PObjSQLException
add() method resembles
store() on a newly created PObject.
PObjConstraintException
PObjSQLException
public final boolean addIfAbsent(java.lang.Object... key)
throws PObjConstraintException,
PObjSQLException
true if an element has been added to this set,
otherwise false
java.lang.IllegalArgumentException - if
key.length != pk.length-1.
PObjConstraintException
PObjSQLExceptioncontains(Object[]),
add(Object[])
public boolean remove(T obj)
throws PObjConstraintException,
PObjSQLException
obj as an element from the
set. If the element exists prior to the call, then the result is
true. The data is stored immediately in the RDBMS.
In this, the add() 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 add() 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 | |||||||||