org.infinispan.loaders.jdbc
Class DataManipulationHelper
java.lang.Object
org.infinispan.loaders.jdbc.DataManipulationHelper
public abstract class DataManipulationHelper
- extends Object
The purpose of this class is to factorize the repeating code between JdbcStringBasedCacheStore
and JdbcBinaryCacheStore
. This class implements GOF's template method pattern.
- Author:
- Mircea.Markus@jboss.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
marshaller
protected Marshaller marshaller
DataManipulationHelper
public DataManipulationHelper(ConnectionFactory connectionFactory,
TableManipulation tableManipulation,
Marshaller marshaller)
clear
public void clear()
throws CacheLoaderException
- Throws:
CacheLoaderException
fromStreamSupport
public final void fromStreamSupport(ObjectInput objectInput)
throws CacheLoaderException
- Throws:
CacheLoaderException
toStreamSupport
public final void toStreamSupport(ObjectOutput objectOutput,
byte streamDelimiter,
boolean filterExpired)
throws CacheLoaderException
- Throws:
CacheLoaderException
loadAllSupport
public final Set<InternalCacheEntry> loadAllSupport(boolean filterExpired)
throws CacheLoaderException
- Throws:
CacheLoaderException
loadAllProcess
public abstract void loadAllProcess(ResultSet rs,
Set<InternalCacheEntry> result)
throws SQLException,
CacheLoaderException
- Throws:
SQLException
CacheLoaderException
toStreamProcess
public abstract void toStreamProcess(ResultSet rs,
InputStream is,
ObjectOutput objectOutput)
throws CacheLoaderException,
SQLException,
IOException
- Throws:
CacheLoaderException
SQLException
IOException
fromStreamProcess
public abstract boolean fromStreamProcess(Object objFromStream,
PreparedStatement ps,
ObjectInput objectInput)
throws SQLException,
CacheLoaderException,
IOException,
ClassNotFoundException
- Throws:
SQLException
CacheLoaderException
IOException
ClassNotFoundException
logAndThrow
public static void logAndThrow(Exception e,
String message)
throws CacheLoaderException
- Throws:
CacheLoaderException
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.