// Path: src/main/java/hr/vsite/hive/sensors/Sensor.java
// public class Sensor implements Comparable<Sensor> {
// 
// 	/** Hive's ID of this Sensor */
// 	public UUID getId() { return id; }
// 	public void setId(UUID id) { this.id = id; }
// 	
// 	/** Sensor's own ID */
// 	public String getDeviceId() { return deviceId; }
// 	public void setDeviceId(String deviceId) { this.deviceId = deviceId; }
// 	
// 	/** Sensor's name */
// 	public String getName() { return name; }
// 	public void setName(String name) { this.name = name; }
// 
// 	/** Last modification time */
// 	public Instant getLastModified() { return lastModified; }
// 	public void setLastModified(Instant lastModified) { this.lastModified = lastModified; }
// 	
// 	@Override
// 	public String toString() {
// 		return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
// 			.append("id", id)
// 			.append("deviceId", deviceId)
// 			.append("name", name)
// 			.toString();
// 	}
// 
// 	@Override
// 	public int compareTo(Sensor o) {
// 		return id.compareTo(o.getId());
// 	}
// 	
// 	@Override
// 	public int hashCode() {
// 		final int prime = 31;
// 		int result = 1;
// 		result = prime * result + ((id == null) ? 0 : id.hashCode());
// 		return result;
// 	}
// 	
// 	@Override
// 	public boolean equals(Object obj) {
// 		if (this == obj)
// 			return true;
// 		if (obj == null)
// 			return false;
// 		if (getClass() != obj.getClass())
// 			return false;
// 		Sensor other = (Sensor) obj;
// 		if (id == null) {
// 			if (other.id != null)
// 				return false;
// 		} else if (!id.equals(other.id))
// 			return false;
// 		return true;
// 	}
// 	
// 	private UUID id;
// 	private String deviceId;
// 	private String name;
// 	private Instant lastModified;
// 
// }


import java.time.Instant;
import java.util.UUID;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import hr.vsite.hive.sensors.Sensor;
package hr.vsite.hive.ticks;




/**
 * Base class for all Ticks, providing common properties.
 */
public class Tick implements Comparable<Tick> {

	public static enum Type {
		Value,
		Counter,
		Toggle,
		Geo,
		Log
		//Image	// TODO brainstorm this further (some sort of binary blob with content type?)
	}
	
	/** Hive's ID of this Tick */
	public UUID getId() { return id; }
	public void setId(UUID id) { this.id = id; }
	
	/** Instant when this Tick was created. Determined by sensor, may be <code>null</code>. */
	public Instant getCreatedTime() { return createdTime; }
	public void setCreatedTime(Instant createdTime) { this.createdTime = createdTime; }
	
	/** Instant when this Tick was received by Hive. */
	public Instant getReceivedTime() { return receivedTime; }
	public void setReceivedTime(Instant receivedTime) { this.receivedTime = receivedTime; }
	
	/** Major part of MetaOrdinal/SensorOrdinal pair that together define order of thicks received from Sensor.
	 * MetaOrdinal never turns around. */
	public Integer getMetaOrdinal() { return metaOrdinal; }
// Path: src/main/java/hr/vsite/hive/sensors/Sensor.java
// public class Sensor implements Comparable<Sensor> {
// 
// 	/** Hive's ID of this Sensor */
// 	public UUID getId() { return id; }
// 	public void setId(UUID id) { this.id = id; }
// 	
// 	/** Sensor's own ID */
// 	public String getDeviceId() { return deviceId; }
// 	public void setDeviceId(String deviceId) { this.deviceId = deviceId; }
// 	
// 	/** Sensor's name */
// 	public String getName() { return name; }
// 	public void setName(String name) { this.name = name; }
// 
// 	/** Last modification time */
// 	public Instant getLastModified() { return lastModified; }
// 	public void setLastModified(Instant lastModified) { this.lastModified = lastModified; }
// 	
// 	@Override
// 	public String toString() {
// 		return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
// 			.append("id", id)
// 			.append("deviceId", deviceId)
// 			.append("name", name)
// 			.toString();
// 	}
// 
// 	@Override
// 	public int compareTo(Sensor o) {
// 		return id.compareTo(o.getId());
// 	}
// 	
// 	@Override
// 	public int hashCode() {
// 		final int prime = 31;
// 		int result = 1;
// 		result = prime * result + ((id == null) ? 0 : id.hashCode());
// 		return result;
// 	}
// 	
// 	@Override
// 	public boolean equals(Object obj) {
// 		if (this == obj)
// 			return true;
// 		if (obj == null)
// 			return false;
// 		if (getClass() != obj.getClass())
// 			return false;
// 		Sensor other = (Sensor) obj;
// 		if (id == null) {
// 			if (other.id != null)
// 				return false;
// 		} else if (!id.equals(other.id))
// 			return false;
// 		return true;
// 	}
// 	
// 	private UUID id;
// 	private String deviceId;
// 	private String name;
// 	private Instant lastModified;
// 
// }


// Path: src/main/java/hr/vsite/hive/ticks/Tick.java
import java.time.Instant;
import java.util.UUID;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import hr.vsite.hive.sensors.Sensor;

package hr.vsite.hive.ticks;




/**
 * Base class for all Ticks, providing common properties.
 */
public class Tick implements Comparable<Tick> {

	public static enum Type {
		Value,
		Counter,
		Toggle,
		Geo,
		Log
		//Image	// TODO brainstorm this further (some sort of binary blob with content type?)
	}
	
	/** Hive's ID of this Tick */
	public UUID getId() { return id; }
	public void setId(UUID id) { this.id = id; }
	
	/** Instant when this Tick was created. Determined by sensor, may be <code>null</code>. */
	public Instant getCreatedTime() { return createdTime; }
	public void setCreatedTime(Instant createdTime) { this.createdTime = createdTime; }
	
	/** Instant when this Tick was received by Hive. */
	public Instant getReceivedTime() { return receivedTime; }
	public void setReceivedTime(Instant receivedTime) { this.receivedTime = receivedTime; }
	
	/** Major part of MetaOrdinal/SensorOrdinal pair that together define order of thicks received from Sensor.
	 * MetaOrdinal never turns around. */
	public Integer getMetaOrdinal() { return metaOrdinal; }
	public void setMetaOrdinal(Integer metaOrdinal) { this.metaOrdinal = metaOrdinal; }