|
20 | 20 |
|
21 | 21 | import java.util.Map; |
22 | 22 | import java.util.stream.Stream; |
23 | | - |
24 | 23 | /** |
25 | | - * A {@link JNoSQLDocumentTemplate} to arangoDB |
| 24 | + * A template specialization for ArangoDB that includes capabilities for executing ArangoDB query language, AQL. |
| 25 | + * This template extends {@link JNoSQLDocumentTemplate} and provides methods for executing AQL queries with various |
| 26 | + * options. |
26 | 27 | */ |
27 | 28 | public interface ArangoDBTemplate extends JNoSQLDocumentTemplate { |
28 | 29 |
|
29 | 30 | /** |
30 | | - * Executes ArangoDB query language, AQL. |
31 | | - * <p>FOR u IN users FILTER u.status == @status RETURN u </p> |
| 31 | + * Executes an ArangoDB query using the ArangoDB Query Language (AQL). |
| 32 | + * |
| 33 | + * <p>Example query: {@code FOR u IN users FILTER u.status == @status RETURN u}</p> |
| 34 | + * |
| 35 | + * <p>The conversion from the query result to entities will happen at the Eclipse JNoSQL side. |
| 36 | + * It will utilize and consider all the annotations supported by Eclipse JNoSQL.</p> |
32 | 37 | * |
33 | | - * @param <T> entity class |
34 | | - * @param query the query |
35 | | - * @param params the named queries |
36 | | - * @return the query result |
37 | | - * @throws NullPointerException when either query or params are null |
| 38 | + * @param <T> the entity class |
| 39 | + * @param query the AQL query |
| 40 | + * @param params the named parameters for the query |
| 41 | + * @return a {@link Stream} of entities representing the query result |
| 42 | + * @throws NullPointerException when either the query or params are null |
38 | 43 | */ |
39 | 44 | <T> Stream<T> aql(String query, Map<String, Object> params); |
40 | 45 |
|
41 | 46 | /** |
42 | | - * Executes ArangoDB query language, AQL. |
43 | | - * <p>FOR u IN users FILTER u.status == @status RETURN u </p> |
| 47 | + * Executes an ArangoDB query using the ArangoDB Query Language (AQL). |
| 48 | + * |
| 49 | + * <p>Example query: {@code FOR u IN users FILTER u.status == @status RETURN u}</p> |
| 50 | + * |
| 51 | + * <p>The serialization of the query result will happen at the ArangoDB side using |
| 52 | + * {@link com.arangodb.ArangoDatabase#query(String, Class)}. This serialization does not have any converter support |
| 53 | + * at the mapper side, |
| 54 | + * thus it will ignore any annotations that Eclipse JNoSQL has.</p> |
44 | 55 | * |
45 | | - * @param query the query |
46 | | - * @param params named query |
47 | | - * @param type The type of the result |
48 | | - * @param <T> the type |
49 | | - * @return the query result |
50 | | - * @throws NullPointerException when either query or params are null |
| 56 | + * @param query the AQL query |
| 57 | + * @param params the named parameters for the query |
| 58 | + * @param type the type of the result |
| 59 | + * @param <T> the type |
| 60 | + * @return a {@link Stream} of the specified type representing the query result |
| 61 | + * @throws NullPointerException when either the query or params are null |
51 | 62 | */ |
52 | 63 | <T> Stream<T> aql(String query, Map<String, Object> params, Class<T> type); |
53 | 64 |
|
54 | 65 | /** |
55 | | - * Executes ArangoDB query language, AQL. |
56 | | - * <p>FOR u IN users FILTER u.status == @status RETURN u </p> |
| 66 | + * Executes an ArangoDB query using the ArangoDB Query Language (AQL) with an empty parameter map. |
57 | 67 | * |
58 | | - * @param query the query |
59 | | - * @param type The type of the result |
60 | | - * @param <T> the type |
61 | | - * @return the query result |
62 | | - * @throws NullPointerException when either query or values are null |
| 68 | + * <p>Example query: {@code FOR u IN users FILTER u.status == @status RETURN u}</p> |
| 69 | + * |
| 70 | + * <p>The serialization of the query result will happen at the ArangoDB side using |
| 71 | + * {@link com.arangodb.ArangoDatabase#query(String, Class)}. This serialization does not have any converter support |
| 72 | + * at the mapper side, |
| 73 | + * thus it will ignore any annotations that Eclipse JNoSQL has.</p> |
| 74 | + * |
| 75 | + * @param query the AQL query |
| 76 | + * @param type the type of the result |
| 77 | + * @param <T> the type |
| 78 | + * @return a {@link Stream} of the specified type representing the query result |
| 79 | + * @throws NullPointerException when either the query or type are null |
63 | 80 | */ |
64 | 81 | <T> Stream<T> aql(String query, Class<T> type); |
65 | | - |
66 | | - |
67 | 82 | } |
0 commit comments