@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface Function
The annotated method must be a member of a Dao annotated interface.
@Dao
public interface EmployeeDao {
@Function
BigDecimal getSalary(@In Integer id, @Out Reference<String> name);
}
The method may throw following exceptions:
DomaNullPointerException if any of the method parameters are null
UnknownColumnException if ResultSet is used and a column is not found in
the result set
JdbcException if a JDBC related error occurs
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String |
catalog |
boolean |
ensureResultMapping
Whether to ensure that all entity properties are mapped to columns of a result set.
|
MapKeyNamingType |
mapKeyNaming
The naming convention for keys of
Map<Object, String>. |
java.lang.String |
name
The stored function name.
|
int |
queryTimeout
The query timeout in seconds.
|
boolean |
quote |
java.lang.String |
schema |
SqlLogType |
sqlLog |
public abstract java.lang.String catalog
public abstract java.lang.String name
If not specified, the annotated method name is used.
public abstract boolean quote
public abstract int queryTimeout
If not specified, Config.getQueryTimeout() is used.
Statement.setQueryTimeout(int)public abstract MapKeyNamingType mapKeyNaming
Map<Object, String>.
This value is used only if a result set is fetched as Map<Object, String> or List<Map<Object, String>>.
public abstract boolean ensureResultMapping
This value is used only if the result set is fetched as an entity or a entity list.
If true and there are some unmapped properties、 ResultMappingException is
thrown from the annotated method.
public abstract SqlLogType sqlLog