Skip to content

Commit

Permalink
cleanup jpars module
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Sep 18, 2021
1 parent 23cc225 commit 0e18d6b
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 52 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -31,6 +31,8 @@

import org.eclipse.persistence.annotations.PrivateOwned;

import java.util.Objects;

@NamedQueries({
@NamedQuery(
name="User.all",
Expand Down Expand Up @@ -123,7 +125,7 @@ public void setVersion(int version) {
}

public boolean equals(Object object){
if (object == null || !(object instanceof StaticUser)){
if (!(object instanceof StaticUser)){
return false;
}
StaticUser user = (StaticUser)object;
Expand All @@ -136,5 +138,8 @@ public boolean equals(Object object){
return id == user.getId() && name.equals(user.getName()) && (address == null || address.getId() == user.getAddress().getId());
}


@Override
public int hashCode() {
return Objects.hash(id, name, address);
}
}

0 comments on commit 0e18d6b

Please sign in to comment.