public abstract class RetainedEvent extends Object
Modifier and Type | Field and Description |
---|---|
protected AttributeValue[] |
m_Values
The set of values for this RetainedEvent.
|
Constructor and Description |
---|
RetainedEvent() |
Modifier and Type | Method and Description |
---|---|
abstract RetainedEvent[] |
constructArray(int size)
Construct an array of the specified size and of the correct type
|
abstract RetainedEvent |
constructInstance()
Construct a new unpopulated instance, of the correct type.
|
void |
createDatabaseObjects(LibrarySessionInterface session)
Create the database objects associated with the retained event type.
|
void |
delete(LibrarySessionInterface session)
Delete a RetainedEvent.
|
void |
dropDatabaseObjects(LibrarySessionInterface session)
Drop the database objects associated with the retained event type.
|
String |
getCreateSequenceStatementSql()
Get the SQL statement string used to create the Retained event sequence
|
String |
getCreateTableStatementSql()
Get the SQL statement string used to create the Retained event table
|
String |
getDeleteStatementKey()
Get the statement key used for a delete
|
String |
getDeleteStatementSql()
get the SQL statement string used for a delete
|
String |
getDropSequenceStatementSql()
Get the SQL statement string used to drop the Retained event sequence
|
String |
getDropTableStatementSql()
Get the SQL statement string used to drop the Retained event table
|
Long |
getId()
Gets the id of the event
|
String |
getInsertStatementKey()
Get the statement key used for an insert
|
String |
getInsertStatementSql()
get the SQL statement string used for an insert
|
protected abstract RetainedEventDescriptor[] |
getRetainedEventDescriptors()
Get name/type descriptors that define the payload for this
retained event.
|
String |
getSelectStatementKey()
get the statement key used for a select
|
String |
getSelectStatementSql()
get the SQL statement string used for a select
|
abstract String |
getSequenceName()
Get sequence name used by this specific type of retained event.
|
abstract String |
getTableName()
Get table name used to store the specific type of retained event.
|
AttributeValue[] |
getValues()
Gets the column values for this instance
|
void |
insert(LibrarySessionInterface session)
Insert a RetainedEvent.
|
void |
process(LibrarySession session)
Process this retained event.
|
int |
processAll(LibrarySession session,
int batchSize,
boolean purgeOnly)
Process all pending RetainedEvents.
|
RetainedEvent[] |
select(LibrarySessionInterface session,
int maxItems)
Select a set of RetainedEvents.
|
protected void |
setValues(AttributeValue[] values)
Set the values for this instance.
|
String |
toString()
Convert to String representation.
|
protected AttributeValue[] m_Values
Set when a RetainedEvent is constructed with the payload, and when constructed as a result of selecting the RetainedEvent from the database.
public final Long getId()
public String toString()
public final AttributeValue[] getValues() throws IfsException
IfsException
public abstract String getTableName()
public abstract String getSequenceName()
protected abstract RetainedEventDescriptor[] getRetainedEventDescriptors()
public abstract RetainedEvent constructInstance()
public abstract RetainedEvent[] constructArray(int size)
size
- the array sizepublic void process(LibrarySession session) throws IfsException
It is assumed that a transaction process has been established by the caller. Also, the caller will ensure that the event is properly disposed aftert this method completes.
session
- bean-side session contextIfsException
- if the operation failsprotected void setValues(AttributeValue[] values) throws IfsException
This is invoked either when a RetainedEvent is constructed with the entire event payload specified (when posting the event), or when an event is selected from the database.
values
- the event payload, ordered according to the column
order established by the subclassIfsException
- if operation fails.public void createDatabaseObjects(LibrarySessionInterface session) throws IfsException
The session must be in admin mode to perform this operation. If the session context specified is a LibrarySession, the request is sent server side.
session
- session contextIfsException
- if operation fails.public void dropDatabaseObjects(LibrarySessionInterface session) throws IfsException
The session must be in admin mode to perform this operation. If the session context specified is a LibrarySession, the request is sent server side.
session
- session contextIfsException
- if operation fails.public void insert(LibrarySessionInterface session) throws IfsException
If the session context specified is a LibrarySession, the request is sent server side.
session
- session contextIfsException
- if operation fails.public void delete(LibrarySessionInterface session) throws IfsException
If the session context specified is a LibrarySession, the request is sent server side.
session
- session contextIfsException
- if operation fails.public RetainedEvent[] select(LibrarySessionInterface session, int maxItems) throws IfsException
If the session context specified is a LibrarySession, the request is sent server side.
session
- session contextmaxItems
- max number of items to selectIfsException
- if operation fails.public int processAll(LibrarySession session, int batchSize, boolean purgeOnly) throws IfsException
This operation only runs bean-side.
session
- session contextIfsException
- if operation fails.public String getInsertStatementKey()
public String getSelectStatementKey()
public String getDeleteStatementKey()
public String getInsertStatementSql()
public String getDeleteStatementSql()
public String getSelectStatementSql()
public String getCreateTableStatementSql() throws IfsException
IfsException
- if operation fails.public String getCreateSequenceStatementSql()
public String getDropTableStatementSql()
public String getDropSequenceStatementSql()
Copyright © 2023. All rights reserved.