taskbyidquery.java
来自「Java的框架」· Java 代码 · 共 50 行
JAVA
50 行
package mcaps.apps.prrm.task.dao.jdbc.query;
import javax.sql.DataSource;
import mcaps.apps.prrm.task.dao.util.TaskField;
import mcap.core.base.dao.util.SortOrder;
/**
* This class extends the TaskQuery class to generate the
* precompiled sql query statements to the task table using
* the id as query parameter.
*
* @author jov
* @date Sep 23, 2005
* @version 1.0.1.0
*/
public class TaskByIdQuery extends TaskQuery {
/**
* Default constructor which accepts the datasource and
* initialize the super class for creation of precompiled
* sql statement for querying database table. The ID is used
* as query parameter.
* @param ds the datasource to the database
*/
public TaskByIdQuery(DataSource ds) {
super(ds,
TaskField.FIELDS[TaskField.ID] + " = ?",
new int[]{TaskField.FIELDTYPES[TaskField.ID]});
}
/**
* Constructor which accepts the datasource and
* initialize the super class for creation of precompiled
* sql statement for querying database table. The ID is used
* as query parameter. This constructor enable the choice for
* sorted query results.
* @param ds the datasource to the database
* @param sortColumn the column used to sort the records
* @param order the sort order for sorting the records
*/
public TaskByIdQuery(DataSource ds, int sortColumn, SortOrder order) {
super(ds,
TaskField.FIELDS[TaskField.ID] + " = ?",
new int[]{TaskField.FIELDTYPES[TaskField.ID]},
sortColumn,
order);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?