|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.unidu.is.util.DBSet
A set which is backed by a RDBMS table.
This class uses a table wich one column (the default name is "value", but this can be changed) with the SQL type "text" for storing the set. This means that this set can only be used with strings, or with objects for which the string representation is sufficient.
| Field Summary | |
protected java.lang.String |
col
The column name used for this set. |
protected DB |
db
The DB which is used for backing this set. |
protected java.lang.String |
tableName
The table used for backing this set. |
| Constructor Summary | |
DBSet(DB db,
java.lang.String tableName)
Creates a new instance (and the corresponding table, if it does not exists), and sets the column to "value". |
|
DBSet(DB db,
java.lang.String tableName,
java.lang.String col)
Creates a new instance (and the corresponding table, if it does not exists), and sets the column name. |
|
| Method Summary | |
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
void |
clear()
|
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection c)
|
void |
delete()
Deletes the corresponding table. |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
boolean |
retainAll(java.util.Collection c)
|
int |
size()
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected DB db
protected java.lang.String tableName
protected java.lang.String col
| Constructor Detail |
public DBSet(DB db,
java.lang.String tableName)
db - DB used by this settableName - name of the table used by this set
public DBSet(DB db,
java.lang.String tableName,
java.lang.String col)
db - DB used by this settableName - name of the table used by this setcol - column name| Method Detail |
public void delete()
public int size()
size in interface java.util.Setpublic boolean isEmpty()
isEmpty in interface java.util.Setpublic boolean contains(java.lang.Object o)
contains in interface java.util.Setpublic java.util.Iterator iterator()
iterator in interface java.util.Setpublic java.lang.Object[] toArray()
toArray in interface java.util.Setpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.Setpublic boolean add(java.lang.Object o)
add in interface java.util.Setpublic boolean remove(java.lang.Object o)
remove in interface java.util.Setpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.Setpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.Setpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.Setpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.Setpublic void clear()
clear in interface java.util.Setpublic boolean equals(java.lang.Object obj)
equals in interface java.util.Setpublic int hashCode()
hashCode in interface java.util.Setpublic java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||