|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjet.server.api.db.DBManager
public final class DBManager
Class DBManager provides some methods help manage databases in
the JREntServer, such as travel all Workspace, backup and
restore database, etc.
| Method Summary | |
|---|---|
static boolean |
backup(Database db,
java.lang.String bkVolume)
Backup a specified Database to an archive. |
static java.util.Set |
checkIntegrality(java.lang.String dbName)
Check integrality of the database that specified by name. |
static boolean |
cutdownTable(Table tbl,
java.lang.String bkVolume,
java.lang.String where)
Cut down data in a table and stroe those data to an archive.Now, for "systables" database, only the result version table "RESULTVERSION_2" can be cut down. |
static java.lang.String[] |
getAllSupportDBTypes()
Gets all database type supported by the JReport Enterprisse server. |
static java.lang.String[] |
getAllSupportDrivers()
Gets all JDBC drivers supported by the JReport Enterprise server. |
static Workspace |
getDefaultWorkspace()
Gets the default workspace. |
static java.util.Properties |
getVolumeSummary(java.lang.String bkVolume)
Retrieves the summary information of a backup or cutdown archive. |
static boolean |
importsTable(Table tbl,
java.lang.String bkVolume)
Imports cut down data from an archive to a table. |
static boolean |
isDefault(Workspace wk)
Test whether a worksapce is the default workspace. |
static boolean |
saveConfig()
Save databse JDBC configuration |
static FieldValue[] |
statResultVersion(Database db)
Retrieves some information from result version table which in "systables" database |
static FieldValue[] |
statTaskContext(Database db)
Retrieves some information from task context table which in "profiling" database. |
static boolean |
testConnecting(java.util.Properties info)
Tests JDBC configuration information. |
static Workspaces |
workspaces()
Gets the workspace container. |
static Workspace |
workspaces(int index)
Gets the workspace that specified by index. |
static Workspace |
workspaces(java.lang.String wkName)
Gets the workspace that specified by name. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Workspace getDefaultWorkspace()
public static Workspaces workspaces()
Workspaces in the server.public static Workspace workspaces(int index)
index -
Workspacepublic static Workspace workspaces(java.lang.String wkName)
wkName - the workspace name
Workspacepublic static boolean isDefault(Workspace wk)
wk - the Workspace
- Returns:
- true if specified
Workspace is default public static java.lang.String[] getAllSupportDrivers()
String array to represent all supported JDBC driverspublic static java.lang.String[] getAllSupportDBTypes()
String array to represent all database types which supported
by JReport Enterprise serverpublic static boolean testConnecting(java.util.Properties info)
info - a Properties which represent JDBC configuration information
public static boolean backup(Database db,
java.lang.String bkVolume)
Database to an archive.
db - the database will be backupedbkVolume - archive file name
public static boolean cutdownTable(Table tbl,
java.lang.String bkVolume,
java.lang.String where)
tbl - the table that you want to cut down data.bkVolume - the full path name of the archive that you want to stroe cut
down data in it.where - the sql conditions that you cut down data.
Database.importsTable(jet.server.api.db.Table, java.lang.String)
public static boolean importsTable(Table tbl,
java.lang.String bkVolume)
tbl - the table that you want to import cut down data.bkVolume - the archive name that you want to import cut down data for it.
Database.cutdownTable(jet.server.api.db.Table, java.lang.String, java.lang.String)public static boolean saveConfig()
public static FieldValue[] statResultVersion(Database db)
throws java.sql.SQLException
db - a database
FieldValuue array containes needed information
java.sql.SQLException - if SQLException throws during operation
public static FieldValue[] statTaskContext(Database db)
throws java.sql.SQLException
db - the Database for "profiling"
FieldValuue array contains needed information
java.sql.SQLException - if SQLException throws during operation
public static java.util.Set checkIntegrality(java.lang.String dbName)
throws java.sql.SQLException,
java.io.IOException
dbName - the Database name
Set contains all invalide external files.
java.sql.SQLException - if SQLException throws during operation
java.io.IOException - if IOException throws during operation
public static java.util.Properties getVolumeSummary(java.lang.String bkVolume)
throws java.io.IOException
bkVolume - the archive file
Properties contains summary information
java.io.IOException - if IOException throws during operation
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||