Created
July 20, 2015 10:12
-
-
Save abhirockzz/a52a4116f7db9be20f1e to your computer and use it in GitHub Desktop.
A Stock Ticker (info) JPA entity
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 blog.abhirockzz.wordpress.com; | |
import java.io.Serializable; | |
import javax.persistence.Entity; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.GenerationType; | |
import javax.persistence.Id; | |
import javax.persistence.Table; | |
@Entity | |
@Table(name = "STOCK_TICK") | |
public class StockTick implements Serializable { | |
@Id | |
@GeneratedValue(strategy = GenerationType.AUTO) | |
private Long id; | |
private String name; | |
private String price; | |
public StockTick(String name, String price) { | |
this.name = name; | |
this.price = price; | |
} | |
public StockTick() { | |
//for JPA | |
} | |
//getters and setters omitted ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment