java.lang.Object
org.jeteam.mbean.InitialLoad
- All Implemented Interfaces:
- InitialLoadMBean
- public class InitialLoad
- extends java.lang.Object
- implements InitialLoadMBean
This class loads the initial-load.sql queries and updates the data-source bound to jeteamDS.
All lines in this script, that start with the '#' character are being ignored.
The default data-source is "java:/jeteamDS", the script file name is "initial-load.sql", the comment delimiter
for that script is the '#' character.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dataSourceName
private java.lang.String dataSourceName
scriptFileName
private final java.lang.String scriptFileName
- See Also:
- Constant Field Values
scriptCommentDelimiter
private final java.lang.String scriptCommentDelimiter
- See Also:
- Constant Field Values
InitialLoad
public InitialLoad()
getDataSourceName
public java.lang.String getDataSourceName()
- Specified by:
getDataSourceName in interface InitialLoadMBean
setDataSourceName
public void setDataSourceName(java.lang.String dataSourceName)
- Specified by:
setDataSourceName in interface InitialLoadMBean
batchUpdate
private final void batchUpdate(java.sql.Connection connection,
java.io.BufferedReader reader)
throws java.lang.Exception
- Updates the data-source with all queries in one batch operation.
singleUpdates
private final void singleUpdates(java.sql.Connection connection,
java.io.BufferedReader reader)
throws java.lang.Exception
- Updates the data-source with a single query at a time, doing a call for each line in the
script that is not comment.
uploadInitialLoad
public void uploadInitialLoad()
- Uploads the initial-load.
- Specified by:
uploadInitialLoad in interface InitialLoadMBean