Created
April 5, 2019 07:01
-
-
Save code-machina/8355d35821eeda08833f76692b5283e2 to your computer and use it in GitHub Desktop.
Model for Spring DAL
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 com.gbkim.student.dal.entities; | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.GenerationType; | |
import javax.persistence.Id; | |
import javax.persistence.Table; | |
@Entity | |
@Table(name = "studenttab") | |
public class Student { | |
@Id | |
@GeneratedValue(strategy = GenerationType.AUTO) | |
private long id; | |
@Column(name = "sname") | |
private String name; | |
@Column(name = "scourse") | |
private String course; | |
@Column(name = "sfee") | |
private double fee; | |
public long getId() { | |
return id; | |
} | |
public void setId(long id) { | |
this.id = id; | |
} | |
public String getName() { | |
return name; | |
} | |
public void setName(String name) { | |
this.name = name; | |
} | |
public String getCourse() { | |
return course; | |
} | |
public void setCourse(String course) { | |
this.course = course; | |
} | |
public double getFee() { | |
return fee; | |
} | |
public void setFee(double fee) { | |
this.fee = fee; | |
} | |
@Override | |
public String toString() { | |
return "Student [id=" + id + ", name=" + name + ", course=" + course + ", fee=" + fee + "]"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment