Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
2024-02-16 13:42:51 +01:00

View File

@@ -1,11 +1,13 @@
package it.integry.ems_model.entity;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import it.integry.ems_model.annotation.Master;
import it.integry.ems_model.annotation.PK;
import it.integry.ems_model.annotation.SqlField;
import it.integry.ems_model.annotation.Table;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.entity._enum.IBaseEnum;
import org.kie.api.definition.type.PropertyReactive;
import java.util.Date;
@@ -50,6 +52,9 @@ public class VtbViaggi extends EntityBase {
@SqlField(value = "num_prenotazione", maxLength = 20)
private String numPrenotazione;
@SqlField(value = "mezzo", maxLength = 1, defaultObjectValue = "0")
private Mezzo mezzo;
public VtbViaggi() {
super();
}
@@ -128,4 +133,56 @@ public class VtbViaggi extends EntityBase {
this.numPrenotazione = numPrenotazione;
return this;
}
public Mezzo getMezzo() {
return mezzo;
}
public VtbViaggi setMezzo(Mezzo mezzo) {
this.mezzo = mezzo;
return this;
}
public enum Mezzo implements IBaseEnum<Mezzo> {
VETTORE((short) 0),
MITTENTE((short) 1),
DESTINATARIO((short) 2);
private final short value;
Mezzo(final short value) {
this.value = value;
}
public static Mezzo from(Object value) {
short castValue = (short) value;
for (Mezzo b : Mezzo.values()) {
if (b.value == castValue)
return b;
}
return null;
}
@JsonValue
public short getValue() {
return this.value;
}
@Override
public Object get() {
return this.value;
}
@Override
public Mezzo fromInternal(Object val) {
return from(val);
}
@Override
public String toString() {
return String.valueOf(value);
}
}
}