package org.oasis.names.tc.saml.assertion;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSeeAlso;
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 SubjectStatementAbstractType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SubjectStatementAbstractType">
* <complexContent>
* <extension base="{urn:oasis:names:tc:SAML:1.0:assertion}StatementAbstractType">
* <sequence>
* <element ref="{urn:oasis:names:tc:SAML:1.0:assertion}Subject"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SubjectStatementAbstractType", propOrder = {
"subject"
})
@XmlSeeAlso({
AuthenticationStatementType.class,
AttributeStatementType.class,
AuthorizationDecisionStatementType.class
})
public abstract class SubjectStatementAbstractType
extends StatementAbstractType
implements Serializable, Equals, HashCode, ToString
{
@XmlElement(name = "Subject", required = true)
protected SubjectType subject;
/**
* Gets the value of the subject property.
*
* @return
* possible object is
* {@link SubjectType }
*
*/
public SubjectType getSubject() {
return subject;
}
/**
* Sets the value of the subject property.
*
* @param value
* allowed object is
* {@link SubjectType }
*
*/
public void setSubject(SubjectType value) {
this.subject = value;
}
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);
{
SubjectType theSubject;
theSubject = this.getSubject();
strategy.appendField(locator, this, "subject", buffer, theSubject);
}
return buffer;
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = super.hashCode(locator, strategy);
{
SubjectType theSubject;
theSubject = this.getSubject();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subject", theSubject), currentHashCode, theSubject);
}
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 SubjectStatementAbstractType)) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final SubjectStatementAbstractType that = ((SubjectStatementAbstractType) object);
{
SubjectType lhsSubject;
lhsSubject = this.getSubject();
SubjectType rhsSubject;
rhsSubject = that.getSubject();
if (!strategy.equals(LocatorUtils.property(thisLocator, "subject", lhsSubject), LocatorUtils.property(thatLocator, "subject", rhsSubject), lhsSubject, rhsSubject)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
}