fix
This commit is contained in:
parent
0383a547c1
commit
06dbd2bef0
3 changed files with 1 additions and 7 deletions
|
@ -2,11 +2,8 @@ package ch.usi.inf.sa4.sanmarinoes.smarthut.models;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Inheritance;
|
|
||||||
import javax.persistence.InheritanceType;
|
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Inheritance(strategy = InheritanceType.JOINED)
|
|
||||||
public class BooleanTrigger<D extends Device & BooleanTriggerable> extends Trigger<D> {
|
public class BooleanTrigger<D extends Device & BooleanTriggerable> extends Trigger<D> {
|
||||||
|
|
||||||
@Column(name = "switchable_on")
|
@Column(name = "switchable_on")
|
||||||
|
|
|
@ -3,12 +3,9 @@ package ch.usi.inf.sa4.sanmarinoes.smarthut.models;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Inheritance;
|
|
||||||
import javax.persistence.InheritanceType;
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Inheritance(strategy = InheritanceType.JOINED)
|
|
||||||
public class RangeTrigger<D extends Device & RangeTriggerable> extends Trigger<D> {
|
public class RangeTrigger<D extends Device & RangeTriggerable> extends Trigger<D> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -15,7 +15,7 @@ import javax.persistence.PreRemove;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
|
||||||
public abstract class Trigger<D extends Device> {
|
public abstract class Trigger<D extends Device> {
|
||||||
|
|
||||||
public abstract boolean triggered();
|
public abstract boolean triggered();
|
||||||
|
|
Loading…
Reference in a new issue