EMlab-generation Documentation  1.0
Documentation of the EMLab-Generation model.
CashFlow.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 import org.neo4j.graphdb.Direction;
19 import org.springframework.data.neo4j.annotation.NodeEntity;
20 import org.springframework.data.neo4j.annotation.RelatedTo;
21 
24 
25 @NodeEntity
26 public class CashFlow {
27 
28  public static final int UNCLASSIFIED = 0;
29  public static final int ELECTRICITY_SPOT = 1;
30  public static final int ELECTRICITY_LONGTERM = 2;
31  public static final int FIXEDOMCOST = 3;
32  public static final int COMMODITY = 4;
33  public static final int CO2TAX = 5;
34  public static final int CO2AUCTION = 6;
35  public static final int LOAN = 7;
36  public static final int DOWNPAYMENT = 8;
37  public static final int NATIONALMINCO2 = 9;
38  public static final int STRRESPAYMENT = 10;
39  public static final int CO2HEDGING = 12;
40 
41  @RelatedTo(type = "FROM_AGENT", elementClass = DecarbonizationAgent.class, direction = Direction.OUTGOING)
42  private DecarbonizationAgent from;
43 
44  @RelatedTo(type = "TO_AGENT", elementClass = DecarbonizationAgent.class, direction = Direction.OUTGOING)
45  private DecarbonizationAgent to;
46 
47  @RelatedTo(type = "REGARDING_POWERPLANT", elementClass = PowerPlant.class, direction = Direction.OUTGOING)
48  private PowerPlant regardingPowerPlant;
49 
50  private int type;
51  private double money;
52  private long time;
53 
54  public long getTime() {
55  return time;
56  }
57 
58  public void setTime(long time) {
59  this.time = time;
60  }
61 
62  public DecarbonizationAgent getFrom() {
63  return from;
64  }
65 
66  public void setFrom(DecarbonizationAgent from) {
67  this.from = from;
68  }
69 
70  public DecarbonizationAgent getTo() {
71  return to;
72  }
73 
74  public void setTo(DecarbonizationAgent to) {
75  this.to = to;
76  }
77 
78  public double getMoney() {
79  return money;
80  }
81 
82  public void setMoney(double money) {
83  this.money = money;
84  }
85 
86  public int getType() {
87  return type;
88  }
89 
90  public void setType(int type) {
91  this.type = type;
92  }
93 
94  @Override
95  public String toString() {
96  return "from " + getFrom() + " to " + getTo() + " type " + getType() + " amount " + getMoney();
97  }
98 
99  public PowerPlant getRegardingPowerPlant() {
100  return regardingPowerPlant;
101  }
102 
103  public void setRegardingPowerPlant(PowerPlant regardingPowerPlant) {
104  this.regardingPowerPlant = regardingPowerPlant;
105  }
106 
107 }