cn.net.vidyo.yd.common.data.domain.IntModel Maven / Gradle / Ivy
package cn.net.vidyo.yd.common.data.domain;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
@MappedSuperclass
public class IntModel extends Model{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
int id=0;
@Override
public Integer getId() {
return id;
}
@Override
public void setId(Integer id) {
this.id = id;
}
@Override
public Integer getIdentifier() {
return id;
}
@Override
public void setIdentifier(Integer id) {
this.id=id;
}
@Override
public boolean isIdModified() {
return id!=0;
}
}