public final class RowArrayEvent
extends com.streamscape.sdo.event.AbstractMutableEvent
Title: Structured Data Objects: Row Array Event
Description: An object that represents a Row Array Event.
DataEvent
which presents a collection of DataRow
objects
combined in an RowArray
. The eventgram is a light-weight implementation of a transportable row set. It
allows users to a create a collection of rows, treat the eventgram as a row cache and transport the data in an
editable format between event consumers, thereby allowing them to collaboratively act on the data collection.
A Row Array Event
has the following capabilities and limitations:
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
SEMANTIC_TYPE_NAME
DEFAULT_SERIAL_VERSION_ID
Modifier and Type | Method and Description |
---|---|
void |
addRow(DataRow row)
Adds a new row to the array.
|
void |
clear()
Clears the row array releasing it's row resources but
not clearing the meta data.
|
boolean |
containsRow(DataRow row)
Returns
true if the specified row exists in the
collection. |
boolean |
equals(java.lang.Object other) |
boolean |
existsKey(java.lang.Object key)
Returns
true if the supplied key exists in the array. |
int |
getCapacity()
Returns the row capacity for this collection.
|
java.lang.String |
getIndexColumnName()
Returns the name of the index column.
|
RowMetaData |
getMetaData() |
RowArray |
getRowArray()
Returns the underlying row array object.
|
DataRow |
getRowByKey(java.lang.Object key)
Returns a row based on a specific key.
|
boolean |
hasKeyIndex()
Returns
true if this array has a key index. |
void |
init(ResultSet resultSet)
Initializes a new Row Array Event based on
ResultSet meta data. |
void |
init(RowArray rowArray) |
void |
init(RowMetaData metaData)
Initializes this event with the specified metadata.
|
boolean |
isMRUEnabled()
Returns
true if this collection supports MRU caching
capabilities. |
java.util.Iterator |
iteratorByEntry()
Returns an array iterator using the entry sequence of data.
|
java.util.Iterator |
iteratorByKey()
Returns an array iterator sorted by key.
|
DataRow |
newRow()
Returns a new row.
|
void |
removeRow()
Removes the first row in the map.
|
void |
removeRowByKey(java.lang.Object key)
Removes the row specified by key.
|
void |
setMRUEnabled(boolean cache)
Enables or disables the ability of this collection to function as a
Most Recent Used cache.
|
int |
size()
Returns the size of the array of data.
|
addAnnotation, clearEventProperties, protect, removeAnnotation, removeEventProperty, resetReplyTo, setCorrelationId, setCorrelationIdAsBytes, setDurable, setEventBigDecimalProperty, setEventBigDecimalProperty, setEventBooleanProperty, setEventByteProperty, setEventDoubleProperty, setEventExpiration, setEventFloatProperty, setEventGroupId, setEventIntProperty, setEventKey, setEventLongProperty, setEventObjectProperty, setEventShortProperty, setEventStringProperty, setFinal, setForwardTo, setReplyTo, setSecurityAssertionToken, setSecurityAssertionTokenAsBytes, unprotect
canConvertEventProperty, clone, existsEventProperty, getAnnotatedProperties, getAnnotation, getCorrelationId, getCorrelationIdAsBytes, getDurable, getEventBigDecimalProperty, getEventBooleanProperty, getEventByteProperty, getEventDoubleProperty, getEventExpiration, getEventFloatProperty, getEventGroupId, getEventId, getEventIntProperty, getEventKey, getEventLongProperty, getEventObjectProperty, getEventPropertyNames, getEventPropertyType, getEventShortProperty, getEventSource, getEventStringProperty, getForwardTo, getPermissions, getReadAccess, getReplyTo, getSecurityAssertionToken, getSecurityAssertionTokenAsBytes, getTimestamp, getTransmitAccess, getWriteAccess, hasAnnotatedProperties, hasSuitableAnnotationType, isProtected
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAnnotation, canConvertEventProperty, clearEventProperties, existsEventProperty, getAnnotatedProperties, getAnnotation, getCorrelationId, getCorrelationIdAsBytes, getEventBigDecimalProperty, getEventBooleanProperty, getEventByteProperty, getEventDoubleProperty, getEventExpiration, getEventFloatProperty, getEventIntProperty, getEventLongProperty, getEventObjectProperty, getEventPropertyNames, getEventPropertyType, getEventShortProperty, getEventStringProperty, getForwardTo, getPermissions, getReadAccess, getReplyTo, getSecurityAssertionToken, getSecurityAssertionTokenAsBytes, getTransmitAccess, getWriteAccess, hasAnnotatedProperties, isProtected, protect, removeAnnotation, removeEventProperty, resetReplyTo, setCorrelationId, setCorrelationIdAsBytes, setDurable, setEventBigDecimalProperty, setEventBigDecimalProperty, setEventBooleanProperty, setEventByteProperty, setEventDoubleProperty, setEventExpiration, setEventFloatProperty, setEventGroupId, setEventIntProperty, setEventKey, setEventLongProperty, setEventObjectProperty, setEventShortProperty, setEventStringProperty, setFinal, setForwardTo, setReplyTo, setSecurityAssertionToken, setSecurityAssertionTokenAsBytes, unprotect
clone, getDurable, getEventGroupId, getEventId, getEventKey, getEventSource, getTimestamp
getSerialVersionUID
public RowArray getRowArray() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void init(RowArray rowArray) throws SecurityViolationException
SecurityViolationException
public void init(RowMetaData metaData) throws SecurityViolationException
metaData
- the specified metadata.SecurityViolationException
public void init(ResultSet resultSet) throws SecurityViolationException, SQLException, MetaDataException
ResultSet
meta data.
This method only creates the structure, it does not populate the array.resultSet
- ResultSetSecurityViolationException
SQLException
java.lang.ClassNotFoundException
MetaDataException
public RowMetaData getMetaData() throws SecurityViolationException
SecurityViolationException
public int getCapacity() throws RowArrayException, SecurityViolationException
RowArrayException
SecurityViolationException
public void setMRUEnabled(boolean cache) throws SecurityViolationException
Capacity
is reached
the array will automatically remove the least-recent row in order to make
room for the new element.cache
- booleanSecurityViolationException
public boolean isMRUEnabled() throws SecurityViolationException
true
if this collection supports MRU caching
capabilities.SecurityViolationException
public boolean containsRow(DataRow row) throws SecurityViolationException
true
if the specified row exists in the
collection.row
- RowSecurityViolationException
public DataRow newRow() throws MetaDataException, RowException, SecurityViolationException
MetaDataException
RowException
SecurityViolationException
public void addRow(DataRow row) throws RowArrayException, RowException, SecurityViolationException
row
- RowRowArrayException
RowException
SecurityViolationException
public boolean existsKey(java.lang.Object key) throws RowArrayException, SecurityViolationException
true
if the supplied key exists in the array.key
- ObjectRowArrayException
SecurityViolationException
public void removeRowByKey(java.lang.Object key) throws RowArrayException, SecurityViolationException
key
- ObjectRowArrayException
SecurityViolationException
public void removeRow() throws SecurityViolationException
SecurityViolationException
public DataRow getRowByKey(java.lang.Object key) throws SDOException, SecurityViolationException
key
- ObjectRowArrayException
SecurityViolationException
SDOException
public java.lang.String getIndexColumnName() throws RowArrayException, SecurityViolationException
RowArrayException
SecurityViolationException
public boolean hasKeyIndex() throws RowArrayException, SecurityViolationException
true
if this array has a key index. This holds
true if either the user has set an index, or if Row Id
capability has been enabled.RowArrayException
SecurityViolationException
public java.util.Iterator iteratorByEntry() throws SecurityViolationException, SDOException
SecurityViolationException
SDOException
public java.util.Iterator iteratorByKey() throws SecurityViolationException, SDOException
Row Id
has been
set the array is sorted by the row identifier. If the event gram is
write-protected this method returns an iterator of the array clone. Editing
row has no effect on the underlying array.SecurityViolationException
SDOException
public int size() throws SecurityViolationException
SecurityViolationException
public void clear() throws SecurityViolationException
SecurityViolationException
public boolean equals(java.lang.Object other)
equals
in class com.streamscape.sdo.IAbstractDataEvent
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.