package org.jooq.meta.jaxb;

import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.jooq.util.jaxb.tools.StringAdapter;
import org.jooq.util.jaxb.tools.XMLAppendable;
import org.jooq.util.jaxb.tools.XMLBuilder;


Java class for EnumType complex type.

The following schema fragment specifies the expected content contained within this class.

<complexType name="EnumType">
  <complexContent>
    <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
      <all>
        <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
        <element name="literals" type="{http://www.w3.org/2001/XMLSchema}string"/>
      </all>
    </restriction>
  </complexContent>
</complexType>
/** * <p>Java class for EnumType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="EnumType"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;all&gt; * &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; * &lt;element name="literals" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; * &lt;/all&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "EnumType", propOrder = { }) @SuppressWarnings({ "all" }) public class EnumType implements Serializable, XMLAppendable { private final static long serialVersionUID = 31400L; @XmlElement(required = true) @XmlJavaTypeAdapter(StringAdapter.class) protected String name; @XmlElement(required = true) @XmlJavaTypeAdapter(StringAdapter.class) protected String literals; public String getName() { return name; } public void setName(String value) { this.name = value; } public String getLiterals() { return literals; } public void setLiterals(String value) { this.literals = value; } public EnumType withName(String value) { setName(value); return this; } public EnumType withLiterals(String value) { setLiterals(value); return this; } @Override public final void appendTo(XMLBuilder builder) { builder.append("name", name); builder.append("literals", literals); } @Override public String toString() { XMLBuilder builder = XMLBuilder.nonFormatting(); appendTo(builder); return builder.toString(); } @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass()!= that.getClass()) { return false; } EnumType other = ((EnumType) that); if (name == null) { if (other.name!= null) { return false; } } else { if (!name.equals(other.name)) { return false; } } if (literals == null) { if (other.literals!= null) { return false; } } else { if (!literals.equals(other.literals)) { return false; } } return true; } @Override public int hashCode() { final int prime = 31; int result = 1; result = ((prime*result)+((name == null)? 0 :name.hashCode())); result = ((prime*result)+((literals == null)? 0 :literals.hashCode())); return result; } }