public abstract class Sql2oEventStorage extends java.lang.Object implements EventStorage
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
INSERT_SQL
The insert-statement.
|
| Constructor and Description |
|---|
Sql2oEventStorage(java.lang.String connectURL,
java.lang.String user,
java.lang.String password)
Initiates an object of type Sql2oEventStorage.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the storage system.
|
protected abstract void |
createTable(org.sql2o.Connection connection)
Create a table, where the table-name must be "EVENTS" and the columns
must be have the same name as the attributes!.
|
ClosableIterable<EventData> |
getAllEvents(java.lang.String testrunId)
Delivers all Events of a testrun as an Iterable.
|
ClosableIterable<EventData> |
getAllStartAndFinishEvents()
Delivers all Events which are a start or the end of a test as an
Iterable.
|
void |
insert(EventData event)
Insert the event-data.
|
void |
open()
Open the storage system.
|
void |
write()
Writes the collected data.
|
public static final java.lang.String INSERT_SQL
public Sql2oEventStorage(java.lang.String connectURL,
java.lang.String user,
java.lang.String password)
connectURL - the connection url.user - the user.password - the password.protected abstract void createTable(org.sql2o.Connection connection)
connection - a connection.public void insert(EventData event)
EventStorageinsert in interface EventStorageevent - the eventdata.public void write()
EventStoragewrite in interface EventStoragepublic void close()
EventStorageclose in interface EventStoragepublic void open()
open in interface EventStoragepublic ClosableIterable<EventData> getAllEvents(java.lang.String testrunId)
getAllEvents in interface EventStoragetestrunId - the id of the testrun.EventData.public ClosableIterable<EventData> getAllStartAndFinishEvents()
getAllStartAndFinishEvents in interface EventStorageEventData.Copyright © 2017 PPI AG. All rights reserved.