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 @@ -129,6 +129,89 @@ public class UsagePointEntity extends IdentifiedObject {
})
private SummaryMeasurement ratedPower;

/**
* True if as a result of an inspection or otherwise, there is a reason to suspect
* that a previous billing may have been performed with erroneous data.
* Value should be reset once this potential discrepancy has been resolved.
* Per ESPI 4.0 XSD: [extension] boolean field.
*/
@Column(name = "check_billing")
private Boolean checkBilling;

/**
* True if grounded.
* Per ESPI 4.0 XSD: [extension] boolean field.
*/
@Column(name = "grounded")
private Boolean grounded;

/**
* If true, this usage point is a service delivery point, i.e., a usage point
* where the ownership of the service changes hands.
* Per ESPI 4.0 XSD: [extension] boolean field.
*/
@Column(name = "is_sdp")
private Boolean isSdp;

/**
* If true, this usage point is virtual, i.e., no physical location exists in the
* network where a meter could be located to collect the meter readings.
* For example, one may define a virtual usage point to serve as an aggregation of
* usage for all of a company's premises distributed widely across the distribution territory.
* Otherwise, the usage point is physical, i.e., there is a logical point in the network
* where a meter could be located to collect meter readings.
* Per ESPI 4.0 XSD: [extension] boolean field.
*/
@Column(name = "is_virtual")
private Boolean isVirtual;

/**
* If true, minimal or zero usage is expected at this usage point for situations such as
* premises vacancy, logical or physical disconnect.
* It is used for readings validation and estimation.
* Per ESPI 4.0 XSD: [extension] boolean field.
*/
@Column(name = "minimal_usage_expected")
private Boolean minimalUsageExpected;

/**
* Outage region in which this usage point is located.
* Per ESPI 4.0 XSD: [extension] String256 field (max length 256).
*/
@Column(name = "outage_region", length = 256)
private String outageRegion;

/**
* Cycle day on which the meter for this usage point will normally be read.
* Usually correlated with the billing cycle.
* Per ESPI 4.0 XSD: [extension] String256 field (max length 256).
*/
@Column(name = "read_cycle", length = 256)
private String readCycle;

/**
* Identifier of the route to which this usage point is assigned for purposes of meter reading.
* Typically used to configure hand held meter reading systems prior to collection of reads.
* Per ESPI 4.0 XSD: [extension] String256 field (max length 256).
*/
@Column(name = "read_route", length = 256)
private String readRoute;

/**
* Remarks about this usage point, for example the reason for it being rated with a non-nominal priority.
* Per ESPI 4.0 XSD: [extension] String256 field (max length 256).
*/
@Column(name = "service_delivery_remark", length = 256)
private String serviceDeliveryRemark;

/**
* Priority of service for this usage point.
* Note that usage points at the same service location can have different priorities.
* Per ESPI 4.0 XSD: [extension] String32 field (max length 32).
*/
@Column(name = "service_priority", length = 32)
private String servicePriority;

/**
* Service delivery point associated with this usage point.
* ServiceDeliveryPoint is now a standalone ESPI resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,42 +98,62 @@ CREATE TABLE usage_points
self_link_href VARCHAR(1024),
self_link_type VARCHAR(255),

-- Usage point specific fields
kind VARCHAR(50),
status smallint,
uri VARCHAR(1024),
service_category VARCHAR(50),
service_delivery_remark VARCHAR(255),
role_flags VARBINARY(255),

-- Embedded SummaryMeasurement: estimatedLoad
-- Usage point specific fields (ordered per ESPI 4.0 XSD sequence)
-- XSD sequence: roleFlags, ServiceCategory, status, serviceDeliveryPoint, amiBillingReady, checkBilling, connectionState, estimatedLoad, grounded, isSdp, isVirtual, minimalUsageExpected, nominalServiceVoltage, outageRegion, phaseCode, ratedCurrent, ratedPower, readCycle, readRoute, serviceDeliveryRemark, servicePriority

role_flags VARBINARY(255), -- 1. roleFlags
service_category VARCHAR(50), -- 2. ServiceCategory
status SMALLINT, -- 3. status
-- 4. serviceDeliveryPoint (FK handled below)
-- 5. amiBillingReady (enum - Phase 16b)
check_billing BOOLEAN, -- 6. checkBilling (Phase 16a)
-- 7. connectionState (enum - Phase 16b)

-- 8. estimatedLoad (embedded SummaryMeasurement)
estimated_load_multiplier VARCHAR(255),
estimated_load_timestamp BIGINT,
estimated_load_uom VARCHAR(50),
estimated_load_value BIGINT,
estimated_load_reading_type_ref VARCHAR(512),

-- Embedded SummaryMeasurement: nominalServiceVoltage
grounded BOOLEAN, -- 9. grounded (Phase 16a)
is_sdp BOOLEAN, -- 10. isSdp (Phase 16a)
is_virtual BOOLEAN, -- 11. isVirtual (Phase 16a)
minimal_usage_expected BOOLEAN, -- 12. minimalUsageExpected (Phase 16a)

-- 13. nominalServiceVoltage (embedded SummaryMeasurement)
nominal_voltage_multiplier VARCHAR(255),
nominal_voltage_timestamp BIGINT,
nominal_voltage_uom VARCHAR(50),
nominal_voltage_value BIGINT,
nominal_voltage_reading_type_ref VARCHAR(512),

-- Embedded SummaryMeasurement: ratedCurrent
outage_region VARCHAR(256), -- 14. outageRegion (Phase 16a)
-- 15. phaseCode (enum - Phase 16b)

-- 16. ratedCurrent (embedded SummaryMeasurement)
rated_current_multiplier VARCHAR(255),
rated_current_timestamp BIGINT,
rated_current_uom VARCHAR(50),
rated_current_value BIGINT,
rated_current_reading_type_ref VARCHAR(512),

-- Embedded SummaryMeasurement: ratedPower
-- 17. ratedPower (embedded SummaryMeasurement)
rated_power_multiplier VARCHAR(255),
rated_power_timestamp BIGINT,
rated_power_uom VARCHAR(50),
rated_power_value BIGINT,
rated_power_reading_type_ref VARCHAR(512),

read_cycle VARCHAR(256), -- 18. readCycle (Phase 16a)
read_route VARCHAR(256), -- 19. readRoute (Phase 16a)
service_delivery_remark VARCHAR(256), -- 20. serviceDeliveryRemark (Phase 16a)
service_priority VARCHAR(32), -- 21. servicePriority (Phase 16a)

-- EXTRA FIELDS (not in ESPI 4.0 XSD - to be reviewed in Phase 16b)
kind VARCHAR(50), -- NOT IN XSD (legacy field?)
uri VARCHAR(1024), -- NOT IN XSD (legacy field?)

-- Foreign key relationships
retail_customer_id BIGINT,
service_delivery_point_id BIGINT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,42 +95,62 @@ CREATE TABLE usage_points
self_link_href VARCHAR(1024),
self_link_type VARCHAR(255),

-- Usage point specific fields
kind VARCHAR(50),
status SMALLINT,
uri VARCHAR(1024),
service_category VARCHAR(50),
service_delivery_remark VARCHAR(255),
role_flags BLOB,

-- Embedded SummaryMeasurement: estimatedLoad
-- Usage point specific fields (ordered per ESPI 4.0 XSD sequence)
-- XSD sequence: roleFlags, ServiceCategory, status, serviceDeliveryPoint, amiBillingReady, checkBilling, connectionState, estimatedLoad, grounded, isSdp, isVirtual, minimalUsageExpected, nominalServiceVoltage, outageRegion, phaseCode, ratedCurrent, ratedPower, readCycle, readRoute, serviceDeliveryRemark, servicePriority

role_flags BLOB, -- 1. roleFlags
service_category VARCHAR(50), -- 2. ServiceCategory
status SMALLINT, -- 3. status
-- 4. serviceDeliveryPoint (FK handled below)
-- 5. amiBillingReady (enum - Phase 16b)
check_billing BOOLEAN, -- 6. checkBilling (Phase 16a)
-- 7. connectionState (enum - Phase 16b)

-- 8. estimatedLoad (embedded SummaryMeasurement)
estimated_load_multiplier VARCHAR(255),
estimated_load_timestamp BIGINT,
estimated_load_uom VARCHAR(50),
estimated_load_value BIGINT,
estimated_load_reading_type_ref VARCHAR(512),

-- Embedded SummaryMeasurement: nominalServiceVoltage
grounded BOOLEAN, -- 9. grounded (Phase 16a)
is_sdp BOOLEAN, -- 10. isSdp (Phase 16a)
is_virtual BOOLEAN, -- 11. isVirtual (Phase 16a)
minimal_usage_expected BOOLEAN, -- 12. minimalUsageExpected (Phase 16a)

-- 13. nominalServiceVoltage (embedded SummaryMeasurement)
nominal_voltage_multiplier VARCHAR(255),
nominal_voltage_timestamp BIGINT,
nominal_voltage_uom VARCHAR(50),
nominal_voltage_value BIGINT,
nominal_voltage_reading_type_ref VARCHAR(512),

-- Embedded SummaryMeasurement: ratedCurrent
outage_region VARCHAR(256), -- 14. outageRegion (Phase 16a)
-- 15. phaseCode (enum - Phase 16b)

-- 16. ratedCurrent (embedded SummaryMeasurement)
rated_current_multiplier VARCHAR(255),
rated_current_timestamp BIGINT,
rated_current_uom VARCHAR(50),
rated_current_value BIGINT,
rated_current_reading_type_ref VARCHAR(512),

-- Embedded SummaryMeasurement: ratedPower
-- 17. ratedPower (embedded SummaryMeasurement)
rated_power_multiplier VARCHAR(255),
rated_power_timestamp BIGINT,
rated_power_uom VARCHAR(50),
rated_power_value BIGINT,
rated_power_reading_type_ref VARCHAR(512),

read_cycle VARCHAR(256), -- 18. readCycle (Phase 16a)
read_route VARCHAR(256), -- 19. readRoute (Phase 16a)
service_delivery_remark VARCHAR(256), -- 20. serviceDeliveryRemark (Phase 16a)
service_priority VARCHAR(32), -- 21. servicePriority (Phase 16a)

-- EXTRA FIELDS (not in ESPI 4.0 XSD - to be reviewed in Phase 16b)
kind VARCHAR(50), -- NOT IN XSD (legacy field?)
uri VARCHAR(1024), -- NOT IN XSD (legacy field?)

-- Foreign key relationships
retail_customer_id BIGINT,
service_delivery_point_id BIGINT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,42 +96,62 @@ CREATE TABLE usage_points
self_link_href VARCHAR(1024),
self_link_type VARCHAR(255),

-- Usage point specific fields
kind VARCHAR(50),
status SMALLINT,
uri VARCHAR(1024),
service_category VARCHAR(50),
service_delivery_remark VARCHAR(255),
role_flags BYTEA,

-- Embedded SummaryMeasurement: estimatedLoad
-- Usage point specific fields (ordered per ESPI 4.0 XSD sequence)
-- XSD sequence: roleFlags, ServiceCategory, status, serviceDeliveryPoint, amiBillingReady, checkBilling, connectionState, estimatedLoad, grounded, isSdp, isVirtual, minimalUsageExpected, nominalServiceVoltage, outageRegion, phaseCode, ratedCurrent, ratedPower, readCycle, readRoute, serviceDeliveryRemark, servicePriority

role_flags BYTEA, -- 1. roleFlags
service_category VARCHAR(50), -- 2. ServiceCategory
status SMALLINT, -- 3. status
-- 4. serviceDeliveryPoint (FK handled below)
-- 5. amiBillingReady (enum - Phase 16b)
check_billing BOOLEAN, -- 6. checkBilling (Phase 16a)
-- 7. connectionState (enum - Phase 16b)

-- 8. estimatedLoad (embedded SummaryMeasurement)
estimated_load_multiplier VARCHAR(255),
estimated_load_timestamp BIGINT,
estimated_load_uom VARCHAR(50),
estimated_load_value BIGINT,
estimated_load_reading_type_ref VARCHAR(512),

-- Embedded SummaryMeasurement: nominalServiceVoltage
grounded BOOLEAN, -- 9. grounded (Phase 16a)
is_sdp BOOLEAN, -- 10. isSdp (Phase 16a)
is_virtual BOOLEAN, -- 11. isVirtual (Phase 16a)
minimal_usage_expected BOOLEAN, -- 12. minimalUsageExpected (Phase 16a)

-- 13. nominalServiceVoltage (embedded SummaryMeasurement)
nominal_voltage_multiplier VARCHAR(255),
nominal_voltage_timestamp BIGINT,
nominal_voltage_uom VARCHAR(50),
nominal_voltage_value BIGINT,
nominal_voltage_reading_type_ref VARCHAR(512),

-- Embedded SummaryMeasurement: ratedCurrent
outage_region VARCHAR(256), -- 14. outageRegion (Phase 16a)
-- 15. phaseCode (enum - Phase 16b)

-- 16. ratedCurrent (embedded SummaryMeasurement)
rated_current_multiplier VARCHAR(255),
rated_current_timestamp BIGINT,
rated_current_uom VARCHAR(50),
rated_current_value BIGINT,
rated_current_reading_type_ref VARCHAR(512),

-- Embedded SummaryMeasurement: ratedPower
-- 17. ratedPower (embedded SummaryMeasurement)
rated_power_multiplier VARCHAR(255),
rated_power_timestamp BIGINT,
rated_power_uom VARCHAR(50),
rated_power_value BIGINT,
rated_power_reading_type_ref VARCHAR(512),

read_cycle VARCHAR(256), -- 18. readCycle (Phase 16a)
read_route VARCHAR(256), -- 19. readRoute (Phase 16a)
service_delivery_remark VARCHAR(256), -- 20. serviceDeliveryRemark (Phase 16a)
service_priority VARCHAR(32), -- 21. servicePriority (Phase 16a)

-- EXTRA FIELDS (not in ESPI 4.0 XSD - to be reviewed in Phase 16b)
kind VARCHAR(50), -- NOT IN XSD (legacy field?)
uri VARCHAR(1024), -- NOT IN XSD (legacy field?)

-- Foreign key relationships
retail_customer_id BIGINT,
service_delivery_point_id BIGINT,
Expand Down
Loading
Loading