org.jboss.cache.loader
Class JDBCCacheLoaderConfig

java.lang.Object
  extended by org.jboss.cache.config.ConfigurationComponent
      extended by org.jboss.cache.config.PluggableConfigurationComponent
          extended by org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig
              extended by org.jboss.cache.loader.AdjListJDBCCacheLoaderConfig
                  extended by org.jboss.cache.loader.JDBCCacheLoaderConfig
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent

public class JDBCCacheLoaderConfig
extends AdjListJDBCCacheLoaderConfig

Builds the different SQLs needed by JDBCCacheLoader.

Version:
1.0
Author:
Mircea.Markus@iquestint.com, Galder Zamarreno
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig
CacheLoaderConfig.IndividualCacheLoaderConfig.SingletonStoreConfig
 
Field Summary
 
Fields inherited from class org.jboss.cache.loader.AdjListJDBCCacheLoaderConfig
connectionFactoryClass, createTable, createTableDDL, datasourceName, deleteAllSql, deleteNodeSql, driverClass, dropTable, dropTableDDL, existsSql, fqnColumn, fqnType, insertNodeSql, jdbcPassword, jdbcURL, jdbcUser, nodeColumn, nodeType, parentColumn, primaryKey, selectChildFqnsSql, selectChildNamesSql, selectNodeSql, table, updateNodeSql, updateTableSql
 
Fields inherited from class org.jboss.cache.config.PluggableConfigurationComponent
className, properties
 
Fields inherited from class org.jboss.cache.config.ConfigurationComponent
log
 
Constructor Summary
JDBCCacheLoaderConfig()
           
JDBCCacheLoaderConfig(CacheLoaderConfig.IndividualCacheLoaderConfig base)
           
 
Method Summary
 long getBatchSize()
          The statement will be flushed after batching batchSize operations.
 String getDeleteNodeSql()
          Returns the sql string for removing a node and all its children.
 String getNodeCountSql()
          Returns an sql that will count all the persisted node.
 String getRecursiveChildrenSql()
          Returns an sql that will return a node and all its children.
 String getSqlConcat()
          Deprecated. 
 boolean isBatchEnabled()
          If batch is enabled certain operations (e.g.
 void setNodeCountSql(String nodeCountSql)
           
 void setProperties(Properties props)
           
 void setRecursiveChildrenSql(String recursiveChildrenSql)
           
 void setSqlConcat(String sqlConcat)
          Deprecated. 
 
Methods inherited from class org.jboss.cache.loader.AdjListJDBCCacheLoaderConfig
clone, equals, getConnectionFactoryClass, getCreateTable, getCreateTableDDL, getDatasourceName, getDeleteAllSql, getDriverClass, getDropTable, getDropTableDDL, getDummyTableCreationDDL, getDummyTablePopulationSql, getDummyTableRemovalDDL, getExistsSql, getFqnColumn, getFqnType, getInsertNodeSql, getJdbcPassword, getJdbcURL, getJdbcUser, getNodeColumn, getNodeType, getParentColumn, getPrimaryKey, getSelectChildFqnsSql, getSelectChildNamesSql, getSelectNodeSql, getTable, getUpdateNodeSql, getUpdateTableSql, hashCode, setConnectionFactoryClass, setCreateTable, setCreateTableDDL, setDatasourceName, setDeleteAllSql, setDeleteNodeSql, setDriverClass, setDropTable, setDropTableDDL, setExistsSql, setFqnColumn, setFqnType, setInsertNodeSql, setJdbcPassword, setJdbcURL, setJdbcUser, setNodeColumn, setNodeType, setParentColumn, setPrimaryKey, setSelectChildFqnsSql, setSelectChildNamesSql, setSelectNodeSql, setTable, setUpdateNodeSql, setUpdateTableSql
 
Methods inherited from class org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig
equalsExcludingProperties, getCacheLoader, getSingletonStoreConfig, hashCodeExcludingProperties, isAsync, isFetchPersistentState, isIgnoreModifications, isPurgeOnStartup, populateFromBaseConfig, setAsync, setCacheLoader, setFetchPersistentState, setIgnoreModifications, setPurgeOnStartup, setSingletonStoreConfig, toString
 
Methods inherited from class org.jboss.cache.config.PluggableConfigurationComponent
getClassName, getProperties, setClassName, setProperties
 
Methods inherited from class org.jboss.cache.config.ConfigurationComponent
addChildConfig, addChildConfigs, passCacheToChildConfig, removeChildConfig, removeChildConfigs, replaceChildConfig, replaceChildConfigs, setCache, testImmutability
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDBCCacheLoaderConfig

public JDBCCacheLoaderConfig(CacheLoaderConfig.IndividualCacheLoaderConfig base)

JDBCCacheLoaderConfig

public JDBCCacheLoaderConfig()
Method Detail

setProperties

public void setProperties(Properties props)
Overrides:
setProperties in class AdjListJDBCCacheLoaderConfig

getDeleteNodeSql

public String getDeleteNodeSql()
Returns the sql string for removing a node and all its children.

Overrides:
getDeleteNodeSql in class AdjListJDBCCacheLoaderConfig

getRecursiveChildrenSql

public String getRecursiveChildrenSql()
Returns an sql that will return a node and all its children.


setRecursiveChildrenSql

public void setRecursiveChildrenSql(String recursiveChildrenSql)

getNodeCountSql

public String getNodeCountSql()
Returns an sql that will count all the persisted node.


setNodeCountSql

public void setNodeCountSql(String nodeCountSql)

getSqlConcat

@Deprecated
public String getSqlConcat()
Deprecated. 


setSqlConcat

@Deprecated
public void setSqlConcat(String sqlConcat)
Deprecated. 


isBatchEnabled

public boolean isBatchEnabled()
If batch is enabled certain operations (e.g. state transfer) will use Statement.addBatch(String) approach for insertig data into the database. This normally brings significant performance improvements.

Returns:

getBatchSize

public long getBatchSize()
The statement will be flushed after batching batchSize operations.

See Also:
isBatchEnabled()


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.