use of org.eclipse.scout.rt.shared.services.lookup.ILookupRow in project scout.rt by eclipse.
the class TestingLookupService method getDataByText.
@Override
public List<ILookupRow<Long>> getDataByText(ILookupCall<Long> call) {
List<ILookupRow<Long>> list = new ArrayList<ILookupRow<Long>>();
Pattern p = createLowerCaseSearchPattern(call.getText());
for (ILookupRow<Long> row : getRows()) {
if (row.getText() != null && p.matcher(row.getText().toLowerCase()).matches()) {
list.add(row);
}
}
return list;
}
use of org.eclipse.scout.rt.shared.services.lookup.ILookupRow in project scout.rt by eclipse.
the class TestingLookupService method getDataByAll.
@Override
public List<ILookupRow<Long>> getDataByAll(ILookupCall<Long> call) {
List<ILookupRow<Long>> list = new ArrayList<ILookupRow<Long>>();
Pattern p = createLowerCaseSearchPattern(call.getAll());
for (ILookupRow<Long> row : getRows()) {
if (row.getText() != null && p.matcher(row.getText().toLowerCase()).matches()) {
list.add(row);
}
}
return list;
}
use of org.eclipse.scout.rt.shared.services.lookup.ILookupRow in project scout.rt by eclipse.
the class BatchLookupService method getBatchDataByKey.
@Override
public List<List<ILookupRow<?>>> getBatchDataByKey(BatchLookupCall batch) {
List<ILookupCall<?>> calls = batch.getCallBatch();
List<List<ILookupRow<?>>> result = new ArrayList<List<ILookupRow<?>>>();
BatchLookupResultCache cache = new BatchLookupResultCache();
for (ILookupCall<?> call : calls) {
result.add(new ArrayList<ILookupRow<?>>(cache.getDataByKey(call)));
}
return result;
}
use of org.eclipse.scout.rt.shared.services.lookup.ILookupRow in project scout.rt by eclipse.
the class BatchLookupService method getBatchDataByRec.
@Override
public List<List<ILookupRow<?>>> getBatchDataByRec(BatchLookupCall batch) {
List<ILookupCall<?>> calls = batch.getCallBatch();
List<List<ILookupRow<?>>> result = new ArrayList<List<ILookupRow<?>>>();
BatchLookupResultCache cache = new BatchLookupResultCache();
for (ILookupCall<?> call : calls) {
result.add(new ArrayList<ILookupRow<?>>(cache.getDataByRec(call)));
}
return result;
}
use of org.eclipse.scout.rt.shared.services.lookup.ILookupRow in project scout.rt by eclipse.
the class DataModelOperatorLookupCall method execCreateLookupRows.
@Override
protected List<ILookupRow<IDataModelAttributeOp>> execCreateLookupRows() {
List<ILookupRow<IDataModelAttributeOp>> result = new ArrayList<ILookupRow<IDataModelAttributeOp>>();
List<IDataModelAttributeOp> ops = null;
if (m_attribute != null) {
ops = m_attribute.getOperators();
}
if (ops != null) {
for (IDataModelAttributeOp op : ops) {
String text = op.getShortText();
if (text != null && text.indexOf("{0}") >= 0) {
text = text.replace("{0}", "n");
}
if (text != null && text.indexOf("{1}") >= 0) {
text = text.replace("{1}", "m");
}
result.add(new LookupRow<IDataModelAttributeOp>(op, text));
}
}
return result;
}
Aggregations