Add AddrObj to domain

apache_commons_compress
Terekhin Alexander 5 years ago
parent 1e8b779a0f
commit 5ea6934925
  1. 603
      src/main/java/me/bearns/fias/domain/AddressObjects.java
  2. 270
      src/main/java/me/bearns/fias/domain/Addrobj.java
  3. 12
      src/main/java/me/bearns/fias/repository/AddrobjRepository.java
  4. 12
      src/main/java/me/bearns/fias/util/Catalog.java

@ -0,0 +1,603 @@
package me.bearns.fias.domain;
import javax.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="Object" maxOccurs="unbounded">
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;attribute name="AOGUID" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="36"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="FORMALNAME" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;minLength value="1"/>
* &lt;maxLength value="120"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="REGIONCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="2"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="AUTOCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="1"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="AREACODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="3"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="CITYCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="3"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="CTARCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="3"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="PLACECODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="3"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="PLANCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="STREETCODE">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="EXTRCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="SEXTCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="3"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="OFFNAME">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;minLength value="1"/>
* &lt;maxLength value="120"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="POSTALCODE">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="6"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="IFNSFL">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="TERRIFNSFL">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="IFNSUL">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="TERRIFNSUL">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="OKATO">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="11"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="OKTMO">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;minLength value="8"/>
* &lt;maxLength value="11"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="UPDATEDATE" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
* &lt;attribute name="SHORTNAME" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;minLength value="1"/>
* &lt;maxLength value="10"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="AOLEVEL" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}integer">
* &lt;totalDigits value="10"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="PARENTGUID">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="36"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="AOID" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="36"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="PREVID">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="36"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="NEXTID">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="36"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="CODE">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;minLength value="0"/>
* &lt;maxLength value="17"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="PLAINCODE">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;minLength value="0"/>
* &lt;maxLength value="15"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="ACTSTATUS" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}integer">
* &lt;totalDigits value="10"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="CENTSTATUS" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}integer">
* &lt;totalDigits value="10"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="OPERSTATUS" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}integer">
* &lt;totalDigits value="10"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="CURRSTATUS" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}integer">
* &lt;totalDigits value="10"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="STARTDATE" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
* &lt;attribute name="ENDDATE" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
* &lt;attribute name="NORMDOC">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="36"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="LIVESTATUS" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}byte">
* &lt;enumeration value="0"/>
* &lt;enumeration value="1"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="DIVTYPE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}int">
* &lt;enumeration value="0"/>
* &lt;enumeration value="1"/>
* &lt;enumeration value="2"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* &lt;/element>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"object"
})
@XmlRootElement(name = "AddressObjects")
public class AddressObjects {
@XmlElement(name = "Object", required = true)
protected List<Addrobj> object;
/**
* Gets the value of the object property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the object property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getObject().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Addrobj }
*
*
*/
public List<Addrobj> getObject() {
if (object == null) {
object = new ArrayList<Addrobj>();
}
return this.object;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;attribute name="AOGUID" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="36"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="FORMALNAME" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;minLength value="1"/>
* &lt;maxLength value="120"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="REGIONCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="2"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="AUTOCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="1"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="AREACODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="3"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="CITYCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="3"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="CTARCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="3"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="PLACECODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="3"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="PLANCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="STREETCODE">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="EXTRCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="SEXTCODE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="3"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="OFFNAME">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;minLength value="1"/>
* &lt;maxLength value="120"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="POSTALCODE">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="6"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="IFNSFL">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="TERRIFNSFL">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="IFNSUL">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="TERRIFNSUL">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="4"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="OKATO">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="11"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="OKTMO">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;minLength value="8"/>
* &lt;maxLength value="11"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="UPDATEDATE" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
* &lt;attribute name="SHORTNAME" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;minLength value="1"/>
* &lt;maxLength value="10"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="AOLEVEL" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}integer">
* &lt;totalDigits value="10"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="PARENTGUID">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="36"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="AOID" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="36"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="PREVID">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="36"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="NEXTID">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="36"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="CODE">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;minLength value="0"/>
* &lt;maxLength value="17"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="PLAINCODE">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;minLength value="0"/>
* &lt;maxLength value="15"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="ACTSTATUS" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}integer">
* &lt;totalDigits value="10"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="CENTSTATUS" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}integer">
* &lt;totalDigits value="10"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="OPERSTATUS" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}integer">
* &lt;totalDigits value="10"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="CURRSTATUS" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}integer">
* &lt;totalDigits value="10"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="STARTDATE" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
* &lt;attribute name="ENDDATE" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
* &lt;attribute name="NORMDOC">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;length value="36"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="LIVESTATUS" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}byte">
* &lt;enumeration value="0"/>
* &lt;enumeration value="1"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;attribute name="DIVTYPE" use="required">
* &lt;simpleType>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}int">
* &lt;enumeration value="0"/>
* &lt;enumeration value="1"/>
* &lt;enumeration value="2"/>
* &lt;/restriction>
* &lt;/simpleType>
* &lt;/attribute>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
}

@ -0,0 +1,270 @@
package me.bearns.fias.domain;
import javax.persistence.*;
import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Objects;
import java.util.UUID;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@Entity
@Table(name = "addrobj")
public class Addrobj implements Serializable {
private static final long serialVersionUID = 1L;
private static DatatypeFactory dtf;
static {
try {
dtf = DatatypeFactory.newInstance();
} catch (DatatypeConfigurationException e) {
e.printStackTrace();
}
}
@Id
//@Type(type="uuid-char")
@Column(name = "aoid")
@XmlAttribute(name = "AOID", required = true)
public UUID aoid;
//@Type(type="uuid-char")
@Column(name = "aoguid")
@XmlAttribute(name = "AOGUID", required = true)
public UUID aoguid;
@XmlAttribute(name = "FORMALNAME", required = true)
protected String formalname;
@XmlAttribute(name = "REGIONCODE", required = true)
public String regioncode;
@XmlAttribute(name = "AUTOCODE", required = true)
protected String autocode;
@XmlAttribute(name = "AREACODE", required = true)
protected String areacode;
@XmlAttribute(name = "CITYCODE", required = true)
protected String citycode;
@XmlAttribute(name = "CTARCODE", required = true)
protected String ctarcode;
@XmlAttribute(name = "PLACECODE", required = true)
protected String placecode;
@XmlAttribute(name = "PLANCODE", required = true)
protected String plancode;
@XmlAttribute(name = "STREETCODE")
protected String streetcode;
@XmlAttribute(name = "EXTRCODE", required = true)
protected String extrcode;
@XmlAttribute(name = "SEXTCODE", required = true)
protected String sextcode;
@XmlAttribute(name = "OFFNAME")
protected String offname;
@XmlAttribute(name = "POSTALCODE")
protected String postalcode;
@XmlAttribute(name = "IFNSFL")
protected String ifnsfl;
@XmlAttribute(name = "TERRIFNSFL")
protected String terrifnsfl;
@XmlAttribute(name = "IFNSUL")
protected String ifnsul;
@XmlAttribute(name = "TERRIFNSUL")
protected String terrifnsul;
@XmlAttribute(name = "OKATO")
protected String okato;
@XmlAttribute(name = "OKTMO")
protected String oktmo;
@XmlAttribute(name = "UPDATEDATE", required = true)
@XmlSchemaType(name = "date")
protected XMLGregorianCalendar updatedate;
@XmlAttribute(name = "SHORTNAME", required = true)
protected String shortname;
@XmlAttribute(name = "AOLEVEL", required = true)
protected BigInteger aolevel;
//@Type(type="uuid-char")
@Column(name = "parentguid")
@XmlAttribute(name = "PARENTGUID")
protected UUID parentguid;
//@Type(type="uuid-char")
@XmlAttribute(name = "PREVID")
protected UUID previd;
//@Type(type="uuid-char")
@XmlAttribute(name = "NEXTID")
protected UUID nextid;
@XmlAttribute(name = "CODE")
protected String code;
@XmlAttribute(name = "PLAINCODE")
protected String plaincode;
@XmlAttribute(name = "ACTSTATUS", required = true)
@Column(name = "actstatus")
protected BigInteger actstatus;
@XmlAttribute(name = "CENTSTATUS", required = true)
protected BigInteger centstatus;
@XmlAttribute(name = "OPERSTATUS", required = true)
protected BigInteger operstatus;
@XmlAttribute(name = "CURRSTATUS", required = true)
protected BigInteger currstatus;
@XmlAttribute(name = "STARTDATE", required = true)
@XmlSchemaType(name = "date")
protected XMLGregorianCalendar startdate;
@XmlAttribute(name = "ENDDATE", required = true)
@XmlSchemaType(name = "date")
protected XMLGregorianCalendar enddate;
@XmlAttribute(name = "NORMDOC")
protected String normdoc;
@XmlAttribute(name = "LIVESTATUS", required = true)
protected byte livestatus;
@XmlAttribute(name = "DIVTYPE", required = true)
protected int divtype;
@Column(name = "enddate")
@Access(AccessType.PROPERTY)
public Calendar getEnddate() {
return enddate != null ? enddate.toGregorianCalendar() : null;
}
@Column(name = "startdate")
@Access(AccessType.PROPERTY)
public Calendar getStartdate() {
return startdate != null ? startdate.toGregorianCalendar() : null;
}
@Column(name = "updatedate")
@Access(AccessType.PROPERTY)
public Calendar getUpdatedate() {
return updatedate != null ? updatedate.toGregorianCalendar() : null;
}
public void setEnddate(GregorianCalendar enddate) {
this.enddate = dtf.newXMLGregorianCalendar(enddate);
}
public void setStartdate(GregorianCalendar startdate) {
this.startdate = dtf.newXMLGregorianCalendar(startdate);
}
public void setUpdatedate(GregorianCalendar updatedate) {
this.updatedate = dtf.newXMLGregorianCalendar(updatedate);
}
public Addrobj aoguid(String aoguid) {
this.aoguid = UUID.fromString(aoguid);
return this;
}
public Addrobj parentguid(UUID parentguid) {
this.parentguid = parentguid;
return this;
}
public Addrobj aoid(UUID aoid) {
this.aoid = aoid;
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Addrobj addrobj = (Addrobj) o;
if (livestatus != addrobj.livestatus) return false;
if (divtype != addrobj.divtype) return false;
if (!aoid.equals(addrobj.aoid)) return false;
if (!aoguid.equals(addrobj.aoguid)) return false;
if (formalname != null ? !formalname.equals(addrobj.formalname) : addrobj.formalname != null) return false;
if (regioncode != null ? !regioncode.equals(addrobj.regioncode) : addrobj.regioncode != null) return false;
if (autocode != null ? !autocode.equals(addrobj.autocode) : addrobj.autocode != null) return false;
if (areacode != null ? !areacode.equals(addrobj.areacode) : addrobj.areacode != null) return false;
if (citycode != null ? !citycode.equals(addrobj.citycode) : addrobj.citycode != null) return false;
if (ctarcode != null ? !ctarcode.equals(addrobj.ctarcode) : addrobj.ctarcode != null) return false;
if (placecode != null ? !placecode.equals(addrobj.placecode) : addrobj.placecode != null) return false;
if (plancode != null ? !plancode.equals(addrobj.plancode) : addrobj.plancode != null) return false;
if (streetcode != null ? !streetcode.equals(addrobj.streetcode) : addrobj.streetcode != null) return false;
if (extrcode != null ? !extrcode.equals(addrobj.extrcode) : addrobj.extrcode != null) return false;
if (sextcode != null ? !sextcode.equals(addrobj.sextcode) : addrobj.sextcode != null) return false;
if (offname != null ? !offname.equals(addrobj.offname) : addrobj.offname != null) return false;
if (postalcode != null ? !postalcode.equals(addrobj.postalcode) : addrobj.postalcode != null) return false;
if (ifnsfl != null ? !ifnsfl.equals(addrobj.ifnsfl) : addrobj.ifnsfl != null) return false;
if (terrifnsfl != null ? !terrifnsfl.equals(addrobj.terrifnsfl) : addrobj.terrifnsfl != null) return false;
if (ifnsul != null ? !ifnsul.equals(addrobj.ifnsul) : addrobj.ifnsul != null) return false;
if (terrifnsul != null ? !terrifnsul.equals(addrobj.terrifnsul) : addrobj.terrifnsul != null) return false;
if (okato != null ? !okato.equals(addrobj.okato) : addrobj.okato != null) return false;
if (oktmo != null ? !oktmo.equals(addrobj.oktmo) : addrobj.oktmo != null) return false;
if (updatedate != null ? !updatedate.equals(addrobj.updatedate) : addrobj.updatedate != null) return false;
if (shortname != null ? !shortname.equals(addrobj.shortname) : addrobj.shortname != null) return false;
if (aolevel != null ? !aolevel.equals(addrobj.aolevel) : addrobj.aolevel != null) return false;
if (parentguid != null ? !parentguid.equals(addrobj.parentguid) : addrobj.parentguid != null) return false;
if (previd != null ? !previd.equals(addrobj.previd) : addrobj.previd != null) return false;
if (nextid != null ? !nextid.equals(addrobj.nextid) : addrobj.nextid != null) return false;
if (code != null ? !code.equals(addrobj.code) : addrobj.code != null) return false;
if (plaincode != null ? !plaincode.equals(addrobj.plaincode) : addrobj.plaincode != null) return false;
if (actstatus != null ? !actstatus.equals(addrobj.actstatus) : addrobj.actstatus != null) return false;
if (centstatus != null ? !centstatus.equals(addrobj.centstatus) : addrobj.centstatus != null) return false;
if (operstatus != null ? !operstatus.equals(addrobj.operstatus) : addrobj.operstatus != null) return false;
if (currstatus != null ? !currstatus.equals(addrobj.currstatus) : addrobj.currstatus != null) return false;
if (startdate != null ? !startdate.equals(addrobj.startdate) : addrobj.startdate != null) return false;
if (enddate != null ? !enddate.equals(addrobj.enddate) : addrobj.enddate != null) return false;
return normdoc != null ? normdoc.equals(addrobj.normdoc) : addrobj.normdoc == null;
}
@Override
public int hashCode() {
return Objects.hashCode(aoid);
}
@Override
public String toString() {
return "Addrobj{" +
"aoguid='" + aoguid + '\'' +
", areacode='" + areacode + '\'' +
", citycode='" + citycode + '\'' +
", shortname='" + shortname + '\'' +
", actstatus=" + actstatus +
'}';
}
}

@ -0,0 +1,12 @@
package me.bearns.fias.repository;
import me.bearns.fias.domain.Addrobj;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.UUID;
@Repository
public interface AddrobjRepository extends JpaRepository<Addrobj, UUID> {
}

@ -1,6 +1,8 @@
package me.bearns.fias.util;
import me.bearns.fias.repository.FiasVersionRepository;
import me.bearns.fias.domain.AddressObjects;
import me.bearns.fias.domain.Addrobj;
import me.bearns.fias.repository.AddrobjRepository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Component;
@ -13,14 +15,14 @@ public class Catalog {
private final List<Item> prefixList = new ArrayList<>();
public Catalog(FiasVersionRepository FIASJPA_REPOSITORY) {
public Catalog(AddrobjRepository ADDROBJ_REPOSITORY) {
prefixList.add(
new Item(
"AS_ADDROBJ_",
null,
ADDROBJ_REPOSITORY,
new QName("","Object"),
null,
null
Addrobj.class,
AddressObjects.class
)
);
prefixList.add(

Loading…
Cancel
Save