|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springbyexample.jdbc.core.SqlScriptProcessor
public class SqlScriptProcessor
Processes sql scripts. A list of scripts
or script locations can be set. Spring ResourceLoader
is used so valid scripts locations are classpath, file, http, ftp. etc.
Field Summary | |
---|---|
protected boolean |
initOnStartup
|
protected List<String> |
lSqlScripts
|
protected ResourceLoader |
resourceLoader
|
protected JdbcTemplate |
template
|
Constructor Summary | |
---|---|
SqlScriptProcessor()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
Implementation of IntializingBean . |
List<String> |
getSqlScripts()
Gets SQL scripts. |
boolean |
isInitOnStartup()
Whether or not SQL scripts on startup. |
void |
process()
Initializes SQL scripts. |
void |
setDataSource(DataSource dataSource)
Sets DataSource . |
void |
setInitOnStartup(boolean initOnStartup)
Sets whether or not SQL scripts run on statup. |
void |
setResourceLoader(ResourceLoader resourceLoader)
Implementation of ResourceLoaderAware . |
void |
setSqlScripts(List<String> lSqlScripts)
Sets SQL scripts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected JdbcTemplate template
protected ResourceLoader resourceLoader
protected boolean initOnStartup
protected List<String> lSqlScripts
Constructor Detail |
---|
public SqlScriptProcessor()
Method Detail |
---|
public void setDataSource(DataSource dataSource)
DataSource
.
public boolean isInitOnStartup()
false
.
public void setInitOnStartup(boolean initOnStartup)
false
.
public List<String> getSqlScripts()
public void setSqlScripts(List<String> lSqlScripts)
public void afterPropertiesSet() throws Exception
IntializingBean
.
afterPropertiesSet
in interface InitializingBean
Exception
public void setResourceLoader(ResourceLoader resourceLoader)
ResourceLoaderAware
.
setResourceLoader
in interface ResourceLoaderAware
public void process() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |