package entity;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
public class Point {
@Id
private int id;
private int x;
private int y;
public Point() {
}
public Point(int x, int y) {
this.x = x;
this.y = y;
}
public int getX() {
return x;
}
public int getY() {
return y;
}
}
package entity;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* Entity-класс "Четырехугольник"
*/
@Entity
public class Quadrangle {
@Id
private int id;
public Quadrangle() {
}
public Quadrangle(Point p1, Point p2, Point p3, Point p4) {
}
@Override
public String toString() {
return "Quadrangle id #" + id;
}
}