|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.tools.dbloader.DbLoader
A tool to set up a uPortal database. This tool was created so that uPortal developers would only have to maintain a single set of xml documents to define the uPortal database schema and data. Previously it was necessary to maintain different scripts for each database we wanted to support.
DbLoader reads the generic types that are specified in tables.xml and tries to map them to local types by querying the database metadata via methods implemented by the JDBC driver. Fallback mappings can be supplied in dbloader.xml for cases where the JDBC driver is not able to determine the appropriate mapping. Such cases will be reported to standard out.
An xsl transformation is used to produce the DROP TABLE and CREATE TABLE SQL statements. These statements can be altered by modifying tables.xsl
Generic data types (as defined in java.sql.Types) which may be specified
in tables.xml include:
BIT, TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, REAL, DOUBLE,
NUMERIC, DECIMAL, CHAR, VARCHAR, LONGVARCHAR, DATE, TIME, TIMESTAMP,
BINARY, VARBINARY, LONGVARBINARY, NULL, OTHER, JAVA_OBJECT, DISTINCT,
STRUCT, ARRAY, BLOB, CLOB, REF, DATALINK, BOOLEAN
WARNING: YOU MAY WANT TO MAKE A BACKUP OF YOUR DATABASE BEFORE RUNNING DbLoader
DbLoader will perform the following steps:
Types
Constructor Summary | |
DbLoader()
Creates a default DbLoader with no configuration object installed. |
|
DbLoader(Configuration c)
|
Method Summary | |
static void |
loadConfiguration(Configuration config)
|
static void |
main(java.lang.String[] args)
|
void |
process()
|
void |
setConfig(Configuration c)
Set the configuration object to govern DbLoader's behavior. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DbLoader(Configuration c)
public DbLoader()
Method Detail |
public void setConfig(Configuration c)
c
- public static void main(java.lang.String[] args)
public void process() throws java.sql.SQLException, PortalException, java.io.IOException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
java.sql.SQLException
PortalException
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public static void loadConfiguration(Configuration config) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |