public class JDBCServiceMethodDescription extends Object
Constructor and Description |
---|
JDBCServiceMethodDescription(String name,
String description)
A new service method with the given name and description.
|
Modifier and Type | Method and Description |
---|---|
JDBCServiceMethodDescription |
addArgument(String name,
String description,
Class<?> type)
Adds an argument for the query.
|
JDBCServiceMethodDescription |
query(String query)
The query mapped to this service method.
|
JDBCServiceMethodDescription |
queryResult(String name,
String description)
Adds a result for the query.
|
public JDBCServiceMethodDescription addArgument(String name, String description, Class<?> type)
Arguments need to be specified in the same order as they appear in the query.
name
- argument namedescription
- argument descriptiontype
- the expected type of the argumentpublic JDBCServiceMethodDescription queryResult(String name, String description)
The result must be specified if the query returns data (i.e. it is a SELECT) and must not be specified if the query does not return data (i.e. INSERT, UPDATE, DELETE, ...).
name
- the result namedescription
- the result descriptionpublic JDBCServiceMethodDescription query(String query)
query
- the queryCopyright © 2010–2015. All rights reserved.