-
Notifications
You must be signed in to change notification settings - Fork 5
/
ChpInputEntityData.java
105 lines (95 loc) · 3.46 KB
/
ChpInputEntityData.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
* © 2021. TU Dortmund University,
* Institute of Energy Systems, Energy Efficiency and Energy Economics,
* Research group Distribution grid planning and operation
*/
package edu.ie3.datamodel.io.factory.input.participant;
import edu.ie3.datamodel.models.input.EmInput;
import edu.ie3.datamodel.models.input.NodeInput;
import edu.ie3.datamodel.models.input.OperatorInput;
import edu.ie3.datamodel.models.input.system.ChpInput;
import edu.ie3.datamodel.models.input.system.type.ChpTypeInput;
import edu.ie3.datamodel.models.input.thermal.ThermalBusInput;
import edu.ie3.datamodel.models.input.thermal.ThermalStorageInput;
import java.util.Map;
import java.util.Objects;
public class ChpInputEntityData extends SystemParticipantTypedEntityData<ChpTypeInput> {
private final ThermalBusInput thermalBusInput;
private final ThermalStorageInput thermalStorageInput;
public ChpInputEntityData(
Map<String, String> fieldsToAttributes,
NodeInput node,
EmInput em,
ChpTypeInput typeInput,
ThermalBusInput thermalBusInput,
ThermalStorageInput thermalStorageInput) {
super(fieldsToAttributes, ChpInput.class, node, em, typeInput);
this.thermalBusInput = thermalBusInput;
this.thermalStorageInput = thermalStorageInput;
}
public ChpInputEntityData(
Map<String, String> fieldsToAttributes,
OperatorInput operator,
NodeInput node,
EmInput em,
ChpTypeInput typeInput,
ThermalBusInput thermalBusInput,
ThermalStorageInput thermalStorageInput) {
super(fieldsToAttributes, ChpInput.class, operator, node, em, typeInput);
this.thermalBusInput = thermalBusInput;
this.thermalStorageInput = thermalStorageInput;
}
/**
* Creates a new ChpInputEntityData object based on a given {@link
* SystemParticipantTypedEntityData} object and a thermal bus and storage input
*
* @param entityData The SystemParticipantTypedEntityData object to enhance
* @param thermalBusInput The thermal bus input
* @param thermalStorageInput The thermal storage input
*/
public ChpInputEntityData(
SystemParticipantTypedEntityData<ChpTypeInput> entityData,
ThermalBusInput thermalBusInput,
ThermalStorageInput thermalStorageInput) {
super(entityData, entityData.getTypeInput());
this.thermalBusInput = thermalBusInput;
this.thermalStorageInput = thermalStorageInput;
}
public ThermalBusInput getThermalBusInput() {
return thermalBusInput;
}
public ThermalStorageInput getThermalStorageInput() {
return thermalStorageInput;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof ChpInputEntityData that)) return false;
if (!super.equals(o)) return false;
return thermalBusInput.equals(that.thermalBusInput)
&& thermalStorageInput.equals(that.thermalStorageInput);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), thermalBusInput, thermalStorageInput);
}
@Override
public String toString() {
return "ChpInputEntityData{"
+ "thermalBusInput="
+ thermalBusInput.getUuid()
+ ", thermalStorageInput="
+ thermalStorageInput.getUuid()
+ ", typeInput="
+ getTypeInput().getUuid()
+ ", node="
+ getNode().getUuid()
+ ", operatorInput="
+ getOperatorInput().getUuid()
+ ", fieldsToValues="
+ getFieldsToValues()
+ ", targetClass="
+ getTargetClass()
+ '}';
}
}