Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Apr 2, 2020
2 parents ca35ef2 + f6da22c commit 1bac43d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 48 deletions.

This file was deleted.

Expand Up @@ -9,9 +9,11 @@

import com.evolveum.midpoint.repo.sql.query2.hqm.HibernateQuery;
import com.evolveum.midpoint.repo.sql.query2.hqm.RootHibernateQuery;

import org.apache.commons.lang.Validate;

import java.util.Collection;
import java.util.Objects;

/**
* @author mederly
Expand Down Expand Up @@ -52,14 +54,14 @@ public void dumpToHql(StringBuilder sb, int indent) {

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
if (this == o) { return true; }
if (o == null || getClass() != o.getClass()) { return false; }
if (!super.equals(o)) { return false; }

InCondition that = (InCondition) o;

if (values != null ? !values.equals(that.values) : that.values != null) return false;
return !(innerQueryText != null ? !innerQueryText.equals(that.innerQueryText) : that.innerQueryText != null);
return Objects.equals(values, that.values)
&& Objects.equals(innerQueryText, that.innerQueryText);

}

Expand Down
Expand Up @@ -12,6 +12,7 @@

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

/**
Expand All @@ -23,9 +24,7 @@ public abstract class JunctionCondition extends Condition {

public JunctionCondition(RootHibernateQuery rootHibernateQuery, Condition... conditions) {
super(rootHibernateQuery);
for (Condition condition : conditions) {
components.add(condition);
}
Collections.addAll(components, conditions);
}

public JunctionCondition(RootHibernateQuery rootHibernateQuery, Collection<Condition> conditions) {
Expand Down Expand Up @@ -69,7 +68,6 @@ public boolean equals(Object o) {
JunctionCondition that = (JunctionCondition) o;

return components.equals(that.components);

}

@Override
Expand Down
Expand Up @@ -7,8 +7,11 @@

package com.evolveum.midpoint.repo.sql.query2.hqm.condition;

import java.util.Objects;

import com.evolveum.midpoint.repo.sql.query2.hqm.HibernateQuery;
import com.evolveum.midpoint.repo.sql.query2.hqm.RootHibernateQuery;

import org.apache.commons.lang.Validate;

/**
Expand Down Expand Up @@ -54,16 +57,15 @@ public void dumpToHql(StringBuilder sb, int indent) {

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
if (this == o) { return true; }
if (o == null || getClass() != o.getClass()) { return false; }
if (!super.equals(o)) { return false; }

SimpleComparisonCondition that = (SimpleComparisonCondition) o;

if (ignoreCase != that.ignoreCase) return false;
if (value != null ? !value.equals(that.value) : that.value != null) return false;
return operator.equals(that.operator);

return ignoreCase == that.ignoreCase
&& Objects.equals(value, that.value)
&& operator.equals(that.operator);
}

@Override
Expand Down

0 comments on commit 1bac43d

Please sign in to comment.