EMlab-generation Documentation  1.0
Documentation of the EMLab-Generation model.
Contract.java
1 /*******************************************************************************
2  * Copyright 2012 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  ******************************************************************************/
16 package emlab.gen.domain.contract;
17 
18 
19 import org.springframework.data.neo4j.annotation.NodeEntity;
20 import org.springframework.data.neo4j.annotation.RelatedTo;
21 import org.neo4j.graphdb.Direction;
22 
24 
25 @NodeEntity
26 public class Contract {
27 
28  @RelatedTo(type = "CONTRACT_FROM", elementClass = DecarbonizationAgent.class, direction = Direction.OUTGOING)
29  private DecarbonizationAgent from;
30 
31  @RelatedTo(type = "CONTRACT_TO", elementClass = DecarbonizationAgent.class, direction = Direction.OUTGOING)
32  private DecarbonizationAgent to;
33 
34  private double pricePerUnit;
35  private boolean signed;
36  private long start;
37  private long finish;
38 
39  public double getPricePerUnit() {
40  return pricePerUnit;
41  }
42 
43  public void setPricePerUnit(double pricePerUnit) {
44  this.pricePerUnit = pricePerUnit;
45  }
46 
47  public boolean isSigned() {
48  return signed;
49  }
50 
51  public void setSigned(boolean signed) {
52  this.signed = signed;
53  }
54 
55  public long getStart() {
56  return start;
57  }
58 
59  public void setStart(long start) {
60  this.start = start;
61  }
62 
63  public long getFinish() {
64  return finish;
65  }
66 
67  public void setFinish(long finish) {
68  this.finish = finish;
69  }
70 
71  public DecarbonizationAgent getFrom() {
72  return from;
73  }
74 
75  public void setFrom(DecarbonizationAgent from) {
76  this.from = from;
77  }
78 
79  public DecarbonizationAgent getTo() {
80  return to;
81  }
82 
83  public void setTo(DecarbonizationAgent to) {
84  this.to = to;
85  }
86 }