60 lines
1.1 KiB
Java
60 lines
1.1 KiB
Java
package examplebeans;
|
|
|
|
import tech.nevets.osql4j.annotations.SQLSerializable;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
@SQLSerializable
|
|
public class Animal {
|
|
private String name;
|
|
private int age;
|
|
private String color;
|
|
private BigDecimal weight;
|
|
|
|
public Animal() {}
|
|
|
|
public Animal(String name, int age, String color, BigDecimal weight) {
|
|
this.name = name;
|
|
this.age = age;
|
|
this.color = color;
|
|
this.weight = weight;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public int getAge() {
|
|
return age;
|
|
}
|
|
|
|
public void setAge(int age) {
|
|
this.age = age;
|
|
}
|
|
|
|
public String getColor() {
|
|
return color;
|
|
}
|
|
|
|
public void setColor(String color) {
|
|
this.color = color;
|
|
}
|
|
|
|
public BigDecimal getWeight() {
|
|
return weight;
|
|
}
|
|
|
|
public void setWeight(BigDecimal weight) {
|
|
this.weight = weight;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "(Animal: " + name + ", " + age + ", " + color + ", " + weight + ")";
|
|
}
|
|
}
|