Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@ public class ElectricPowerQualitySummaryEntity extends IdentifiedObject {
@Column(name = "short_interruptions")
private Long shortInterruptions;

/**
* Summary interval for this power quality summary.
* Time period covered by these measurements.
*/
@Embedded
@AttributeOverrides({
@AttributeOverride(name = "start", column = @Column(name = "summary_interval_start")),
@AttributeOverride(name = "duration", column = @Column(name = "summary_interval_duration"))
})
private DateTimeInterval summaryInterval;

/**
* Number of supply voltage dips during the summary period.
* Temporary reductions in RMS voltage.
Expand Down Expand Up @@ -142,17 +153,6 @@ public class ElectricPowerQualitySummaryEntity extends IdentifiedObject {
@Column(name = "temp_overvoltage")
private Long tempOvervoltage;

/**
* Summary interval for this power quality summary.
* Time period covered by these measurements.
*/
@Embedded
@AttributeOverrides({
@AttributeOverride(name = "start", column = @Column(name = "summary_interval_start")),
@AttributeOverride(name = "duration", column = @Column(name = "summary_interval_duration"))
})
private DateTimeInterval summaryInterval;

/**
* Usage point that this power quality summary belongs to.
* Many summaries can belong to one usage point.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,16 @@ CREATE TABLE electric_power_quality_summaries
power_frequency BIGINT,
rapid_voltage_changes BIGINT,
short_interruptions BIGINT,
supply_voltage_dips BIGINT,
supply_voltage_imbalance BIGINT,
supply_voltage_variations BIGINT,
temp_overvoltage BIGINT,

-- Embedded DateTimeInterval: summaryInterval
summary_interval_start BIGINT,
summary_interval_duration BIGINT,

supply_voltage_dips BIGINT,
supply_voltage_imbalance BIGINT,
supply_voltage_variations BIGINT,
temp_overvoltage BIGINT,

-- Foreign key relationships
usage_point_id CHAR(36),

Expand Down
Loading