Skip to content

Commit

Permalink
feat: create drink
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <[email protected]>
  • Loading branch information
otaviojava committed Dec 24, 2024
1 parent 09055da commit 291385f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tck/src/main/java/jakarta/nosql/tck/entities/Drink.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,26 @@
import jakarta.nosql.Id;
import jakarta.nosql.Inheritance;

import java.util.Objects;

@Inheritance
@DiscriminatorColumn("type")
public class Drink {

@Id
protected String id;


@Override
public boolean equals(Object object) {
if (!(object instanceof Drink drink)) {
return false;
}
return Objects.equals(id, drink.id);
}

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

0 comments on commit 291385f

Please sign in to comment.