All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.glookast.commons.templates.ContainerFormat Maven / Gradle / Ivy


package com.glookast.commons.templates;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.glookast.commons.xml.XmlAdapterUUID;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.UUID;


/**
 * 

Java class for ContainerFormat complex type. * *

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

 * <complexType name="ContainerFormat">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="id" type="{http://base.commons.glookast.com}UUID"/>
 *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="systemTypes" type="{http://templates.commons.glookast.com}SystemType" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
*/ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ContainerFormat", namespace = "http://templates.commons.glookast.com", propOrder = { "id", "name", "systemTypes" }) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, defaultImpl = ContainerFormat.class) public class ContainerFormat implements Serializable { @XmlElement(required = true, type = String.class) @XmlJavaTypeAdapter(XmlAdapterUUID.class) protected UUID id; @XmlElement(required = true) protected String name; @XmlSchemaType(name = "string") protected List systemTypes; /** * Default no-arg constructor */ public ContainerFormat() { super(); } /** * Fully-initialising value constructor */ public ContainerFormat(final UUID id, final String name) { this.id = id; this.name = name; } public ContainerFormat(ContainerFormat cf) { this.id = cf.id; this.name = cf.name; this.systemTypes = new ArrayList<>(cf.getSystemTypes()); } /** * Gets the value of the id property. * * @return possible object is * {@link String } */ public UUID getId() { return id; } /** * Sets the value of the id property. * * @param value allowed object is * {@link String } */ public void setId(UUID value) { this.id = value; } /** * Gets the value of the name property. * * @return possible object is * {@link String } */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value allowed object is * {@link String } */ public void setName(String value) { this.name = value; } /** * Gets the value of the systemTypes 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 systemTypes property. * *

* For example, to add a new item, do as follows: *

     *    getSystemTypes().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link SystemType } */ public List getSystemTypes() { if (systemTypes == null) { systemTypes = new ArrayList(); } return this.systemTypes; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ContainerFormat that = (ContainerFormat) o; return Objects.equals(getId(), that.getId()) && Objects.equals(getName(), that.getName()) && Objects.equals(getSystemTypes(), that.getSystemTypes()); } @Override public int hashCode() { return Objects.hash(getId(), getName(), getSystemTypes()); } @Override public String toString() { return "ContainerFormat{" + "id=" + id + ", name=" + name + ", systemTypes=" + systemTypes + '}'; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy