org.openestate.io.openimmo.xml.BreitbandZugang Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of OpenEstate-IO-OpenImmo Show documentation
Show all versions of OpenEstate-IO-OpenImmo Show documentation
OpenEstate-IO-OpenImmo is a Java library to read and write real estate data in the OpenImmo format.
package org.openestate.io.openimmo.xml;
import java.math.BigDecimal;
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.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
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.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Java class for <breitband_zugang> element.
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "breitband_zugang")
public class BreitbandZugang implements Cloneable, CopyTo2, Equals2, ToString2
{
@XmlAttribute(name = "art")
protected String art;
@XmlAttribute(name = "speed")
@XmlJavaTypeAdapter(Adapter2 .class)
@XmlSchemaType(name = "decimal")
protected BigDecimal speed;
/**
* Gets the value of the art property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getArt() {
return art;
}
/**
* Sets the value of the art property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArt(String value) {
this.art = value;
}
/**
* Gets the value of the speed property.
*
* @return
* possible object is
* {@link String }
*
*/
public BigDecimal getSpeed() {
return speed;
}
/**
* Sets the value of the speed property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSpeed(BigDecimal value) {
this.speed = value;
}
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
{
String theArt;
theArt = this.getArt();
strategy.appendField(locator, this, "art", buffer, theArt, (this.art!= null));
}
{
BigDecimal theSpeed;
theSpeed = this.getSpeed();
strategy.appendField(locator, this, "speed", buffer, theSpeed, (this.speed!= null));
}
return buffer;
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof BreitbandZugang) {
final BreitbandZugang copy = ((BreitbandZugang) draftCopy);
{
Boolean artShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.art!= null));
if (artShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceArt;
sourceArt = this.getArt();
String copyArt = ((String) strategy.copy(LocatorUtils.property(locator, "art", sourceArt), sourceArt, (this.art!= null)));
copy.setArt(copyArt);
} else {
if (artShouldBeCopiedAndSet == Boolean.FALSE) {
copy.art = null;
}
}
}
{
Boolean speedShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.speed!= null));
if (speedShouldBeCopiedAndSet == Boolean.TRUE) {
BigDecimal sourceSpeed;
sourceSpeed = this.getSpeed();
BigDecimal copySpeed = ((BigDecimal) strategy.copy(LocatorUtils.property(locator, "speed", sourceSpeed), sourceSpeed, (this.speed!= null)));
copy.setSpeed(copySpeed);
} else {
if (speedShouldBeCopiedAndSet == Boolean.FALSE) {
copy.speed = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new BreitbandZugang();
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final BreitbandZugang that = ((BreitbandZugang) object);
{
String lhsArt;
lhsArt = this.getArt();
String rhsArt;
rhsArt = that.getArt();
if (!strategy.equals(LocatorUtils.property(thisLocator, "art", lhsArt), LocatorUtils.property(thatLocator, "art", rhsArt), lhsArt, rhsArt, (this.art!= null), (that.art!= null))) {
return false;
}
}
{
BigDecimal lhsSpeed;
lhsSpeed = this.getSpeed();
BigDecimal rhsSpeed;
rhsSpeed = that.getSpeed();
if (!strategy.equals(LocatorUtils.property(thisLocator, "speed", lhsSpeed), LocatorUtils.property(thatLocator, "speed", rhsSpeed), lhsSpeed, rhsSpeed, (this.speed!= null), (that.speed!= null))) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy