public abstract class AbstractJdbcStorageDao extends BaseStorageDao
accessor| Constructor and Description |
|---|
AbstractJdbcStorageDao(org.osgi.service.jdbc.DataSourceFactory dataSourceFactory,
Properties properties,
boolean usePool,
Long loginTimeout,
com.google.common.collect.Interner<String> stringInterner) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupArchive() |
protected int |
cleanupArchive(int days)
Cleanup the archive
|
protected String |
getDeleteAttributesSql() |
protected String |
getInsertAttributesSql() |
protected String |
intern(String string) |
Event |
loadEvent(UUID id) |
protected void |
logSQLError(SQLException e) |
protected void |
performStoreEvent(Event event,
ConnectionContext connectionContext) |
ResultSet |
queryEvents(Filter filter)
Get an open result result for a filter
|
void |
storeEvent(Event event) |
protected void |
storeReplicationEvent(Event event,
Connection con) |
boolean |
toEventList(ResultSet rs,
Collection<Event> events,
boolean isBeforeFirst,
long count) |
clip, closeConnection, closeStatement, createConnection, dispose, getAccessor, getCleanupDays, getInstance, getMaxLength, getSchema, setInstance, setMaxLength, setSchema, updateCommentpublic AbstractJdbcStorageDao(org.osgi.service.jdbc.DataSourceFactory dataSourceFactory,
Properties properties,
boolean usePool,
Long loginTimeout,
com.google.common.collect.Interner<String> stringInterner)
throws SQLException
SQLExceptionprotected void storeReplicationEvent(Event event, Connection con) throws Exception
Exceptionprotected void logSQLError(SQLException e)
public Event loadEvent(UUID id) throws SQLException
SQLExceptionpublic ResultSet queryEvents(Filter filter) throws SQLException, NotSupportedException
The caller has to close the result set and the connection
SQLExceptionNotSupportedExceptionpublic boolean toEventList(ResultSet rs, Collection<Event> events, boolean isBeforeFirst, long count) throws SQLException
SQLExceptionprotected String getDeleteAttributesSql()
getDeleteAttributesSql in class BaseStorageDaoprotected String getInsertAttributesSql()
getInsertAttributesSql in class BaseStorageDaopublic void cleanupArchive()
protected int cleanupArchive(int days)
throws Exception
days - days in the past that should remain in the archivedayswas negative or zero.
Exceptionprotected void performStoreEvent(Event event, ConnectionContext connectionContext) throws SQLException, Exception
SQLExceptionExceptionCopyright © 2016 Eclipse NeoSCADA Project. All rights reserved.