@@ -69,11 +69,10 @@ public final class EscapeCharacter {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(o instanceof EscapeCharacter)) {
|
||||
if (!(o instanceof EscapeCharacter that)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
EscapeCharacter that = (EscapeCharacter) o;
|
||||
return escapeCharacter == that.escapeCharacter;
|
||||
}
|
||||
|
||||
|
||||
@@ -279,12 +279,10 @@ class ParameterBinding {
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
|
||||
if (!(obj instanceof LikeParameterBinding)) {
|
||||
if (!(obj instanceof LikeParameterBinding that)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
LikeParameterBinding that = (LikeParameterBinding) obj;
|
||||
|
||||
return super.equals(obj) && this.type.equals(that.type);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,11 +77,10 @@ class ProcedureParameter {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(o instanceof ProcedureParameter)) {
|
||||
if (!(o instanceof ProcedureParameter that)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ProcedureParameter that = (ProcedureParameter) o;
|
||||
return Objects.equals(name, that.name) && mode == that.mode && Objects.equals(type, that.type);
|
||||
}
|
||||
|
||||
|
||||
@@ -223,12 +223,10 @@ public final class BeanDefinitionUtils {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(o instanceof EntityManagerFactoryBeanDefinition)) {
|
||||
if (!(o instanceof EntityManagerFactoryBeanDefinition that)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
EntityManagerFactoryBeanDefinition that = (EntityManagerFactoryBeanDefinition) o;
|
||||
|
||||
if (!ObjectUtils.nullSafeEquals(beanName, that.beanName)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -58,11 +58,9 @@ public class ItemId implements Serializable {
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (!(o instanceof ItemId))
|
||||
if (!(o instanceof ItemId itemId))
|
||||
return false;
|
||||
|
||||
ItemId itemId = (ItemId) o;
|
||||
|
||||
if (id != null ? !id.equals(itemId.id) : itemId.id != null)
|
||||
return false;
|
||||
return manufacturerId != null ? manufacturerId.equals(itemId.manufacturerId) : itemId.manufacturerId == null;
|
||||
|
||||
@@ -42,11 +42,9 @@ public class ItemSiteId implements Serializable {
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (!(o instanceof ItemSiteId))
|
||||
if (!(o instanceof ItemSiteId that))
|
||||
return false;
|
||||
|
||||
ItemSiteId that = (ItemSiteId) o;
|
||||
|
||||
if (item != null ? !item.equals(that.item) : that.item != null)
|
||||
return false;
|
||||
return site != null ? site.equals(that.site) : that.site == null;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.springframework.data.jpa.domain.sample;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.persistence.Access;
|
||||
import jakarta.persistence.AccessType;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.IdClass;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Entity
|
||||
@IdClass(SampleWithIdClass.SampleWithIdClassPK.class)
|
||||
@Access(AccessType.FIELD)
|
||||
@@ -29,12 +29,10 @@ public class SampleWithIdClass {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(obj instanceof SampleWithIdClassPK)) {
|
||||
if (!(obj instanceof SampleWithIdClassPK that)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
SampleWithIdClassPK that = (SampleWithIdClassPK) obj;
|
||||
|
||||
return this.first.equals(that.first) && this.second.equals(that.second);
|
||||
}
|
||||
|
||||
|
||||
@@ -262,12 +262,10 @@ public class User {
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
|
||||
if (!(obj instanceof User)) {
|
||||
if (!(obj instanceof User that)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
User that = (User) obj;
|
||||
|
||||
if ((null == this.getId()) || (null == that.getId())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user