Last active
February 29, 2016 22:32
-
-
Save mkheck/21b0528b287ca9c4d3e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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