41 lines
691 B
Java
41 lines
691 B
Java
package com.baeldung.entity;
|
|
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.xml.bind.annotation.XmlRootElement;
|
|
|
|
@XmlRootElement
|
|
@Entity
|
|
public class Fruit {
|
|
|
|
@Id
|
|
private long id;
|
|
private String name;
|
|
private String color;
|
|
|
|
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 getColor() {
|
|
return color;
|
|
}
|
|
|
|
public void setColor(String color) {
|
|
this.color = color;
|
|
}
|
|
|
|
}
|