/* * Copyright (c) 2010-2013 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2012.02.24 at 02:46:19 PM CET // package com.evolveum.midpoint.prism.foo; import com.evolveum.prism.xml.ns._public.types_3.RawType; import java.io.Serializable; 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.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** * * Account construction type is NOT a container. It is a complex-type property. * This tests the ability to deal with complex type properties and also with * dateTime fields in them. * * * <p>Java class for AccountConstructionType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="AccountConstructionType"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="howto" type="{http://www.w3.org/2001/XMLSchema}string"/> * <element name="when" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> * <element name="value" type="{http://midpoint.evolveum.com/xml/ns/test/foo-1.xsd}value" minOccurs="0" maxOccurs="unbounded"/> * </sequence> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AccountConstructionType", propOrder = { "howto", "when", "value" }) public class AccountConstructionType implements Serializable, Cloneable { private final static long serialVersionUID = 201202081233L; @XmlElement(required = true) protected String howto; @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar when; @XmlElement(name = "value") private List<RawType> value; public List<RawType> getValue() { if (value == null) { value = new ArrayList<RawType>(); } return value; } /** * Gets the value of the howto property. * * @return * possible object is * {@link String } * */ public String getHowto() { return howto; } /** * Sets the value of the howto property. * * @param value * allowed object is * {@link String } * */ public void setHowto(String value) { this.howto = value; } /** * Gets the value of the when property. * * @return * possible object is * {@link javax.xml.datatype.XMLGregorianCalendar } * */ public XMLGregorianCalendar getWhen() { return when; } /** * Sets the value of the when property. * * @param value * allowed object is * {@link javax.xml.datatype.XMLGregorianCalendar } * */ public void setWhen(XMLGregorianCalendar value) { this.when = value; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((howto == null) ? 0 : howto.hashCode()); result = prime * result + ((when == null) ? 0 : when.hashCode()); result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; AccountConstructionType other = (AccountConstructionType) obj; if (howto == null) { if (other.howto != null) return false; } else if (!howto.equals(other.howto)) return false; if (when == null) { if (other.when != null) return false; } else if (!when.equals(other.when)) return false; if (value == null || value.isEmpty()) { return other.value == null || other.value.isEmpty(); } else if (other.value == null || other.value.isEmpty()) { return value == null || value.isEmpty(); } else if (!value.equals(other.value)) { return false; } return true; } public AccountConstructionType clone() { AccountConstructionType clone = new AccountConstructionType(); clone.howto = howto; if (when != null) { clone.when = (XMLGregorianCalendar) when.clone(); } for (RawType value : getValue()) { clone.getValue().add(value.clone()); } return clone; } }