package org.oasis.names.tc.saml.assertion; 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.XmlType; import org.jvnet.jaxb2_commons.lang.Equals; import org.jvnet.jaxb2_commons.lang.EqualsStrategy; import org.jvnet.jaxb2_commons.lang.HashCode; import org.jvnet.jaxb2_commons.lang.HashCodeStrategy; import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy; import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy; import org.jvnet.jaxb2_commons.lang.ToString; import org.jvnet.jaxb2_commons.lang.ToStringStrategy; import org.jvnet.jaxb2_commons.locator.ObjectLocator; import org.jvnet.jaxb2_commons.locator.util.LocatorUtils; /** * <p>Java class for AttributeType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="AttributeType"> * <complexContent> * <extension base="{urn:oasis:names:tc:SAML:1.0:assertion}AttributeDesignatorType"> * <sequence> * <element ref="{urn:oasis:names:tc:SAML:1.0:assertion}AttributeValue" maxOccurs="unbounded"/> * </sequence> * </extension> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AttributeType", propOrder = { "attributeValue" }) public class AttributeType extends AttributeDesignatorType implements Serializable, Equals, HashCode, ToString { @XmlElement(name = "AttributeValue", required = true) protected List<Object> attributeValue; /** * Gets the value of the attributeValue 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 attributeValue property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAttributeValue().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Object } * * */ public List<Object> getAttributeValue() { if (attributeValue == null) { attributeValue = new ArrayList<Object>(); } return this.attributeValue; } public String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { List<Object> theAttributeValue; theAttributeValue = (((this.attributeValue!= null)&&(!this.attributeValue.isEmpty()))?this.getAttributeValue():null); strategy.appendField(locator, this, "attributeValue", buffer, theAttributeValue); } return buffer; } public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = super.hashCode(locator, strategy); { List<Object> theAttributeValue; theAttributeValue = (((this.attributeValue!= null)&&(!this.attributeValue.isEmpty()))?this.getAttributeValue():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "attributeValue", theAttributeValue), currentHashCode, theAttributeValue); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof AttributeType)) { return false; } if (this == object) { return true; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final AttributeType that = ((AttributeType) object); { List<Object> lhsAttributeValue; lhsAttributeValue = (((this.attributeValue!= null)&&(!this.attributeValue.isEmpty()))?this.getAttributeValue():null); List<Object> rhsAttributeValue; rhsAttributeValue = (((that.attributeValue!= null)&&(!that.attributeValue.isEmpty()))?that.getAttributeValue():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "attributeValue", lhsAttributeValue), LocatorUtils.property(thatLocator, "attributeValue", rhsAttributeValue), lhsAttributeValue, rhsAttributeValue)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } }