/******************************************************************************* * Copyright 2012 the original author or authors. * * 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. ******************************************************************************/ package emlab.domain.contract; import org.springframework.data.neo4j.annotation.NodeEntity; import org.springframework.data.neo4j.annotation.RelatedTo; import org.neo4j.graphdb.Direction; import emlab.domain.agent.DecarbonizationAgent; @NodeEntity public class Contract { @RelatedTo(type = "CONTRACT_FROM", elementClass = DecarbonizationAgent.class, direction = Direction.OUTGOING) private DecarbonizationAgent from; @RelatedTo(type = "CONTRACT_TO", elementClass = DecarbonizationAgent.class, direction = Direction.OUTGOING) private DecarbonizationAgent to; private double pricePerUnit; private boolean signed; private long start; private long finish; public double getPricePerUnit() { return pricePerUnit; } public void setPricePerUnit(double pricePerUnit) { this.pricePerUnit = pricePerUnit; } public boolean isSigned() { return signed; } public void setSigned(boolean signed) { this.signed = signed; } public long getStart() { return start; } public void setStart(long start) { this.start = start; } public long getFinish() { return finish; } public void setFinish(long finish) { this.finish = finish; } public DecarbonizationAgent getFrom() { return from; } public void setFrom(DecarbonizationAgent from) { this.from = from; } public DecarbonizationAgent getTo() { return to; } public void setTo(DecarbonizationAgent to) { this.to = to; } }