Author: manik.surtani(a)jboss.com
Date: 2008-09-22 11:34:46 -0400 (Mon, 22 Sep 2008)
New Revision: 6770
Modified:
core/trunk/src/main/java/org/jboss/cache/loader/JDBCCacheLoaderConfig.java
Log:
Fixed typo
Modified: core/trunk/src/main/java/org/jboss/cache/loader/JDBCCacheLoaderConfig.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/JDBCCacheLoaderConfig.java 2008-09-22
14:26:10 UTC (rev 6769)
+++ core/trunk/src/main/java/org/jboss/cache/loader/JDBCCacheLoaderConfig.java 2008-09-22
15:34:46 UTC (rev 6770)
@@ -26,7 +26,7 @@
private String sqlConcat;
private String startingWith;
- private String appendSepparator;
+ private String appendSeparator;
private boolean batchEnabled = true;//by default enable batching during state
transfer
@@ -50,13 +50,13 @@
sqlConcat = props.getProperty("cache.jdbc.sql-concat");
disectSqlConcat();
-
+
deleteNodeSql = constructDeleteNodeSql();
recursiveChildrenSql = constructRecursiveChildrenSql();
nodeCountSql = constructNodeCountSql();
batchEnabled =
Boolean.valueOf(props.getProperty("cache.jdbc.batch.enable"));
- if (props.containsKey("cache.jdbc.batch.size"))
+ if (props.containsKey("cache.jdbc.batch.size"))
{
batchSize =
Long.parseLong(props.getProperty("cache.jdbc.batch.size"));
}
@@ -68,7 +68,7 @@
@Override
public String getDeleteNodeSql()
{
- if (startingWith == null || appendSepparator == null || deleteNodeSql == null)
+ if (startingWith == null || appendSeparator == null || deleteNodeSql == null)
{
disectSqlConcat();
setDeleteNodeSql(constructDeleteNodeSql());
@@ -82,7 +82,7 @@
*/
public String getRecursiveChildrenSql()
{
- if (startingWith == null || appendSepparator == null || recursiveChildrenSql ==
null)
+ if (startingWith == null || appendSeparator == null || recursiveChildrenSql ==
null)
{
disectSqlConcat();
setRecursiveChildrenSql(constructRecursiveChildrenSql());
@@ -101,7 +101,7 @@
*/
public String getNodeCountSql()
{
- if (startingWith == null || appendSepparator == null || nodeCountSql == null)
+ if (startingWith == null || appendSeparator == null || nodeCountSql == null)
{
disectSqlConcat();
setNodeCountSql(constructNodeCountSql());
@@ -136,19 +136,20 @@
this.startingWith = startingWith;
}
- public String getAppendSepparator()
+ public String getAppendSeparator()
{
- return appendSepparator;
+ return appendSeparator;
}
- public void setAppendSepparator(String appendSepparator)
+ public void setAppendSeparator(String appendSeparator)
{
- this.appendSepparator = appendSepparator;
+ this.appendSeparator = appendSeparator;
}
/**
* If batch is enabled certain operations (e.g. state transfer) will use {@link
java.sql.PreparedStatement#addBatch(String)}
- * approach for insertig data into the database. This normally brings significant
performance improvements.
+ * approach for insertig data into the database. This normally brings significant
performance improvements.
+ *
* @return
*/
public boolean isBatchEnabled()
@@ -158,6 +159,7 @@
/**
* The statement will be flushed after batching batchSize operations.
+ *
* @see #isBatchEnabled()
*/
public long getBatchSize()
@@ -169,11 +171,11 @@
{
if (sqlConcat == null)
{
- log.info("Missiing JDBCCacheLoader config 'cache.jdbc.sql-concat',
using default value:'concat(1,2)'");
+ log.info("Missing JDBCCacheLoader config 'cache.jdbc.sql-concat',
using default value:'concat(1,2)'");
sqlConcat = "concat(1,2)";
}
startingWith = sqlConcat.replace('1', '?').replace("2",
"'%'"); //concat(?, '%')
- appendSepparator = sqlConcat.replace("1",
fqnColumn).replace("2", "'/'"); //concat(fqnColumn,
'/')
+ appendSeparator = sqlConcat.replace("1",
fqnColumn).replace("2", "'/'"); //concat(fqnColumn,
'/')
}
private String constructNodeCountSql()
@@ -183,11 +185,11 @@
private String constructRecursiveChildrenSql()
{
- return "select " + fqnColumn + "," + nodeColumn + " from
" + table + " where " + appendSepparator + " like " +
startingWith;
+ return "select " + fqnColumn + "," + nodeColumn + " from
" + table + " where " + appendSeparator + " like " +
startingWith;
}
private String constructDeleteNodeSql()
{
- return "delete from " + table + " where " + appendSepparator +
" like " + startingWith;
+ return "delete from " + table + " where " + appendSeparator +
" like " + startingWith;
}
}
\ No newline at end of file
Show replies by date