use of com.ramussoft.report.data.Rows in project ramus by Vitaliy-Yakovchuk.
the class IDEF0Buffer method commit.
public void commit(boolean all) {
Enumeration<Row> keys = functionStreamsBuff.keys();
while (keys.hasMoreElements()) {
Row key = keys.nextElement();
Hashtable<Row, Boolean> fs = functionStreamsBuff.get(key);
Rows rows = new Rows(streams, data, false);
functionStreams.put(key, rows);
Enumeration<Row> streams = fs.keys();
while (streams.hasMoreElements()) rows.add(streams.nextElement());
}
List<com.ramussoft.database.common.Row> allRows = this.functions.getAllRows();
Row[] functions = allRows.toArray(new Row[allRows.size()]);
keys = rowFunctionsBuff.keys();
while (keys.hasMoreElements()) {
Row key = keys.nextElement();
Hashtable<Row, Boolean> rf = rowFunctionsBuff.get(key);
Rows fns = new Rows(this.functions, data, false);
// fns.addAll(rf.keySet());
rowFunctions.put(key, fns);
for (Row f : functions) if (all || getChildCount(f) == 0)
if (rf.get(f) != null)
fns.add(f);
}
functionStreamsBuff = null;
rowFunctionsBuff = null;
}
use of com.ramussoft.report.data.Rows in project ramus by Vitaliy-Yakovchuk.
the class IDEF0Buffer method getStreams.
public Rows getStreams(Row function) {
Rows rows = functionStreams.get(function);
if (rows == null)
return new Rows(streams, data, false);
Rows clone = (Rows) rows.clone();
return clone;
}
use of com.ramussoft.report.data.Rows in project ramus by Vitaliy-Yakovchuk.
the class IDEF0Buffer method getFunctions.
public Rows getFunctions(Row row) {
Rows rows = rowFunctions.get(row);
if (rows == null)
return new Rows(functions, data, false);
Rows clone = (Rows) rows.clone();
return clone;
}
use of com.ramussoft.report.data.Rows in project ramus by Vitaliy-Yakovchuk.
the class IDEF0ConnectionPlugin method getStreams.
private Rows getStreams(Data data, String name) {
final RowSet rowSet = IDEF0Buffer.getStreamsRowSet(data);
final Rows rows = new Rows(rowSet, data, false);
rows.setQualifierName(name);
data.getTemplate().queryWithoutResults("SELECT DISTINCT ramus_attribute_any_to_any_elements.element_id,\n" + "(SELECT element_id FROM ramus_elements WHERE ramus_attribute_any_to_any_elements.other_element= ramus_elements.element_id) as oelement_id,\n" + "ramus_elements.element_name\n" + "FROM ramus_attribute_any_to_any_elements, ramus_elements, ramus_attribute_sector_borders, ramus_attribute_other_elements\n" + "WHERE ramus_attribute_any_to_any_elements.element_id= ramus_elements.element_id\n" + "AND ramus_attribute_sector_borders.function_type>=0\n" + "AND ramus_attribute_sector_borders.element_id = ramus_attribute_other_elements.element_id\n" + "AND ramus_attribute_other_elements.other_element = ramus_elements.element_id\n", new RowMapper() {
@Override
public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
if ((rs.getString(3).length() > 0) || (rs.getObject(2) != null)) {
rows.add((Row) rowSet.findRow(rs.getLong(1)));
}
return null;
}
}, true);
return rows;
}
use of com.ramussoft.report.data.Rows in project ramus by Vitaliy-Yakovchuk.
the class InputsControlsMechanismsConnection method getConnected.
@Override
public Rows getConnected(Data data, Row row) {
Rows rows = inputs.getConnected(data, row);
rows.addAll(controls.getConnected(data, row));
rows.addAll(mechanisms.getConnected(data, row));
return rows;
}
Aggregations