Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.hibernate.query.sqm.tree.domain.SqmPath;
import org.hibernate.spi.NavigablePath;

import java.util.Objects;

public class AnyDiscriminatorSqmPath<T> extends AbstractSqmPath<T> implements DiscriminatorSqmPath<T> {

Expand Down Expand Up @@ -49,15 +48,25 @@ public AnyDiscriminatorSqmPathSource<T> getExpressible() {
return (AnyDiscriminatorSqmPathSource<T>) getReferencedPathSource();
}


@Override
public boolean equals(Object object) {
return object instanceof AnyDiscriminatorSqmPath<?> that
&& Objects.equals( this.getLhs(), that.getLhs() );
&& getLhs().equals( that.getLhs() );
}

@Override
public int hashCode() {
return getLhs().hashCode();
}

@Override
public boolean isCompatible(Object object) {
return object instanceof AnyDiscriminatorSqmPath<?> that
&& getLhs().isCompatible( that.getLhs() );
}

@Override
public int cacheHashCode() {
return getLhs().cacheHashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
import org.hibernate.query.sqm.tree.domain.SqmPath;
import org.hibernate.spi.NavigablePath;

import java.util.Objects;

/**
* {@link SqmPath} specialization for an embeddable discriminator
*
Expand Down Expand Up @@ -65,11 +63,22 @@ public <X> X accept(SemanticQueryWalker<X> walker) {
@Override
public boolean equals(Object object) {
return object instanceof EmbeddedDiscriminatorSqmPath<?> that
&& Objects.equals( this.getLhs(), that.getLhs() );
&& getLhs().equals( that.getLhs() );
}

@Override
public int hashCode() {
return getLhs().hashCode();
}

@Override
public boolean isCompatible(Object object) {
return object instanceof EmbeddedDiscriminatorSqmPath<?> that
&& getLhs().isCompatible( that.getLhs() );
}

@Override
public int cacheHashCode() {
return getLhs().cacheHashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.hibernate.query.sqm.tree.domain.SqmEntityDomainType;
import org.hibernate.spi.NavigablePath;

import java.util.Objects;

/**
* {@link SqmPath} specialization for an entity discriminator
Expand Down Expand Up @@ -79,11 +78,22 @@ public <X> X accept(SemanticQueryWalker<X> walker) {
@Override
public boolean equals(Object object) {
return object instanceof EntityDiscriminatorSqmPath<?> that
&& Objects.equals( this.getLhs(), that.getLhs() );
&& getLhs().equals( that.getLhs() );
}

@Override
public int hashCode() {
return getLhs().hashCode();
}

@Override
public boolean isCompatible(Object object) {
return object instanceof EntityDiscriminatorSqmPath<?> that
&& getLhs().isCompatible( that.getLhs() );
}

@Override
public int cacheHashCode() {
return getLhs().cacheHashCode();
}
}

This file was deleted.

This file was deleted.

Loading
Loading