Java class for ArrayOfSpellResult complex type. + * + *
The following schema fragment specifies the expected content contained within this class. + * + *
+ * <complexType name="ArrayOfSpellResult">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="SpellResult" type="{http://speller.yandex.net/services/spellservice}SpellResult" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ArrayOfSpellResult", propOrder = {
+ "spellResult"
+})
+public class ArrayOfSpellResult {
+
+ @XmlElement(name = "SpellResult")
+ protected List
+ * 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 set method for the spellResult property.
+ *
+ *
+ * For example, to add a new item, do as follows: + *
+ * getSpellResult().add(newItem); + *+ * + * + *
+ * Objects of the following type(s) are allowed in the list
+ * {@link SpellResult }
+ *
+ *
+ */
+ public List Java class for anonymous complex type.
+ *
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * Java class for anonymous complex type.
+ *
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * Java class for anonymous complex type.
+ *
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * 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
+ * For example, to add a new item, do as follows:
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ *
+ *
+ */
+ public List Java class for anonymous complex type.
+ *
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: net.yandex.speller.services.spellservice
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link CheckTextResponse }
+ *
+ */
+ public CheckTextResponse createCheckTextResponse() {
+ return new CheckTextResponse();
+ }
+
+ /**
+ * Create an instance of {@link SpellResult }
+ *
+ */
+ public SpellResult createSpellResult() {
+ return new SpellResult();
+ }
+
+ /**
+ * Create an instance of {@link CheckTextsRequest }
+ *
+ */
+ public CheckTextsRequest createCheckTextsRequest() {
+ return new CheckTextsRequest();
+ }
+
+ /**
+ * Create an instance of {@link CheckTextsResponse }
+ *
+ */
+ public CheckTextsResponse createCheckTextsResponse() {
+ return new CheckTextsResponse();
+ }
+
+ /**
+ * Create an instance of {@link ArrayOfSpellResult }
+ *
+ */
+ public ArrayOfSpellResult createArrayOfSpellResult() {
+ return new ArrayOfSpellResult();
+ }
+
+ /**
+ * Create an instance of {@link CheckTextRequest }
+ *
+ */
+ public CheckTextRequest createCheckTextRequest() {
+ return new CheckTextRequest();
+ }
+
+ /**
+ * Create an instance of {@link SpellError }
+ *
+ */
+ public SpellError createSpellError() {
+ return new SpellError();
+ }
+
+}
diff --git a/src/main/java/net/yandex/speller/services/spellservice/SpellError.java b/src/main/java/net/yandex/speller/services/spellservice/SpellError.java
new file mode 100644
index 0000000..ad6e430
--- /dev/null
+++ b/src/main/java/net/yandex/speller/services/spellservice/SpellError.java
@@ -0,0 +1,192 @@
+
+package net.yandex.speller.services.spellservice;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for SpellError complex type.
+ *
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * 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
+ * For example, to add a new item, do as follows:
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ *
+ *
+ */
+ public List Java class for SpellResult complex type.
+ *
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * 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
+ * For example, to add a new item, do as follows:
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link SpellError }
+ *
+ *
+ */
+ public List
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="text" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * <attribute name="lang" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="options" type="{http://www.w3.org/2001/XMLSchema}int" default="0" />
+ * <attribute name="format" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "text"
+})
+@XmlRootElement(name = "CheckTextRequest")
+public class CheckTextRequest {
+
+ @XmlElement(required = true)
+ protected String text;
+ @XmlAttribute(name = "lang")
+ protected String lang;
+ @XmlAttribute(name = "options")
+ protected Integer options;
+ @XmlAttribute(name = "format")
+ protected String format;
+
+ /**
+ * Gets the value of the text property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * Sets the value of the text property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setText(String value) {
+ this.text = value;
+ }
+
+ /**
+ * Gets the value of the lang property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLang() {
+ return lang;
+ }
+
+ /**
+ * Sets the value of the lang property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLang(String value) {
+ this.lang = value;
+ }
+
+ /**
+ * Gets the value of the options property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public int getOptions() {
+ if (options == null) {
+ return 0;
+ } else {
+ return options;
+ }
+ }
+
+ /**
+ * Sets the value of the options property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setOptions(Integer value) {
+ this.options = value;
+ }
+
+ /**
+ * Gets the value of the format property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFormat() {
+ if (format == null) {
+ return "";
+ } else {
+ return format;
+ }
+ }
+
+ /**
+ * Sets the value of the format property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFormat(String value) {
+ this.format = value;
+ }
+
+}
diff --git a/src/main/java/net/yandex/speller/services/spellservice/CheckTextResponse.java b/src/main/java/net/yandex/speller/services/spellservice/CheckTextResponse.java
new file mode 100644
index 0000000..e9893ff
--- /dev/null
+++ b/src/main/java/net/yandex/speller/services/spellservice/CheckTextResponse.java
@@ -0,0 +1,64 @@
+
+package net.yandex.speller.services.spellservice;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="SpellResult" type="{http://speller.yandex.net/services/spellservice}SpellResult"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "spellResult"
+})
+@XmlRootElement(name = "CheckTextResponse")
+public class CheckTextResponse {
+
+ @XmlElement(name = "SpellResult", required = true)
+ protected SpellResult spellResult;
+
+ /**
+ * Gets the value of the spellResult property.
+ *
+ * @return
+ * possible object is
+ * {@link SpellResult }
+ *
+ */
+ public SpellResult getSpellResult() {
+ return spellResult;
+ }
+
+ /**
+ * Sets the value of the spellResult property.
+ *
+ * @param value
+ * allowed object is
+ * {@link SpellResult }
+ *
+ */
+ public void setSpellResult(SpellResult value) {
+ this.spellResult = value;
+ }
+
+}
diff --git a/src/main/java/net/yandex/speller/services/spellservice/CheckTextsRequest.java b/src/main/java/net/yandex/speller/services/spellservice/CheckTextsRequest.java
new file mode 100644
index 0000000..8547d6e
--- /dev/null
+++ b/src/main/java/net/yandex/speller/services/spellservice/CheckTextsRequest.java
@@ -0,0 +1,159 @@
+
+package net.yandex.speller.services.spellservice;
+
+import java.util.ArrayList;
+import java.util.List;
+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;
+
+
+/**
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="text" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="lang" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="options" type="{http://www.w3.org/2001/XMLSchema}int" default="0" />
+ * <attribute name="format" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "text"
+})
+@XmlRootElement(name = "CheckTextsRequest")
+public class CheckTextsRequest {
+
+ protected Listset method for the text property.
+ *
+ *
+ * getText().add(newItem);
+ *
+ *
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="ArrayOfSpellResult" type="{http://speller.yandex.net/services/spellservice}ArrayOfSpellResult"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "arrayOfSpellResult"
+})
+@XmlRootElement(name = "CheckTextsResponse")
+public class CheckTextsResponse {
+
+ @XmlElement(name = "ArrayOfSpellResult", required = true)
+ protected ArrayOfSpellResult arrayOfSpellResult;
+
+ /**
+ * Gets the value of the arrayOfSpellResult property.
+ *
+ * @return
+ * possible object is
+ * {@link ArrayOfSpellResult }
+ *
+ */
+ public ArrayOfSpellResult getArrayOfSpellResult() {
+ return arrayOfSpellResult;
+ }
+
+ /**
+ * Sets the value of the arrayOfSpellResult property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ArrayOfSpellResult }
+ *
+ */
+ public void setArrayOfSpellResult(ArrayOfSpellResult value) {
+ this.arrayOfSpellResult = value;
+ }
+
+}
diff --git a/src/main/java/net/yandex/speller/services/spellservice/ObjectFactory.java b/src/main/java/net/yandex/speller/services/spellservice/ObjectFactory.java
new file mode 100644
index 0000000..603b94a
--- /dev/null
+++ b/src/main/java/net/yandex/speller/services/spellservice/ObjectFactory.java
@@ -0,0 +1,88 @@
+
+package net.yandex.speller.services.spellservice;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the net.yandex.speller.services.spellservice package.
+ *
+ * <complexType name="SpellError">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="word" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="s" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="code" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ * <attribute name="pos" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ * <attribute name="row" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ * <attribute name="col" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ * <attribute name="len" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SpellError", propOrder = {
+ "word",
+ "s"
+})
+public class SpellError {
+
+ @XmlElement(required = true)
+ protected String word;
+ protected Listset method for the s property.
+ *
+ *
+ * getS().add(newItem);
+ *
+ *
+ *
+ *
+ * <complexType name="SpellResult">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="error" type="{http://speller.yandex.net/services/spellservice}SpellError" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SpellResult", propOrder = {
+ "error"
+})
+public class SpellResult {
+
+ protected Listset method for the error property.
+ *
+ *
+ * getError().add(newItem);
+ *
+ *
+ *
+ * features parameter will have their default values.
+ * @return
+ * returns SpellServiceSoap
+ */
+ @WebEndpoint(name = "SpellServiceSoap")
+ public SpellServiceSoap getSpellServiceSoap(WebServiceFeature... features) {
+ return super.getPort(new QName("http://speller.yandex.net/services/spellservice", "SpellServiceSoap"), SpellServiceSoap.class, features);
+ }
+
+ private static URL __getWsdlLocation() {
+ if (SPELLSERVICE_EXCEPTION!= null) {
+ throw SPELLSERVICE_EXCEPTION;
+ }
+ return SPELLSERVICE_WSDL_LOCATION;
+ }
+
+}
diff --git a/src/main/java/net/yandex/speller/services/spellservice/SpellServiceSoap.java b/src/main/java/net/yandex/speller/services/spellservice/SpellServiceSoap.java
new file mode 100644
index 0000000..fd0880c
--- /dev/null
+++ b/src/main/java/net/yandex/speller/services/spellservice/SpellServiceSoap.java
@@ -0,0 +1,50 @@
+
+package net.yandex.speller.services.spellservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.9-b130926.1035
+ * Generated source version: 2.2
+ *
+ */
+@WebService(name = "SpellServiceSoap", targetNamespace = "http://speller.yandex.net/services/spellservice")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+@XmlSeeAlso({
+ ObjectFactory.class
+})
+public interface SpellServiceSoap {
+
+
+ /**
+ *
+ * @param parameters
+ * @return
+ * returns net.yandex.speller.services.spellservice.CheckTextResponse
+ */
+ @WebMethod(action = "http://speller.yandex.net/services/spellservice/checkText")
+ @WebResult(name = "CheckTextResponse", targetNamespace = "http://speller.yandex.net/services/spellservice", partName = "parameters")
+ public CheckTextResponse checkText(
+ @WebParam(name = "CheckTextRequest", targetNamespace = "http://speller.yandex.net/services/spellservice", partName = "parameters")
+ CheckTextRequest parameters);
+
+ /**
+ *
+ * @param parameters
+ * @return
+ * returns net.yandex.speller.services.spellservice.CheckTextsResponse
+ */
+ @WebMethod(action = "http://speller.yandex.net/services/spellservice/checkTexts")
+ @WebResult(name = "CheckTextsResponse", targetNamespace = "http://speller.yandex.net/services/spellservice", partName = "parameters")
+ public CheckTextsResponse checkTexts(
+ @WebParam(name = "CheckTextsRequest", targetNamespace = "http://speller.yandex.net/services/spellservice", partName = "parameters")
+ CheckTextsRequest parameters);
+
+}
diff --git a/src/main/java/net/yandex/speller/services/spellservice/package-info.java b/src/main/java/net/yandex/speller/services/spellservice/package-info.java
new file mode 100644
index 0000000..b58aade
--- /dev/null
+++ b/src/main/java/net/yandex/speller/services/spellservice/package-info.java
@@ -0,0 +1,2 @@
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://speller.yandex.net/services/spellservice", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package net.yandex.speller.services.spellservice;
diff --git a/src/main/resources/hibernate.properties b/src/main/resources/hibernate.properties
index 87ebe48..45b7de3 100644
--- a/src/main/resources/hibernate.properties
+++ b/src/main/resources/hibernate.properties
@@ -6,3 +6,8 @@ hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.show_sql=true
hibernate.format_sql=true
hibernate.hbm2ddl.auto=update
+hibernate.use_second_level_cache=true
+hibernate.cache.region.factory_class=org.hibernate.cache.jcache.JCacheRegionFactory
+hibernate.hibernate.javax.cache.provider=org.ehcache.jsr107.EhcacheCachingProvider
+
+
diff --git a/src/test/java/io/khasang/eshop/controller/CatControllerIntegrationTest.java b/src/test/java/io/khasang/eshop/controller/CatControllerIntegrationTest.java
index 2302595..9795095 100644
--- a/src/test/java/io/khasang/eshop/controller/CatControllerIntegrationTest.java
+++ b/src/test/java/io/khasang/eshop/controller/CatControllerIntegrationTest.java
@@ -1,11 +1,13 @@
package io.khasang.eshop.controller;
import io.khasang.eshop.entity.Cat;
+import io.khasang.eshop.entity.CatWoman;
import org.junit.*;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.*;
import org.springframework.web.client.RestTemplate;
+import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertEquals;
@@ -123,13 +125,26 @@ private Cat createdCat() {
assertNotNull(createdCat);
assertEquals(cat.getName(), createdCat.getName());
+ assertNotNull(cat.getCatWomanList());
return createdCat;
}
- private Cat prefillCat(String barsik) {
+ private Cat prefillCat(String name) {
Cat cat = new Cat();
- cat.setName(barsik);
+ cat.setName(name);
cat.setDescription("happy");
+
+ CatWoman catWoman1 = new CatWoman();
+ catWoman1.setName("Riska");
+
+ CatWoman catWoman2 = new CatWoman();
+ catWoman2.setName("Murka");
+
+ List