
org.openestate.io.trovit.xml.FloorArea Maven / Gradle / Ivy
package org.openestate.io.trovit.xml;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.jvnet.jaxb2_commons.lang.CopyStrategy;
import org.jvnet.jaxb2_commons.lang.CopyTo;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
import org.openestate.io.trovit.xml.types.Unit;
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <simpleContent>
* <extension base="<>typeInt">
* <attribute name="unit" type="{}typeUnit" />
* </extension>
* </simpleContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"value"
})
@XmlRootElement(name = "floor_area")
public class FloorArea
implements Cloneable, CopyTo, Equals, ToString
{
@XmlValue
@XmlJavaTypeAdapter(Adapter8 .class)
protected BigInteger value;
@XmlAttribute(name = "unit")
@XmlJavaTypeAdapter(Adapter9 .class)
protected Unit unit;
/**
* Integer positive or empty value
*
* @return
* possible object is
* {@link String }
*
*/
public BigInteger getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(BigInteger value) {
this.value = value;
}
/**
* Gets the value of the unit property.
*
* @return
* possible object is
* {@link String }
*
*/
public Unit getUnit() {
return unit;
}
/**
* Sets the value of the unit property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUnit(Unit value) {
this.unit = value;
}
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
BigInteger theValue;
theValue = this.getValue();
strategy.appendField(locator, this, "value", buffer, theValue);
}
{
Unit theUnit;
theUnit = this.getUnit();
strategy.appendField(locator, this, "unit", buffer, theUnit);
}
return buffer;
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof FloorArea) {
final FloorArea copy = ((FloorArea) draftCopy);
if (this.value!= null) {
BigInteger sourceValue;
sourceValue = this.getValue();
BigInteger copyValue = ((BigInteger) strategy.copy(LocatorUtils.property(locator, "value", sourceValue), sourceValue));
copy.setValue(copyValue);
} else {
copy.value = null;
}
if (this.unit!= null) {
Unit sourceUnit;
sourceUnit = this.getUnit();
Unit copyUnit = ((Unit) strategy.copy(LocatorUtils.property(locator, "unit", sourceUnit), sourceUnit));
copy.setUnit(copyUnit);
} else {
copy.unit = null;
}
}
return draftCopy;
}
public Object createNewInstance() {
return new FloorArea();
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final FloorArea that = ((FloorArea) object);
{
BigInteger lhsValue;
lhsValue = this.getValue();
BigInteger rhsValue;
rhsValue = that.getValue();
if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) {
return false;
}
}
{
Unit lhsUnit;
lhsUnit = this.getUnit();
Unit rhsUnit;
rhsUnit = that.getUnit();
if (!strategy.equals(LocatorUtils.property(thisLocator, "unit", lhsUnit), LocatorUtils.property(thatLocator, "unit", rhsUnit), lhsUnit, rhsUnit)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy