|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.scheisseichfindemalkeinen.database.DB
public abstract class DB
Class for the connections to the databases As database db4o is used, which makes it easy to store the Pic- and Keyword-Objects.
| Field Summary | |
|---|---|
static int |
DB_DOWNLOADS
Index of the downloads-db |
static int |
DB_KEYWORDS
Index of the keywords-db |
| Constructor Summary | |
|---|---|
DB()
|
|
| Method Summary | |
|---|---|
static void |
addObject(java.lang.Object object,
int iDB)
Adds an object to the database For updates of objects you should also use this method, because update and add is exactly the same |
static void |
addObjects(java.util.Vector<java.lang.Object> objects,
int iDB)
Adds multiple object to the database For updates of objects you should also use this method, because update and add is exactly the same |
static void |
closeDatabase(int iDB)
Close the database (without commit!) |
static void |
commit(int iDB)
Write data to the database-file |
static void |
defrag(int iDB)
Defragments the database |
static void |
deleteObject(java.lang.Object object,
int iDB)
Deletes an object from the database |
static void |
deleteObjects(java.util.Vector<java.lang.Object> objects,
int iDB)
Deletes multiple objects from the database |
static java.lang.String |
getDatabasePath(int iDB)
Returns the path to the database |
static com.db4o.ObjectSet |
getObjects(java.lang.Class cl,
int iDB)
Reads out object from the database which are instances of the given class |
static void |
openDatabase(int iDB)
Open a database |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DB_DOWNLOADS
public static final int DB_KEYWORDS
| Constructor Detail |
|---|
public DB()
| Method Detail |
|---|
public static void openDatabase(int iDB)
iDB - Index of the databasepublic static void closeDatabase(int iDB)
iDB - Index of the databasepublic static java.lang.String getDatabasePath(int iDB)
iDB - Index of the database
public static void addObject(java.lang.Object object,
int iDB)
object - The objectiDB - Index of the database
public static void addObjects(java.util.Vector<java.lang.Object> objects,
int iDB)
objects - ObjectsiDB - Index of the database
public static void deleteObject(java.lang.Object object,
int iDB)
object - the objectiDB - Index of the database
public static void deleteObjects(java.util.Vector<java.lang.Object> objects,
int iDB)
objects - The objectiDB - Index of the database
public static com.db4o.ObjectSet getObjects(java.lang.Class cl,
int iDB)
cl - The ClassiDB - Index of the database
public static void commit(int iDB)
iDB - Index of databasepublic static void defrag(int iDB)
iDB - Index of the database
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||