Skip to content

Instantly share code, notes, and snippets.

@mkheck
Last active February 29, 2016 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkheck/21b0528b287ca9c4d3e2 to your computer and use it in GitHub Desktop.
Save mkheck/21b0528b287ca9c4d3e2 to your computer and use it in GitHub Desktop.
package org.thehecklers;
import org.springframework.stereotype.Component;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Reading {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
private double temperature;
private double humidity;
public Reading() {
}
public Reading(double temperature, double humidity) {
this.temperature = temperature;
this.humidity = humidity;
}
public double getTemperature() {
return temperature;
}
public void setTemperature(double temperature) {
this.temperature = temperature;
}
public double getHumidity() {
return humidity;
}
public void setHumidity(double humidity) {
this.humidity = humidity;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment