/* * Copyright 2013, 2014, 2015 EnergyOS.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2013.08.27 at 01:43:57 PM EDT // package org.energyos.espi.common.domain; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.persistence.UniqueConstraint; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.energyos.espi.common.models.atom.adapters.ElectricPowerQualitySummaryAdapter; /** * A summary of power quality events. This information represents a summary of power quality information typically required by customer facility energy management systems. It is not intended to satisfy the detailed requirements of power quality monitoring. All values are as defined by measurementProtocol during the period. The standards typically also give ranges of allowed values; the information attributes are the raw measurements, not the "yes/no" determination by the various standards. See referenced standards for definition, measurement protocol and period. * <p/> * <p>Java class for ElectricPowerQualitySummary complex type. * <p/> * <p>The following schema fragment specifies the expected content contained within this class. * <p/> * <pre> * <complexType name="ElectricPowerQualitySummary"> * <complexContent> * <extension base="{http://naesb.org/espi}IdentifiedObject"> * <sequence> * <element name="flickerPlt" type="{http://naesb.org/espi}Int48" minOccurs="0"/> * <element name="flickerPst" type="{http://naesb.org/espi}Int48" minOccurs="0"/> * <element name="harmonicVoltage" type="{http://naesb.org/espi}Int48" minOccurs="0"/> * <element name="longInterruptions" type="{http://naesb.org/espi}Int48" minOccurs="0"/> * <element name="mainsVoltage" type="{http://naesb.org/espi}Int48" minOccurs="0"/> * <element name="measurementProtocol" type="{http://naesb.org/espi}UInt8" minOccurs="0"/> * <element name="powerFrequency" type="{http://naesb.org/espi}Int48" minOccurs="0"/> * <element name="rapidVoltageChanges" type="{http://naesb.org/espi}Int48" minOccurs="0"/> * <element name="shortInterruptions" type="{http://naesb.org/espi}Int48" minOccurs="0"/> * <element name="summaryInterval" type="{http://naesb.org/espi}DateTimeInterval"/> * <element name="supplyVoltageDips" type="{http://naesb.org/espi}Int48" minOccurs="0"/> * <element name="supplyVoltageImbalance" type="{http://naesb.org/espi}Int48" minOccurs="0"/> * <element name="supplyVoltageVariations" type="{http://naesb.org/espi}Int48" minOccurs="0"/> * <element name="tempOvervoltage" type="{http://naesb.org/espi}Int48" minOccurs="0"/> * </sequence> * </extension> * </complexContent> * </complexType> * </pre> */ @SuppressWarnings("serial") @XmlRootElement(name="ElectricPowerQualitySummary") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ElectricPowerQualitySummary", propOrder = { "flickerPlt", "flickerPst", "harmonicVoltage", "longInterruptions", "mainsVoltage", "measurementProtocol", "powerFrequency", "rapidVoltageChanges", "shortInterruptions", "summaryInterval", "supplyVoltageDips", "supplyVoltageImbalance", "supplyVoltageVariations", "tempOvervoltage" }) @Entity @Table(name = "electric_power_quality_summaries", uniqueConstraints = {@UniqueConstraint(columnNames={"uuid"})}) @XmlJavaTypeAdapter(ElectricPowerQualitySummaryAdapter.class) @NamedQueries(value = { @NamedQuery(name = ElectricPowerQualitySummary.QUERY_FIND_BY_ID, query = "SELECT summary FROM ElectricPowerQualitySummary summary WHERE summary.id = :id"), @NamedQuery(name = ElectricPowerQualitySummary.QUERY_FIND_BY_UUID, query = "SELECT summary FROM ElectricPowerQualitySummary summary WHERE summary.uuid = :uuid"), @NamedQuery(name = ElectricPowerQualitySummary.QUERY_FIND_ALL_IDS_BY_USAGE_POINT_ID, query = "SELECT summary.id FROM ElectricPowerQualitySummary summary WHERE summary.usagePoint.id = :usagePointId"), @NamedQuery(name = ElectricPowerQualitySummary.QUERY_FIND_ALL_IDS, query = "SELECT electricPowerQualitySummary.id FROM ElectricPowerQualitySummary electricPowerQualitySummary"), @NamedQuery(name = ElectricPowerQualitySummary.QUERY_FIND_ALL_IDS_BY_XPATH_2, query = "SELECT e.id FROM UsagePoint u, ElectricPowerQualitySummary e WHERE u.retailCustomer.id = :o1Id AND e.usagePoint.id = :o2Id"), @NamedQuery(name = ElectricPowerQualitySummary.QUERY_FIND_ID_BY_XPATH, query = "SELECT e.id FROM UsagePoint u, ElectricPowerQualitySummary e WHERE u.retailCustomer.id = :o1Id AND e.usagePoint.id = :o2Id AND e.id = :o3Id") }) public class ElectricPowerQualitySummary extends IdentifiedObject { public static final String QUERY_FIND_BY_ID = "ElectricPowerQualitySummary.findById"; public static final String QUERY_FIND_BY_UUID = "ElectricPowerQualitySummary.findByUUID"; public static final String QUERY_FIND_ALL_IDS_BY_USAGE_POINT_ID = "ElectricPowerQualitySummary.findAllIdsByUsagePointId"; public static final String QUERY_FIND_ALL_IDS = "ElectricPowerQualitySummary.findAllIds"; public static final String QUERY_FIND_ALL_IDS_BY_XPATH_2 = "ElectricPowerQualitySummary.findAllIdsByXpath2"; public static final String QUERY_FIND_ID_BY_XPATH = "ElectricPowerQualitySummary.findIdByXpath"; protected Long flickerPlt; protected Long flickerPst; protected Long harmonicVoltage; protected Long longInterruptions; protected Long mainsVoltage; protected Short measurementProtocol; protected Long powerFrequency; protected Long rapidVoltageChanges; protected Long shortInterruptions; @XmlElement(required = true) protected DateTimeInterval summaryInterval; protected Long supplyVoltageDips; protected Long supplyVoltageImbalance; protected Long supplyVoltageVariations; protected Long tempOvervoltage; @XmlTransient @ManyToOne @JoinColumn(name = "usage_point_id") private UsagePoint usagePoint; /** * Gets the value of the flickerPlt property. * * @return possible object is * {@link Long } */ public Long getFlickerPlt() { return flickerPlt; } /** * Sets the value of the flickerPlt property. * * @param value allowed object is * {@link Long } */ public void setFlickerPlt(Long value) { this.flickerPlt = value; } /** * Gets the value of the flickerPst property. * * @return * possible object is * {@link Long } * */ public Long getFlickerPst() { return flickerPst; } /** * Sets the value of the flickerPst property. * * @param value * allowed object is * {@link Long } * */ public void setFlickerPst(Long value) { this.flickerPst = value; } /** * Gets the value of the harmonicVoltage property. * * @return * possible object is * {@link Long } * */ public Long getHarmonicVoltage() { return harmonicVoltage; } /** * Sets the value of the harmonicVoltage property. * * @param value * allowed object is * {@link Long } * */ public void setHarmonicVoltage(Long value) { this.harmonicVoltage = value; } /** * Gets the value of the longInterruptions property. * * @return * possible object is * {@link Long } * */ public Long getLongInterruptions() { return longInterruptions; } /** * Sets the value of the longInterruptions property. * * @param value * allowed object is * {@link Long } * */ public void setLongInterruptions(Long value) { this.longInterruptions = value; } /** * Gets the value of the mainsVoltage property. * * @return * possible object is * {@link Long } * */ public Long getMainsVoltage() { return mainsVoltage; } /** * Sets the value of the mainsVoltage property. * * @param value * allowed object is * {@link Long } * */ public void setMainsVoltage(Long value) { this.mainsVoltage = value; } /** * Gets the value of the measurementProtocol property. * * @return * possible object is * {@link Short } * */ public Short getMeasurementProtocol() { return measurementProtocol; } /** * Sets the value of the measurementProtocol property. * * @param value * allowed object is * {@link Short } * */ public void setMeasurementProtocol(Short value) { this.measurementProtocol = value; } /** * Gets the value of the powerFrequency property. * * @return * possible object is * {@link Long } * */ public Long getPowerFrequency() { return powerFrequency; } /** * Sets the value of the powerFrequency property. * * @param value * allowed object is * {@link Long } * */ public void setPowerFrequency(Long value) { this.powerFrequency = value; } /** * Gets the value of the rapidVoltageChanges property. * * @return * possible object is * {@link Long } * */ public Long getRapidVoltageChanges() { return rapidVoltageChanges; } /** * Sets the value of the rapidVoltageChanges property. * * @param value * allowed object is * {@link Long } * */ public void setRapidVoltageChanges(Long value) { this.rapidVoltageChanges = value; } /** * Gets the value of the shortInterruptions property. * * @return * possible object is * {@link Long } * */ public Long getShortInterruptions() { return shortInterruptions; } /** * Sets the value of the shortInterruptions property. * * @param value * allowed object is * {@link Long } * */ public void setShortInterruptions(Long value) { this.shortInterruptions = value; } /** * Gets the value of the summaryInterval property. * * @return * possible object is * {@link DateTimeInterval } * */ public DateTimeInterval getSummaryInterval() { return summaryInterval; } /** * Sets the value of the summaryInterval property. * * @param value * allowed object is * {@link DateTimeInterval } * */ public void setSummaryInterval(DateTimeInterval value) { this.summaryInterval = value; } /** * Gets the value of the supplyVoltageDips property. * * @return * possible object is * {@link Long } * */ public Long getSupplyVoltageDips() { return supplyVoltageDips; } /** * Sets the value of the supplyVoltageDips property. * * @param value * allowed object is * {@link Long } * */ public void setSupplyVoltageDips(Long value) { this.supplyVoltageDips = value; } /** * Gets the value of the supplyVoltageImbalance property. * * @return * possible object is * {@link Long } * */ public Long getSupplyVoltageImbalance() { return supplyVoltageImbalance; } /** * Sets the value of the supplyVoltageImbalance property. * * @param value * allowed object is * {@link Long } * */ public void setSupplyVoltageImbalance(Long value) { this.supplyVoltageImbalance = value; } /** * Gets the value of the supplyVoltageVariations property. * * @return * possible object is * {@link Long } * */ public Long getSupplyVoltageVariations() { return supplyVoltageVariations; } /** * Sets the value of the supplyVoltageVariations property. * * @param value * allowed object is * {@link Long } * */ public void setSupplyVoltageVariations(Long value) { this.supplyVoltageVariations = value; } /** * Gets the value of the tempOvervoltage property. * * @return * possible object is * {@link Long } * */ public Long getTempOvervoltage() { return tempOvervoltage; } /** * Sets the value of the tempOvervoltage property. * * @param value * allowed object is * {@link Long } * */ public void setTempOvervoltage(Long value) { this.tempOvervoltage = value; } public UsagePoint getUsagePoint() { return usagePoint; } public void setUsagePoint(UsagePoint usagePoint) { this.usagePoint = usagePoint; } @Override public String getParentQuery() { return UsagePoint.QUERY_FIND_BY_RELATED_HREF; } @Override public void setUpResource(IdentifiedObject resource) { UsagePoint usagePoint = (UsagePoint) resource; usagePoint.addElectricPowerQualitySummary(this); setUsagePoint(usagePoint); } @Override public void merge(IdentifiedObject resource) { super.merge(resource); this.flickerPlt = ((ElectricPowerQualitySummary)resource).flickerPlt; this.flickerPst = ((ElectricPowerQualitySummary)resource).flickerPst; this.harmonicVoltage = ((ElectricPowerQualitySummary)resource).harmonicVoltage; this.longInterruptions = ((ElectricPowerQualitySummary)resource).longInterruptions; this.mainsVoltage = ((ElectricPowerQualitySummary)resource).mainsVoltage; this.measurementProtocol = ((ElectricPowerQualitySummary)resource).measurementProtocol; this.powerFrequency = ((ElectricPowerQualitySummary)resource).powerFrequency; this.rapidVoltageChanges = ((ElectricPowerQualitySummary)resource).rapidVoltageChanges; this.shortInterruptions = ((ElectricPowerQualitySummary)resource).shortInterruptions; this.summaryInterval = ((ElectricPowerQualitySummary)resource).summaryInterval; this.supplyVoltageDips = ((ElectricPowerQualitySummary)resource).supplyVoltageDips; this.supplyVoltageVariations = ((ElectricPowerQualitySummary)resource).supplyVoltageVariations; this.supplyVoltageImbalance = ((ElectricPowerQualitySummary)resource).supplyVoltageImbalance; this.tempOvervoltage = ((ElectricPowerQualitySummary)resource).tempOvervoltage; if (((ElectricPowerQualitySummary)resource).usagePoint != null) { this.usagePoint = ((ElectricPowerQualitySummary)resource).usagePoint; } } @Override public void unlink() { super.unlink(); usagePoint.removeElectricPowerQualitySummary(this); this.usagePoint = null; } }