|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectru.mfd.api.Table
public class Table
User: MMarkelov Date: 12.10.12 Time: 16:32
| Constructor Summary | |
|---|---|
Table(SrvrSession srvrSession,
java.lang.String tableName,
TableListener tableListener)
Initializes a new instance of table representation. |
|
| Method Summary | |
|---|---|
int |
addUpdateFilter(int parentFilterId,
Filter.ELogicalOperation operation,
int fieldId,
Filter.ECondition condition,
java.lang.String value)
Adds filter to this table to process online data. |
int |
addUpdateFilter(int parentFilterId,
Filter.ELogicalOperation operation,
java.lang.String fieldAcronym,
Filter.ECondition condition,
java.lang.String value)
Adds filter to this table to process online data. |
void |
addUpdateFilterView(int... fieldIds)
Makes server to send only given fields in online data. |
void |
addUpdateFilterView(java.lang.String... fieldAcronyms)
Makes server to send only given fields in online data. |
void |
clear()
Clears this table. |
void |
clearUpdateFilterView()
Removes all online data fields filters. |
Filter |
createFilter(int fieldId,
Filter.ECondition condition,
java.lang.String value)
Creates a Filter with the given field number for this Table |
Filter |
createFilter(java.lang.String fieldAcronym,
Filter.ECondition condition,
java.lang.String value)
Creates a Filter with the given field name for this Table |
Row |
createRow()
Creates new data row structure. |
void |
delete(java.lang.Long recid)
Deletes row in table by I_RID. |
void |
deleteUpdateFilter(int filterId)
Removes online data filter with given filterId from table filters set. |
long |
getData(java.util.List<java.lang.Integer> fieldIds,
java.util.List<Filter> filters)
Sends command to retrieve data. |
long |
getSlice(java.util.List<java.lang.Integer> fieldIds,
java.util.List<Filter> filters)
Sends command to retrieve last data by each ticker. |
void |
insert(Row row)
Inserts new row to this table. |
void |
modify(Row row)
Updates row of this table. |
void |
setOnlineUpdates(boolean onlineUpdates)
Subscribes or unsubscribes table from online data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Table(SrvrSession srvrSession,
java.lang.String tableName,
TableListener tableListener)
throws ClientException
SrvrSession keeps only WeakReference to this Table.
Client application should take care of keeping strong reference to the instance of this class.
srvrSession - server sessiontableName - name of table to initializetableListener - table events listener
ClientException - if catalog or table not found| Method Detail |
|---|
public long getData(java.util.List<java.lang.Integer> fieldIds,
java.util.List<Filter> filters)
throws ClientException
fieldIds - list of fields to receive
if value is null server sends all fields of this tablefilters - list of filters to be applied
if value is null no filters applied
ClientException - if SrvrSession not connected to server
public long getSlice(java.util.List<java.lang.Integer> fieldIds,
java.util.List<Filter> filters)
throws ClientException
fieldIds - list of fields to receive
if value is null server sends all fields of this tablefilters - list of filters to be applied
if value is null no filters applied
ClientException - if SrvrSession not connected to server
public void setOnlineUpdates(boolean onlineUpdates)
throws ClientException
onlineUpdates - enable online updates flag
ClientException - if SrvrSession not connected to server
public int addUpdateFilter(int parentFilterId,
Filter.ELogicalOperation operation,
int fieldId,
Filter.ECondition condition,
java.lang.String value)
throws ClientException
Filter.ELogicalOperation.AND and Filter.ELogicalOperation.OR.
There are only two ways to use filters:
Filter.ROOT_NODE using Filter.ELogicalOperation.AND condition
Filter.ROOT_NODE using Filter.ELogicalOperation.OR condition
and all the other filters attached to these root filters using Filter.ELogicalOperation.AND condition
parentFilterId - parent filter id.
if there is no parent filter use Filter.ROOT_NODE instead.operation - logical operation type is either Filter.ELogicalOperation.AND or Filter.ELogicalOperation.OR.fieldId - catalog field number.
fieldId value is 0-based. e.g., 0 for the first field.condition - filter condition based on Filter.ECondition enum.value - the value data to be filtered by.
ClientException - if SrvrSession not connected to server
ClientRuntimeException - if field not found in this table
public int addUpdateFilter(int parentFilterId,
Filter.ELogicalOperation operation,
java.lang.String fieldAcronym,
Filter.ECondition condition,
java.lang.String value)
throws ClientException
Filter.ELogicalOperation.AND and Filter.ELogicalOperation.OR.
There are only two ways to use filters:
Filter.ROOT_NODE using Filter.ELogicalOperation.AND condition
Filter.ROOT_NODE using Filter.ELogicalOperation.OR condition
and all the other filters attached to these root filters using Filter.ELogicalOperation.AND condition
parentFilterId - parent filter id.
if there is no parent filter use Filter.ROOT_NODE instead.operation - logical operation type is either Filter.ELogicalOperation.AND or Filter.ELogicalOperation.OR.fieldAcronym - catalog field acronym.condition - filter condition based on Filter.ECondition enum.value - the value data to be filtered by.
ClientException - if SrvrSession not connected to server
ClientRuntimeException - if field not found in this table
public void deleteUpdateFilter(int filterId)
throws ClientException
filterId - id filter to be removed by.
ClientException - if SrvrSession not connected to server
public void addUpdateFilterView(int... fieldIds)
throws ClientException
fieldIds - catalog field numbers.
fieldIds values is 0-based. e.g., 0 for the first field.
if the argument is null or empty, it has the same effect as calling clearUpdateFilterView method.
ClientException - if SrvrSession not connected to server
ClientRuntimeException - if field not found in this table
public void addUpdateFilterView(java.lang.String... fieldAcronyms)
throws ClientException
fieldAcronyms - catalog field acronyms.
if the argument is null or empty, it has the same effect as calling clearUpdateFilterView method.
ClientException - if SrvrSession not connected to server
ClientRuntimeException - if field not found in this table
public void clearUpdateFilterView()
throws ClientException
ClientException - if SrvrSession not connected to server
public Filter createFilter(int fieldId,
Filter.ECondition condition,
java.lang.String value)
Filter with the given field number for this Table
fieldId - catalog field number.
fieldId value is 0-based. e.g., 0 for the first field.condition - filter condition based on Filter.ECondition enum.value - the value data to be filtered by.
ClientRuntimeException - if field not found in this table
public Filter createFilter(java.lang.String fieldAcronym,
Filter.ECondition condition,
java.lang.String value)
Filter with the given field name for this Table
fieldAcronym - catalog field acronym.condition - filter condition based on Filter.ECondition enum.value - the value data to be filtered by.
ClientRuntimeException - if field not found in this tablepublic Row createRow()
Row
public void insert(Row row)
throws ClientException
row - new Row to insert.
ClientException - if SrvrSession not connected to server
public void modify(Row row)
throws ClientException
row - Row to be updated.
Client application should always fill I_RID key field, and I_CLIENT_NAME client code field if this table is addressed.
In CLIENTS table there is only I_CLIENT_NAME field.
ClientException - if SrvrSession not connected to server or I_RID field not found
public void delete(java.lang.Long recid)
throws ClientException
recid - key field.
ClientException - if SrvrSession not connected to server
public void clear()
throws ClientException
ClientException - if SrvrSession not connected to server
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||