un.unece.uncefact.data.specification.corecomponenttypeschemamodule._2.QuantityType Maven / Gradle / Ivy
package un.unece.uncefact.data.specification.corecomponenttypeschemamodule._2;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import com.phloc.commons.equals.EqualsUtils;
import com.phloc.commons.hash.HashCodeGenerator;
import com.phloc.commons.string.ToStringGenerator;
/**
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:UniqueID xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">UNDT000018</ccts:UniqueID>
*
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:CategoryCode xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">CCT</ccts:CategoryCode>
*
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:DictionaryEntryName xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">Quantity. Type</ccts:DictionaryEntryName>
*
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:VersionID xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">1.0</ccts:VersionID>
*
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:Definition xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">A counted number of non-monetary units possibly including fractions.</ccts:Definition>
*
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:RepresentationTermName xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">Quantity</ccts:RepresentationTermName>
*
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:PrimitiveType xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">decimal</ccts:PrimitiveType>
*
*
*
* Java class for QuantityType complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="QuantityType">
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>decimal">
* <attribute name="unitCode" type="{http://www.w3.org/2001/XMLSchema}normalizedString" />
* <attribute name="unitCodeListID" type="{http://www.w3.org/2001/XMLSchema}normalizedString" />
* <attribute name="unitCodeListAgencyID" type="{http://www.w3.org/2001/XMLSchema}normalizedString" />
* <attribute name="unitCodeListAgencyName" type="{http://www.w3.org/2001/XMLSchema}string" />
* </extension>
* </simpleContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "QuantityType", propOrder = {
"value"
})
public class QuantityType implements Serializable
{
@XmlValue
private BigDecimal value;
@XmlAttribute(name = "unitCode")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
private String unitCode;
@XmlAttribute(name = "unitCodeListID")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
private String unitCodeListID;
@XmlAttribute(name = "unitCodeListAgencyID")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
private String unitCodeListAgencyID;
@XmlAttribute(name = "unitCodeListAgencyName")
private String unitCodeListAgencyName;
/**
* Default constructor
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
*/
public QuantityType() {
}
/**
* Constructor for value of type BigDecimal
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
* @param valueParam
* The value to be set. May be null
.
*/
public QuantityType(
@Nullable
final BigDecimal valueParam) {
setValue(valueParam);
}
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link BigDecimal }
*
*/
@Nullable
public BigDecimal getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setValue(
@Nullable
BigDecimal valueParam) {
this.value = valueParam;
}
/**
* Gets the value of the unitCode property.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getUnitCode() {
return unitCode;
}
/**
* Sets the value of the unitCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUnitCode(
@Nullable
String valueParam) {
this.unitCode = valueParam;
}
/**
* Gets the value of the unitCodeListID property.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getUnitCodeListID() {
return unitCodeListID;
}
/**
* Sets the value of the unitCodeListID property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUnitCodeListID(
@Nullable
String valueParam) {
this.unitCodeListID = valueParam;
}
/**
* Gets the value of the unitCodeListAgencyID property.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getUnitCodeListAgencyID() {
return unitCodeListAgencyID;
}
/**
* Sets the value of the unitCodeListAgencyID property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUnitCodeListAgencyID(
@Nullable
String valueParam) {
this.unitCodeListAgencyID = valueParam;
}
/**
* Gets the value of the unitCodeListAgencyName property.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getUnitCodeListAgencyName() {
return unitCodeListAgencyName;
}
/**
* Sets the value of the unitCodeListAgencyName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUnitCodeListAgencyName(
@Nullable
String valueParam) {
this.unitCodeListAgencyName = valueParam;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-equalshashcode
*
*/
@Override
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if ((o == null)||(!getClass().equals(o.getClass()))) {
return false;
}
final QuantityType rhs = ((QuantityType) o);
if (!EqualsUtils.equals(value, rhs.value)) {
return false;
}
if (!EqualsUtils.equals(unitCode, rhs.unitCode)) {
return false;
}
if (!EqualsUtils.equals(unitCodeListID, rhs.unitCodeListID)) {
return false;
}
if (!EqualsUtils.equals(unitCodeListAgencyID, rhs.unitCodeListAgencyID)) {
return false;
}
if (!EqualsUtils.equals(unitCodeListAgencyName, rhs.unitCodeListAgencyName)) {
return false;
}
return true;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-equalshashcode
*
*/
@Override
public int hashCode() {
return new HashCodeGenerator(this).append(value).append(unitCode).append(unitCodeListID).append(unitCodeListAgencyID).append(unitCodeListAgencyName).getHashCode();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-tostring
*
*/
@Override
public String toString() {
return new ToStringGenerator(this).append("value", value).append("unitCode", unitCode).append("unitCodeListID", unitCodeListID).append("unitCodeListAgencyID", unitCodeListAgencyID).append("unitCodeListAgencyName", unitCodeListAgencyName).toString();
}
}