Skip to content

Commit

Permalink
prism-api+impl: cleanup of classes with unnecessary code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Jun 2, 2020
1 parent 465eb4e commit be593d2
Show file tree
Hide file tree
Showing 17 changed files with 767 additions and 1,356 deletions.
Expand Up @@ -7,17 +7,12 @@
package com.evolveum.prism.xml.ns._public.query_3;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;

import com.evolveum.midpoint.prism.PrismConstants;
import com.evolveum.midpoint.util.xml.DomAwareEqualsStrategy;
import com.evolveum.midpoint.util.xml.DomAwareHashCodeStrategy;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
Expand All @@ -26,6 +21,9 @@
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;

import com.evolveum.midpoint.prism.PrismConstants;
import com.evolveum.midpoint.util.xml.DomAwareEqualsStrategy;
import com.evolveum.midpoint.util.xml.DomAwareHashCodeStrategy;

/**
* <p>Java class for FilterType complex type.
Expand All @@ -46,17 +44,16 @@
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FilterType", propOrder = {
"matching"
"matching"
})
@XmlSeeAlso({
PropertyNoValueFilterType.class,
PropertyComplexValueFilterType.class,
PropertySimpleValueFilterType.class,
UriFilterType.class,
LogicalOperatorFilterType.class
PropertyNoValueFilterType.class,
PropertyComplexValueFilterType.class,
PropertySimpleValueFilterType.class,
UriFilterType.class,
LogicalOperatorFilterType.class
})
public class FilterClauseType implements Serializable, Cloneable, Equals, HashCode
{
public class FilterClauseType implements Serializable, Cloneable, Equals, HashCode {

private final static long serialVersionUID = 201105211233L;
protected String matching;
Expand All @@ -65,7 +62,6 @@ public class FilterClauseType implements Serializable, Cloneable, Equals, HashCo

/**
* Creates a new {@code FilterType} instance.
*
*/
public FilterClauseType() {
// CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000
Expand All @@ -75,11 +71,8 @@ public FilterClauseType() {
/**
* Creates a new {@code FilterType} instance by deeply copying a given {@code FilterType} instance.
*
*
* @param o
* The instance to copy.
* @throws NullPointerException
* if {@code o} is {@code null}.
* @param o The instance to copy.
* @throws NullPointerException if {@code o} is {@code null}.
*/
public FilterClauseType(final FilterClauseType o) {
// CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000
Expand All @@ -88,16 +81,14 @@ public FilterClauseType(final FilterClauseType o) {
throw new NullPointerException("Cannot create a copy of 'FilterType' from 'null'.");
}
// CBuiltinLeafInfo: java.lang.String
this.matching = ((o.matching == null)?null:o.getMatching());
this.matching = ((o.matching == null) ? null : o.getMatching());
}

/**
* Gets the value of the matching property.
*
* @return
* possible object is
* {@link String }
*
* @return possible object is
* {@link String }
*/
public String getMatching() {
return matching;
Expand All @@ -106,10 +97,8 @@ public String getMatching() {
/**
* Sets the value of the matching property.
*
* @param value
* allowed object is
* {@link String }
*
* @param value allowed object is
* {@link String }
*/
public void setMatching(String value) {
this.matching = value;
Expand All @@ -118,7 +107,6 @@ public void setMatching(String value) {
/**
* Generates a String representation of the contents of this type.
* This is an extension method, produced by the 'ts' xjc plugin
*
*/
@Override
public String toString() {
Expand All @@ -127,11 +115,9 @@ public String toString() {

public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
String theMatching;
theMatching = this.getMatching();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "matching", theMatching), currentHashCode, theMatching);
}
String theMatching;
theMatching = this.getMatching();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "matching", theMatching), currentHashCode, theMatching);
return currentHashCode;
}

Expand All @@ -148,18 +134,17 @@ public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Obje
return true;
}
final FilterClauseType that = ((FilterClauseType) object);
{
String lhsMatching;
lhsMatching = this.getMatching();
String rhsMatching;
rhsMatching = that.getMatching();
if (!strategy.equals(LocatorUtils.property(thisLocator, "matching", lhsMatching), LocatorUtils.property(thatLocator, "matching", rhsMatching), lhsMatching, rhsMatching)) {
return false;
}
String lhsMatching;
lhsMatching = this.getMatching();
String rhsMatching;
rhsMatching = that.getMatching();
if (!strategy.equals(LocatorUtils.property(thisLocator, "matching", lhsMatching), LocatorUtils.property(thatLocator, "matching", rhsMatching), lhsMatching, rhsMatching)) {
return false;
}
return true;
}

@SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
public boolean equals(Object object) {
final EqualsStrategy strategy = DomAwareEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
Expand All @@ -168,20 +153,16 @@ public boolean equals(Object object) {
/**
* Creates and returns a deep copy of this object.
*
*
* @return
* A deep copy of this object.
* @return A deep copy of this object.
*/
@Override
public FilterClauseType clone() {
try {
{
// CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000
final FilterClauseType clone = ((FilterClauseType) super.clone());
// CBuiltinLeafInfo: java.lang.String
clone.matching = ((this.matching == null)?null:this.getMatching());
return clone;
}
// CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000
final FilterClauseType clone = ((FilterClauseType) super.clone());
// CBuiltinLeafInfo: java.lang.String
clone.matching = ((this.matching == null) ? null : this.getMatching());
return clone;
} catch (CloneNotSupportedException e) {
// Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
throw new AssertionError(e);
Expand Down
Expand Up @@ -7,24 +7,22 @@
package com.evolveum.prism.xml.ns._public.query_3;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;

import com.evolveum.midpoint.prism.PrismConstants;
import com.evolveum.midpoint.util.xml.DomAwareEqualsStrategy;
import com.evolveum.midpoint.util.xml.DomAwareHashCodeStrategy;

import org.apache.commons.lang.builder.ToStringBuilder;
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.locator.ObjectLocator;

import com.evolveum.midpoint.prism.PrismConstants;
import com.evolveum.midpoint.util.xml.DomAwareEqualsStrategy;
import com.evolveum.midpoint.util.xml.DomAwareHashCodeStrategy;

/**
* <p>Java class for LogicalOperatorFilterType complex type.
Expand All @@ -43,20 +41,18 @@
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LogicalOperatorFilterType")
@XmlSeeAlso({
NAryLogicalOperatorFilterType.class,
UnaryLogicalOperatorFilterType.class
NAryLogicalOperatorFilterType.class,
UnaryLogicalOperatorFilterType.class
})
public abstract class LogicalOperatorFilterType
extends FilterClauseType
implements Serializable, Cloneable, Equals, HashCode
{
extends FilterClauseType
implements Serializable, Cloneable, Equals, HashCode {

private final static long serialVersionUID = 201105211233L;
public final static QName COMPLEX_TYPE = new QName(PrismConstants.NS_QUERY, "LogicalOperatorFilterType");

/**
* Creates a new {@code LogicalOperatorFilterType} instance.
*
*/
public LogicalOperatorFilterType() {
// CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000
Expand All @@ -66,11 +62,8 @@ public LogicalOperatorFilterType() {
/**
* Creates a new {@code LogicalOperatorFilterType} instance by deeply copying a given {@code LogicalOperatorFilterType} instance.
*
*
* @param o
* The instance to copy.
* @throws NullPointerException
* if {@code o} is {@code null}.
* @param o The instance to copy.
* @throws NullPointerException if {@code o} is {@code null}.
*/
public LogicalOperatorFilterType(final LogicalOperatorFilterType o) {
// CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000
Expand All @@ -83,16 +76,14 @@ public LogicalOperatorFilterType(final LogicalOperatorFilterType o) {
/**
* Generates a String representation of the contents of this type.
* This is an extension method, produced by the 'ts' xjc plugin
*
*/
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}

public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = super.hashCode(locator, strategy);
return currentHashCode;
return super.hashCode(locator, strategy);
}

public int hashCode() {
Expand All @@ -113,6 +104,7 @@ public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Obje
return true;
}

@SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
public boolean equals(Object object) {
final EqualsStrategy strategy = DomAwareEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
Expand All @@ -121,17 +113,11 @@ public boolean equals(Object object) {
/**
* Creates and returns a deep copy of this object.
*
*
* @return
* A deep copy of this object.
* @return A deep copy of this object.
*/
@Override
public LogicalOperatorFilterType clone() {
{
// CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000
final LogicalOperatorFilterType clone = ((LogicalOperatorFilterType) super.clone());
return clone;
}
// CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000
return ((LogicalOperatorFilterType) super.clone());
}

}

0 comments on commit be593d2

Please sign in to comment.