File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed
jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments