package quba.models; import javax.persistence.*; import com.avaje.ebean.Expr; import com.avaje.ebean.Model; import java.util.List; @Entity @Table(name = "st_profile") public class QubaStationProfile extends Model { public static Model.Finder<Long, QubaStationProfile> find = new Model.Finder<>("quba",QubaStationProfile.class); public QubaStationProfile(){ pk = new QubaStationProfilePK(); } @EmbeddedId public QubaStationProfilePK pk; public String profiles; public String exception; public String site; public static QubaStationProfile findStProfileByStationAndSession(Long stationid, int session) { return QubaStationProfile.find.where().eq("stationid",stationid).eq("session",session).findUnique(); } public static List<QubaStationProfile> findAllProfilesForStation(Long stationid) { return QubaStationProfile.find.where().eq("stationid",stationid).findList(); } @Override public String toString() { return "QubaStationProfile{" + "pk=" + pk + '}'; } }