
no.udi.common_tilgangskontroll.v1.Rettigheter Maven / Gradle / Ivy
package no.udi.common_tilgangskontroll.v1;
import java.io.Serializable;
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.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.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Liste med rettigheter for en bruker
*
* Java class for Rettigheter complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Rettigheter">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Rettighet" type="{http://udi.no/Common_Tilgangskontroll/v1}Rettighet" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Rettigheter", propOrder = {
"rettighet"
})
public class Rettigheter
implements Serializable, Equals, HashCode
{
@XmlElement(name = "Rettighet")
protected List rettighet;
/**
* Gets the value of the rettighet 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 rettighet property.
*
*
* For example, to add a new item, do as follows:
*
* getRettighet().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Rettighet }
*
*
*/
public List getRettighet() {
if (rettighet == null) {
rettighet = new ArrayList();
}
return this.rettighet;
}
public Rettigheter withRettighet(Rettighet... values) {
if (values!= null) {
for (Rettighet value: values) {
getRettighet().add(value);
}
}
return this;
}
public Rettigheter withRettighet(Collection values) {
if (values!= null) {
getRettighet().addAll(values);
}
return this;
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
List theRettighet;
theRettighet = (((this.rettighet!= null)&&(!this.rettighet.isEmpty()))?this.getRettighet():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "rettighet", theRettighet), currentHashCode, theRettighet);
}
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 Rettigheter)) {
return false;
}
if (this == object) {
return true;
}
final Rettigheter that = ((Rettigheter) object);
{
List lhsRettighet;
lhsRettighet = (((this.rettighet!= null)&&(!this.rettighet.isEmpty()))?this.getRettighet():null);
List rhsRettighet;
rhsRettighet = (((that.rettighet!= null)&&(!that.rettighet.isEmpty()))?that.getRettighet():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "rettighet", lhsRettighet), LocatorUtils.property(thatLocator, "rettighet", rhsRettighet), lhsRettighet, rhsRettighet)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
}