Class HdexDatabase
java.lang.Object
|
+----HdexCard
|
+----HdexDatabase
-
public class HdexDatabase
-
extends HdexCard
Hyperdex Database 1.0
HdexDatabase is the structural root of a Hyperdex database. A database
corresponds to all of the data for a particular subscriber, organized into
a set of decks (see HdexDeck).
-
See Also:
-
HdexDeck

-
CARD_DECK
-
String constant to select a deck of all HdexCard
-
DB_DECK
-
String constant to select a Database deck
-
EVENT_DECK
-
String constant to select an Event deck
-
GROUP_DECK
-
String constant to select a Group deck
-
PE_DECK
-
String constant to select a PE deck

-
addSubscriber(String)
-
Add a new subscriber to the master database.
-
close()
-
Close a subscriber database.
-
deck(String)
-
Return a particular deck from the subscriber's database.
-
deleteSubscriber(String)
-
Delete a subscriber from the master database.
-
initializeDB(String)
-
Use this method to initialize the master HdexDatabase to a file other than
the default file "default.db".
Deprecated.
-
open(String)
-
Open a particular subscriber's database.
-
saveDB(String)
-
Save the master database, using serialization.
Deprecated.
-
toString()
-
Convert the card to printable representation using space as the field delimiter

PE_DECK
public static final String PE_DECK
-
String constant to select a PE deck
EVENT_DECK
public static final String EVENT_DECK
-
String constant to select an Event deck
GROUP_DECK
public static final String GROUP_DECK
-
String constant to select a Group deck
DB_DECK
public static final String DB_DECK
-
String constant to select a Database deck
CARD_DECK
public static final String CARD_DECK
-
String constant to select a deck of all HdexCard

toString
public String toString()
-
Convert the card to printable representation using space as the field delimiter
-
Overrides:
-
toString
in class HdexCard
initializeDB
public static void initializeDB(String dbfile)
-
Note: initializeDB() is deprecated.
Will not be implemented for
JDBC version.
-
Use this method to initialize the master HdexDatabase to a file other than
the default file "default.db". (Primarily for testing)
-
Parameters:
-
filename - The name of the file to load the global database from.
saveDB
public void saveDB(String filename)
-
Note: saveDB() is deprecated.
Will not be implemented for JDBC
version.
-
Save the master database, using serialization.
-
Parameters:
-
filename - The name of the file to save the global database to.
open
public static HdexDatabase open(String subscriber)
-
Open a particular subscriber's database.
-
Parameters:
-
subscriber - The unique subscriber ID.
-
Returns:
-
The subscriber's database.
close
public void close()
-
Close a subscriber database.
addSubscriber
public static HdexDatabase addSubscriber(String subscriber) throws DatabaseUpdateException
-
Add a new subscriber to the master database.
-
Parameters:
-
subscriber - The unique subscriber ID.
-
Returns:
-
The new subscriber's database.
-
Throws: DatabaseUpdateException
-
When subscriber already exists.
deleteSubscriber
public static void deleteSubscriber(String subscriber) throws DatabaseUpdateException
-
Delete a subscriber from the master database.
-
Parameters:
-
subscriber - The unique subscriber ID.
-
Throws: DatabaseUpdateException
-
If the subscriber does not already exist.
deck
public HdexDeck deck(String type)
-
Return a particular deck from the subscriber's database.
-
Parameters:
-
type - Should be from the class string constants xx_DECK.