|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.aerith.misao.database.PrimitiveManager | +--net.aerith.misao.database.PrimitiveFileManager
The PrimitiveFileManager
represents a database manager
which covers one folder containing XML elements of the same type.
The elements are stored in 1.xml, 2.xml, ..., Each XML file contains some elements and restricted not to be much larger than the specified limit of file size.
Field Summary | |
protected int |
limit_filesize
The limit of one XML file (50KB). |
protected java.io.File |
path
The folder of the database. |
Fields inherited from class net.aerith.misao.database.PrimitiveManager |
holder_class,
record_class |
Constructor Summary | |
PrimitiveFileManager(java.io.File path,
XmlDBHolder holder_class,
XmlDBRecord record_class)
Constructs a PrimitiveFileManager in the specified
folder, which consists of the XML elements of the specified
class. |
Method Summary | |
void |
addElement(XmlDBRecord element)
Adds the specified XML element into the database. |
void |
addElements(java.util.Vector list)
Adds the XML elements in the specified list into the database. |
XmlDBRecord |
deleteElement(java.lang.String id)
Deletes the element of the specified ID. |
void |
deleteElements(java.util.Hashtable hash)
Deletes the elements in the specified hash table. |
XmlDBAccessor |
getAccessor()
Gets the sequential accessor to the elements in the database. |
int |
getLimitFileSize()
Gets the limit of one XML file. |
java.io.File |
getPath()
Gets the folder path. |
XmlDBRecord |
setElement(XmlDBRecord element)
Adds or updates the specified XML element into the database. |
Methods inherited from class net.aerith.misao.database.PrimitiveManager |
createHolder,
getElement |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.io.File path
protected int limit_filesize
Constructor Detail |
public PrimitiveFileManager(java.io.File path, XmlDBHolder holder_class, XmlDBRecord record_class) throws java.io.IOException
PrimitiveFileManager
in the specified
folder, which consists of the XML elements of the specified
class.path
- the folder to create the database.holder_class
- the holder class object of the XML records.record_class
- the class object of the XML records.Method Detail |
public java.io.File getPath()
public int getLimitFileSize()
public void addElement(XmlDBRecord element) throws java.io.IOException
element
- the XML element.public void addElements(java.util.Vector list) throws java.io.IOException
list
- the list of XML elements.public XmlDBRecord setElement(XmlDBRecord element) throws java.io.IOException
element
- the XML element.public XmlDBRecord deleteElement(java.lang.String id) throws java.io.IOException
id
- the ID.public void deleteElements(java.util.Hashtable hash) throws java.io.IOException
hash
- the hash table whose keys are IDs of the elements
to be deleted.public XmlDBAccessor getAccessor()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |