EMlab-generation Documentation  1.0
Documentation of the EMLab-Generation model.
Loan.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.neo4j.graphdb.Direction;
20 import org.springframework.data.neo4j.annotation.NodeEntity;
21 import org.springframework.data.neo4j.annotation.RelatedTo;
22 
25 
26 @NodeEntity
27 public class Loan {
28 
29  @RelatedTo(type = "LEND_TO_AGENT", elementClass = DecarbonizationAgent.class, direction = Direction.OUTGOING)
30  private DecarbonizationAgent from;
31 
32  @RelatedTo(type = "LEND_BY_AGENT", elementClass = DecarbonizationAgent.class, direction = Direction.OUTGOING)
33  private DecarbonizationAgent to;
34 
35  @RelatedTo(type = "LOAN_POWERPLANT", elementClass = PowerPlant.class, direction = Direction.OUTGOING)
36  private PowerPlant regardingPowerPlant;
37 
38  private double amountPerPayment;
39  private long totalNumberOfPayments;
40  private long numberOfPaymentsDone;
41  private long loanStartTime;
42 
43  public long getLoanStartTime() {
44  return loanStartTime;
45  }
46 
47  public void setLoanStartTime(long loanStartTime) {
48  this.loanStartTime = loanStartTime;
49  }
50 
51  public long getTotalNumberOfPayments() {
52  return totalNumberOfPayments;
53  }
54 
55  public double getAmountPerPayment() {
56  return amountPerPayment;
57  }
58 
59  public void setAmountPerPayment(double amountPerPayment) {
60  this.amountPerPayment = amountPerPayment;
61  }
62 
63  public void setTotalNumberOfPayments(long totalNumberOfPayments) {
64  this.totalNumberOfPayments = totalNumberOfPayments;
65  }
66 
67  public long getNumberOfPaymentsDone() {
68  return numberOfPaymentsDone;
69  }
70 
71  public void setNumberOfPaymentsDone(long numberOfPaymentsDone) {
72  this.numberOfPaymentsDone = numberOfPaymentsDone;
73  }
74 
75  public DecarbonizationAgent getFrom() {
76  return from;
77  }
78 
79  public void setFrom(DecarbonizationAgent from) {
80  this.from = from;
81  }
82 
83  public DecarbonizationAgent getTo() {
84  return to;
85  }
86 
87  public void setTo(DecarbonizationAgent to) {
88  this.to = to;
89  }
90 
91  public PowerPlant getRegardingPowerPlant() {
92  return regardingPowerPlant;
93  }
94 
95  public void setRegardingPowerPlant(PowerPlant regardingPowerPlant) {
96  this.regardingPowerPlant = regardingPowerPlant;
97  }
98 }