| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- package cz.senslog.telemetry.database.domain;
- public class Sensor {
- private final long sensorId;
- private final String name;
- private final String type;
- private final int ioID;
- private final Phenomenon phenomenon;
- private final String description;
- public static Sensor of(long sensorId, String name, String type, int ioID, Phenomenon phenomenon, String description) {
- return new Sensor(sensorId, name, type, ioID, phenomenon, description);
- }
- public static Sensor of(long sensorId, String name, String type) {
- return of(sensorId, name, type, -1, null, null);
- }
- public static Sensor of(long sensorId, String name, int ioId) {
- return of(sensorId, name, null, ioId, null, null);
- }
- private Sensor(long sensorId, String name, String type, int ioID, Phenomenon phenomenon, String description) {
- this.sensorId = sensorId;
- this.name = name;
- this.type = type;
- this.ioID = ioID;
- this.phenomenon = phenomenon;
- this.description = description;
- }
- public long getSensorId() {
- return sensorId;
- }
- public String getName() {
- return name;
- }
- public String getType() {
- return type;
- }
- public int getIoID() {
- return ioID;
- }
- public Phenomenon getPhenomenon() {
- return phenomenon;
- }
- public String getDescription() {
- return description;
- }
- }
|