public interface DataSource<E>
HasDataSource interface,
like Crux Grid.| Modifier and Type | Method and Description |
|---|---|
void |
clearChanges()
Undo all changes
|
E |
cloneDTO(DataSourceRecord<?> record)
Clones the recordObject of a given DataSourceRecord
|
void |
copyValueToWidget(com.google.gwt.user.client.ui.HasValue<?> widget,
String key,
DataSourceRecord<?> dataSourceRecord)
Copies the value from data record to the given widget
|
void |
firstRecord()
Points DataSource to first record
|
E |
getBoundObject()
Return a copy of the current record object.
|
E |
getBoundObject(DataSourceRecord<E> record)
Return a copy of the record object.
|
ColumnDefinitions<E> |
getColumnDefinitions()
Return the DataSource definitions object.
|
DataSourceRecord<E>[] |
getNewRecords()
Return all records inserted on DataSource
|
DataSourceRecord<E> |
getRecord()
Return the DataSourceRecord object, representing the current record
|
DataSourceRecord<E>[] |
getRemovedRecords()
Return all records removed from DataSource
|
DataSourceRecord<E>[] |
getSelectedRecords()
Return all records selected on DataSource
|
DataSourceRecord<E>[] |
getUpdatedRecords()
Return all records modified on DataSource
|
Object |
getValue(String columnName)
Return the column value
|
Object |
getValue(String columnName,
DataSourceRecord<?> record)
Return the column value
|
boolean |
hasNextRecord()
Verify if DataSource has more records.
|
boolean |
hasPreviousRecord()
Verify if DataSource has previous records.
|
DataSourceRecord<E> |
insertRecord(int beforeRecord)
Insert a new record on DataSource
|
void |
nextRecord()
Points DataSource to next record
|
void |
previousRecord()
Points DataSource to previous record
|
DataSourceRecord<E> |
removeRecord(int record)
Remove a record from DataSource
|
void |
reset()
Reset DataSource, as if it was never loaded before.
|
void |
setColumnDefinitions(ColumnDefinitions<E> columnDefinitions)
Sets the DataSource definitions object.
|
void |
setValue(Object value,
String columnKey,
DataSourceRecord<?> dataSourceRecord)
Sets the value on the given column of the give record
|
void |
sort(String columnName,
boolean ascending)
Sort dataSource records, based on column informed
|
void |
sort(String columnName,
boolean ascending,
boolean caseSensitive)
Sort dataSource records, based on column informed
|
void |
updateState(DataSourceRecord<E> record,
DataSourceRecord.DataSourceRecordState previousState)
Update a record on DataSource
|
void firstRecord()
boolean hasNextRecord()
void nextRecord()
boolean hasPreviousRecord()
void previousRecord()
void sort(String columnName, boolean ascending)
columnName - Base column for sorting.ascending - If true, sort ascending.void sort(String columnName, boolean ascending, boolean caseSensitive)
columnName - Base column for sorting.ascending - If true, sort ascending.caseSensitive - indicate if the columns sort are or not key sensitivevoid reset()
ColumnDefinitions<E> getColumnDefinitions()
void setColumnDefinitions(ColumnDefinitions<E> columnDefinitions)
columnDefinitions - Object getValue(String columnName)
columnName - name of the columnObject getValue(String columnName, DataSourceRecord<?> record)
columnName - record - DataSourceRecord<E> getRecord()
E getBoundObject()
E getBoundObject(DataSourceRecord<E> record)
record - DataSourceRecord<E> insertRecord(int beforeRecord)
beforeRecord - DataSourceRecord<E> removeRecord(int record)
record - void updateState(DataSourceRecord<E> record, DataSourceRecord.DataSourceRecordState previousState)
record - previousState - DataSourceRecord<E>[] getNewRecords()
DataSourceRecord<E>[] getRemovedRecords()
DataSourceRecord<E>[] getUpdatedRecords()
DataSourceRecord<E>[] getSelectedRecords()
void clearChanges()
void copyValueToWidget(com.google.gwt.user.client.ui.HasValue<?> widget,
String key,
DataSourceRecord<?> dataSourceRecord)
widget - key - dataSourceRecord - void setValue(Object value, String columnKey, DataSourceRecord<?> dataSourceRecord)
value - columnKey - dataSourceRecord - E cloneDTO(DataSourceRecord<?> record)
record - Copyright © 2015. All rights reserved.