/* * Copyright 2014-2015 Department of Information Engineering, University of Pisa Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // BETaaS - Building the Environment for the Things as a Service // // Component: TaaS QoS Manager Database // Responsible: Carlo Vallati & Giacomo Tanganelli package eu.betaas.taas.bigdatamanager.database.hibernate.data; import javax.persistence.EmbeddedId; import javax.persistence.Entity; import javax.persistence.Table; @Entity @Table(name = "QOSM_EQUIVALENT_THING_SERVICE_STAR") public class QoSMEquivalentThingServiceStar implements java.io.Serializable { /** * */ private static final long serialVersionUID = 1L; //private QoSMEquivalentThingService_PK eqid = new QoSMEquivalentThingService_PK(); QoSMServiceRequestTS id; public QoSMEquivalentThingServiceStar() {} public QoSMEquivalentThingServiceStar(String serviceId, int requestId, String thingServiceId) { id = new QoSMServiceRequestTS(serviceId, requestId, thingServiceId); } public QoSMEquivalentThingServiceStar(QoSMEquivalentThingServiceStar eq) { id = eq.getId(); } @Override public String toString() { String msg="\nServiceid: " + id.getServiceId(); msg += "\nRequestId: "+ id.getRequestId(); msg += "\nThingServiceId: "+ id.getThingServiceId(); return msg; } @EmbeddedId public QoSMServiceRequestTS getId( ) { return id; } public void setId(QoSMServiceRequestTS id) { this.id = id; } }