|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.webapp.tools.data.storage.GapDB
org.activemath.webapp.tools.data.storage.JDBCGapStorageDatabase
public class JDBCGapStorageDatabase
| Field Summary | |
|---|---|
protected static Logger |
log
|
| Constructor Summary | |
|---|---|
JDBCGapStorageDatabase()
standard constructor |
|
| Method Summary | |
|---|---|
boolean |
appendDataIfGapExists(Gap gap)
appends the data of the give gap if a gap for this MBaseId does already exist |
int |
countGaps()
|
boolean |
deleteGapById(int gapId)
deletes gap from the database * |
Connection |
getConnection()
|
static GapDB |
getInstance()
|
boolean |
init()
Initializes the database. |
boolean |
resetDB()
resets the database to its initial state |
Gap |
retrieveGapById(int gapId)
returns the indicated gap from the database. |
Gap |
retrieveGapByMBaseId(String mbaseId)
returns the indicated gap from the database. |
Iterator<Gap> |
selectAllGaps(Boolean limit)
selects all gaps from the database gaps |
Iterator<Gap> |
selectAllGaps(Gap filterGap)
selects all gaps from the database gaps |
boolean |
storeGap(Gap gap2store)
stores the given gap in the database |
boolean |
updateGap(Gap gap)
stores the given gap in the database the given gap needs to have a set derby id |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Logger log
| Constructor Detail |
|---|
public JDBCGapStorageDatabase()
| Method Detail |
|---|
public static GapDB getInstance()
public boolean init()
public boolean storeGap(Gap gap2store)
throws GapDBAccessException
gap - gap that is stored in the database
GapDBAccessException - trouble with accessing the databasepublic boolean appendDataIfGapExists(Gap gap)
gap - gap to be stored in the database
GapDBAccessException - trouble with accessing the database
public boolean updateGap(Gap gap)
throws GapDBIdInvalidException
gap - gap that is stored in the database
GapDBAccessException - trouble with accessing the database
GapDBIdInvalidException
public Gap retrieveGapById(int gapId)
throws GapDBIdInvalidException
gapId - the id of the gap
GapDBIdInvalidException - is thrown if the gapId is not valid.public Gap retrieveGapByMBaseId(String mbaseId)
mbaseId - the mbaseId of the item the gap is for
public Iterator<Gap> selectAllGaps(Boolean limit)
gaps
limit - to improve performance. Can be null. If set and true, only the
first 100 results are output by default
public Iterator<Gap> selectAllGaps(Gap filterGap)
gaps
important - integer referencing important gaps (1 means select)ignore - integer referencing gaps to ignore (1 means select)
public boolean deleteGapById(int gapId)
throws GapDBIdInvalidException
gapId - of the gap to delete
GapDBIdInvalidException - is thrown if the gap is not stored in the databasepublic boolean resetDB()
public int countGaps()
public Connection getConnection()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||