Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Created July 20, 2015 10:12
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 abhirockzz/a52a4116f7db9be20f1e to your computer and use it in GitHub Desktop.
Save abhirockzz/a52a4116f7db9be20f1e to your computer and use it in GitHub Desktop.
A Stock Ticker (info) JPA entity
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