diff --git a/jnosql-oracle/src/main/java/org/eclipse/jnosql/databases/oracle/mapping/OracleRepository.java b/jnosql-oracle/src/main/java/org/eclipse/jnosql/databases/oracle/mapping/OracleRepository.java new file mode 100644 index 000000000..c017f85dc --- /dev/null +++ b/jnosql-oracle/src/main/java/org/eclipse/jnosql/databases/oracle/mapping/OracleRepository.java @@ -0,0 +1,2 @@ +package org.eclipse.jnosql.databases.oracle.mapping;public interface OracleRepository { +} diff --git a/jnosql-oracle/src/main/java/org/eclipse/jnosql/databases/oracle/mapping/SQL.java b/jnosql-oracle/src/main/java/org/eclipse/jnosql/databases/oracle/mapping/SQL.java index fa59529ba..eb019f9c2 100644 --- a/jnosql-oracle/src/main/java/org/eclipse/jnosql/databases/oracle/mapping/SQL.java +++ b/jnosql-oracle/src/main/java/org/eclipse/jnosql/databases/oracle/mapping/SQL.java @@ -14,5 +14,46 @@ */ package org.eclipse.jnosql.databases.oracle.mapping; + +/** + * The {@code SQL} annotation is a custom annotation used to associate SQL query strings + * with methods or elements in your code. + *

+ * When applied to a method, field, or other element, this annotation provides a convenient + * way to specify an SQL query that should be associated with that element. + *

+ *

+ * For example, you can use this annotation to specify a SQL query for a method as follows: + *

+ *
+ * {@code
+ * @SQL("SELECT * FROM users WHERE status = 'active'")
+ * public void getUserData() {
+ *     // Method implementation
+ * }
+ * }
+ * 
+ *

+ * In the context of an {@code OracleRepository}, you can use the {@code @SQL} annotation + * to define custom SQL queries for repository methods. Here's an example: + *

+ *
+ * {@code
+ * public interface UserRepository extends OracleRepository {
+ *     // Find all active users using a custom SQL query
+ *     @SQL("SELECT * FROM users WHERE status = 'active'")
+ *     List findActiveUsers();
+ * }
+ * }
+ * 
+ *

+ * In this example, the {@code @SQL} annotation is used to define a custom SQL query for the + * {@code findActiveUsers} method in an {@code OracleRepository} interface, allowing you + * to execute the specified SQL query when calling the repository method. + *

+ */ public @interface SQL { + + + String value(); }