|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.util.DBRepository
public final class DBRepository
This class allows to use a database through JDBC as repository with the NTransaction module.
NTransaction
,
Repository
Constructor Summary | |
---|---|
DBRepository()
|
Method Summary | |
---|---|
void |
close()
Closes the repository. |
void |
commit()
Commits all changes to the repository. |
void |
delete(java.lang.String dirName,
java.lang.String name)
Deletes the corresponding objects in repository. |
int |
getNbBadDeletedObjects()
Returns the number of useless delete operation on repository. |
int |
getNbDeletedObjects()
Returns the number of delete operation on repository. |
int |
getNbLoadedObjects()
Returns the number of load operation from repository. |
int |
getNbSavedObjects()
Returns the number of save operation to repository. |
void |
init(java.io.File dir)
Initializes the repository. |
java.lang.String[] |
list(java.lang.String prefix)
Gets a list of persistent objects that name corresponds to prefix. |
byte[] |
load(java.lang.String dirName,
java.lang.String name)
Loads the byte array. |
void |
save(java.lang.String dirName,
java.lang.String name,
byte[] content)
Save the corresponding bytes array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBRepository()
Method Detail |
---|
public int getNbSavedObjects()
getNbSavedObjects
in interface Repository
public int getNbDeletedObjects()
getNbDeletedObjects
in interface Repository
public int getNbBadDeletedObjects()
getNbBadDeletedObjects
in interface Repository
public int getNbLoadedObjects()
getNbLoadedObjects
in interface Repository
public void init(java.io.File dir) throws java.io.IOException
init
in interface Repository
java.io.IOException
public java.lang.String[] list(java.lang.String prefix) throws java.io.IOException
list
in interface Repository
java.io.IOException
public void save(java.lang.String dirName, java.lang.String name, byte[] content) throws java.io.IOException
save
in interface Repository
java.io.IOException
public byte[] load(java.lang.String dirName, java.lang.String name) throws java.io.IOException
load
in interface Repository
java.io.IOException
public void delete(java.lang.String dirName, java.lang.String name) throws java.io.IOException
delete
in interface Repository
java.io.IOException
public void commit() throws java.io.IOException
commit
in interface Repository
java.io.IOException
public void close() throws java.io.IOException
close
in interface Repository
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |