|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.sf.bloof.db.Database
This class manages the interaction with the database via JDBC Connection
| Field Summary | |
protected static java.lang.String |
CREATE_INDEX_FILE
|
protected static java.lang.String |
CREATE_TABLE_FILE
|
protected static java.lang.String |
DROP_TABLE_FILE
|
| Constructor Summary | |
Database(java.sql.Connection aConnection)
Sets the connection and fills the hashtables with the already stored keys in the database |
|
| Method Summary | |
void |
close()
Closes the Database |
java.sql.ResultSet |
executeQuery(java.lang.String aSqlQuery)
Returns the ResultSet for a SQL Query |
java.lang.String |
formatResultSet(java.sql.ResultSet aResultSet)
Formats the ResultSet as plain mono-spaced text and outputs the result as String |
StringIterator |
getDevelopersOrderedByName()
Returns the StringIterator of all Developers ordered by name |
StringIterator |
getFilesOrderdByPath()
Returns the StringIterator of all Files ( pathname ) ordered by pathname |
java.sql.ResultSet |
getOnlyRowResultSet(java.lang.String aSqlQuery)
Returns a result set that point on the first row. |
ScmAccess |
getProjectScmAccess()
Returns the SCM Access to the project |
TimeInterval |
getTimespanBoundaries()
Returns the maximum TimeInterval on the whole project |
void |
populateDatabase(ScmRevisionIterator aRevisonIter)
Populates the database with the revisions of the specified RevisionIterator Already existing revisions will not be updated in the database |
protected static void |
proccessDBScript(java.lang.String aScriptFileName,
java.sql.Connection aDbConnection)
Evaluates the input script and outputs the result to the output stream. |
void |
updateDatabase(ScmRevisionIterator aRevisonIter)
Updates a project |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.lang.String CREATE_TABLE_FILE
protected static final java.lang.String CREATE_INDEX_FILE
protected static final java.lang.String DROP_TABLE_FILE
| Constructor Detail |
public Database(java.sql.Connection aConnection)
throws java.sql.SQLException
aConnection - The connection to set
java.sql.SQLException - on connection error| Method Detail |
protected static void proccessDBScript(java.lang.String aScriptFileName,
java.sql.Connection aDbConnection)
throws java.io.IOException
aScriptFileName - name of the Script fileaDbConnection - connectin to the database
java.io.IOException - on error
public void close()
throws java.sql.SQLException,
java.io.IOException
java.sql.SQLException - on error
java.io.IOException - on error
public java.sql.ResultSet executeQuery(java.lang.String aSqlQuery)
throws java.sql.SQLException
aSqlQuery - SQL statement to run on the database
java.sql.SQLException - on sql error
public java.lang.String formatResultSet(java.sql.ResultSet aResultSet)
throws java.sql.SQLException
aResultSet - input set
java.sql.SQLException - on error
public StringIterator getDevelopersOrderedByName()
throws java.sql.SQLException
java.sql.SQLException - on sql error
public StringIterator getFilesOrderdByPath()
throws java.sql.SQLException
java.sql.SQLException - on sql error
public java.sql.ResultSet getOnlyRowResultSet(java.lang.String aSqlQuery)
throws java.sql.SQLException
aSqlQuery - the query specified
java.sql.SQLException - on sql error
public ScmAccess getProjectScmAccess()
throws java.sql.SQLException
java.sql.SQLException - on db error
public TimeInterval getTimespanBoundaries()
throws java.sql.SQLException
java.sql.SQLException - on sql error
public void populateDatabase(ScmRevisionIterator aRevisonIter)
throws java.sql.SQLException
aRevisonIter - Iterator for revisions
java.sql.SQLException - if errors occur
public void updateDatabase(ScmRevisionIterator aRevisonIter)
throws java.sql.SQLException
aRevisonIter - iterator on the new revisions
java.sql.SQLException - on database error
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||