org.apache.ignite.cache.store.jdbc

## Class CacheJdbcPojoStoreFactory<K,V>

- java.lang.Object
- - org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory<K,V>

All Implemented Interfaces:
  Serializable, javax.cache.configuration.Factory<CacheJdbcPojoStore<K,V>>

    public class CacheJdbcPojoStoreFactory<K,V>
    extends Object
    implements javax.cache.configuration.Factory<CacheJdbcPojoStore<K,V>>

`Factory` implementation for `CacheJdbcPojoStore`. Use this factory to pass `CacheJdbcPojoStore` to `CacheConfiguration`.

## Spring Example

         <bean id= "simpleDataSource" class="org.h2.jdbcx.JdbcDataSource"/>

         <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
              ...
              <property name="cacheConfiguration">
                   <list>
                      <bean class="org.apache.ignite.configuration.CacheConfiguration">
                          ...
                          <property name="cacheStoreFactory">
                              <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
                                  <property name="dataSourceBean" value = "simpleDataSource" />
                              </bean>
                          </property>
                      </bean>
                   </list>
              </property>
         </bean>

For information about Spring framework visit www.springframework.org

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`CacheJdbcPojoStoreFactory()`

### Method Summary

Methods
`CacheJdbcPojoStore<K,V>` `create()`
`CacheJdbcPojoStoreFactory<K,V>` `setDataSource(DataSource dataSrc)` Sets data source.
`CacheJdbcPojoStoreFactory<K,V>` `setDataSourceBean(String dataSrcBean)` Sets name of the data source bean.
`void` `setDialect(JdbcDialect dialect)` Set database dialect.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### CacheJdbcPojoStoreFactory

    public CacheJdbcPojoStoreFactory()

### Method Detail

#### create

    public CacheJdbcPojoStore<K,V> create()

Specified by:
  `create` in interface `javax.cache.configuration.Factory<CacheJdbcPojoStore<K,V>>`

#### setDataSourceBean

    public CacheJdbcPojoStoreFactory<K,V> setDataSourceBean(String dataSrcBean)

Sets name of the data source bean.

Parameters:
  `dataSrcBean` - Data source bean name.
Returns:
  `This` for chaining.
See Also:
  `CacheAbstractJdbcStore.setDataSource(DataSource)`

#### setDataSource

    public CacheJdbcPojoStoreFactory<K,V> setDataSource(DataSource dataSrc)

Sets data source. Data source should be fully configured and ready-to-use.

Parameters:
  `dataSrc` - Data source.
Returns:
  `This` for chaining.
See Also:
  `CacheAbstractJdbcStore.setDataSource(DataSource)`

#### setDialect

    public void setDialect(JdbcDialect dialect)

Set database dialect.

Parameters:
  `dialect` - Database dialect.
See Also:
  `CacheAbstractJdbcStore.setDialect(JdbcDialect)`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.3.0-incubating
Release Date | : July 10 2015