org.ehcache.xml.multi.model.Configurations Maven / Gradle / Ivy
Show all versions of ehcache Show documentation
package org.ehcache.xml.multi.model;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence maxOccurs="unbounded" minOccurs="0">
* <element name="configuration">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <choice>
* <element ref="{http://www.ehcache.org/v3}config"/>
* <element name="variant" maxOccurs="unbounded">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://www.ehcache.org/v3}config"/>
* </sequence>
* <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </choice>
* <attribute name="identity" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"configuration"
})
@XmlRootElement(name = "configurations")
public class Configurations {
protected List configuration;
/**
* Gets the value of the configuration property.
*
*
* 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 configuration property.
*
*
* For example, to add a new item, do as follows:
*
* getConfiguration().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Configurations.Configuration }
*
*
*/
public List getConfiguration() {
if (configuration == null) {
configuration = new ArrayList();
}
return this.configuration;
}
public Configurations withConfiguration(Configurations.Configuration... values) {
if (values!= null) {
for (Configurations.Configuration value: values) {
getConfiguration().add(value);
}
}
return this;
}
public Configurations withConfiguration(Collection values) {
if (values!= null) {
getConfiguration().addAll(values);
}
return this;
}
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <choice>
* <element ref="{http://www.ehcache.org/v3}config"/>
* <element name="variant" maxOccurs="unbounded">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://www.ehcache.org/v3}config"/>
* </sequence>
* <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </choice>
* <attribute name="identity" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"config",
"variant"
})
public static class Configuration {
@XmlAnyElement
protected Element config;
protected List variant;
@XmlAttribute(name = "identity", required = true)
protected String identity;
/**
* Gets the value of the config property.
*
* @return
* possible object is
* {@link Element }
*
*/
public Element getConfig() {
return config;
}
/**
* Sets the value of the config property.
*
* @param value
* allowed object is
* {@link Element }
*
*/
public void setConfig(Element value) {
this.config = value;
}
/**
* Gets the value of the variant property.
*
*
* 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 variant property.
*
*
* For example, to add a new item, do as follows:
*
* getVariant().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Configurations.Configuration.Variant }
*
*
*/
public List getVariant() {
if (variant == null) {
variant = new ArrayList();
}
return this.variant;
}
/**
* Gets the value of the identity property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIdentity() {
return identity;
}
/**
* Sets the value of the identity property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIdentity(String value) {
this.identity = value;
}
public Configurations.Configuration withConfig(Element value) {
setConfig(value);
return this;
}
public Configurations.Configuration withVariant(Configurations.Configuration.Variant... values) {
if (values!= null) {
for (Configurations.Configuration.Variant value: values) {
getVariant().add(value);
}
}
return this;
}
public Configurations.Configuration withVariant(Collection values) {
if (values!= null) {
getVariant().addAll(values);
}
return this;
}
public Configurations.Configuration withIdentity(String value) {
setIdentity(value);
return this;
}
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://www.ehcache.org/v3}config"/>
* </sequence>
* <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"config"
})
public static class Variant {
@XmlAnyElement
protected Element config;
@XmlAttribute(name = "type", required = true)
protected String type;
/**
* Gets the value of the config property.
*
* @return
* possible object is
* {@link Element }
*
*/
public Element getConfig() {
return config;
}
/**
* Sets the value of the config property.
*
* @param value
* allowed object is
* {@link Element }
*
*/
public void setConfig(Element value) {
this.config = value;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setType(String value) {
this.type = value;
}
public Configurations.Configuration.Variant withConfig(Element value) {
setConfig(value);
return this;
}
public Configurations.Configuration.Variant withType(String value) {
setType(value);
return this;
}
}
}
}