Skip to content

Commit a6d9a13

Browse files
committed
tests(integration): add Author class for testing purposes
Signed-off-by: Maximillian Arruda <[email protected]>
1 parent 60de727 commit a6d9a13

File tree

1 file changed

+59
-0
lines changed
  • jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* Copyright (c) 2023 Contributors to the Eclipse Foundation
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* and Apache License v2.0 which accompanies this distribution.
6+
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
7+
* and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
8+
*
9+
* You may elect to redistribute this code under either of these licenses.
10+
*
11+
* Contributors:
12+
*
13+
* Maximillian Arruda
14+
*
15+
*/
16+
17+
package org.eclipse.jnosql.databases.elasticsearch.integration;
18+
19+
import jakarta.nosql.Column;
20+
import jakarta.nosql.Entity;
21+
22+
import java.util.Objects;
23+
24+
@Entity
25+
public final class Author {
26+
27+
@Column("name")
28+
private final String name;
29+
30+
public Author(
31+
@Column("name")
32+
String name) {
33+
this.name = name;
34+
}
35+
36+
public String name() {
37+
return name;
38+
}
39+
40+
@Override
41+
public boolean equals(Object obj) {
42+
if (obj == this) return true;
43+
if (obj == null || obj.getClass() != this.getClass()) return false;
44+
var that = (Author) obj;
45+
return Objects.equals(this.name, that.name);
46+
}
47+
48+
@Override
49+
public int hashCode() {
50+
return Objects.hash(name);
51+
}
52+
53+
@Override
54+
public String toString() {
55+
return "Author[" +
56+
"name=" + name + ']';
57+
}
58+
59+
}

0 commit comments

Comments
 (0)