use of uk.ac.bris.cs.rfideasalreadytaken.lumberjack.database.data.Device in project lumberjack by fn-ctional.
the class WebBackend method getDevicesCSV.
public String getDevicesCSV() throws SQLException {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("id,");
stringBuilder.append("scan value,");
stringBuilder.append("type,");
stringBuilder.append("available,");
stringBuilder.append("currently assigned,");
stringBuilder.append("rule id");
stringBuilder.append("\n");
List<Device> devices = getDevices();
for (Device device : devices) {
stringBuilder.append(device.getId());
stringBuilder.append(",");
stringBuilder.append(device.getScanValue());
stringBuilder.append(",");
stringBuilder.append(device.getType());
stringBuilder.append(",");
stringBuilder.append(device.isAvailable());
stringBuilder.append(",");
stringBuilder.append(device.isCurrentlyAssigned());
stringBuilder.append(",");
stringBuilder.append(device.getRuleID());
stringBuilder.append("\n");
}
return stringBuilder.toString();
}
Aggregations