Skip to content

Commit

Permalink
add: 为DaoStatement接口添加一个getNumber方法
Browse files Browse the repository at this point in the history
  • Loading branch information
wendal committed Oct 14, 2013
1 parent 3828c36 commit c05cb03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/org/nutz/dao/impl/sql/NutStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ public <T> T getObject(Class<T> classOfT) {
public int getInt() {
return getObject(Integer.class);
}

public Number getNumber() {
return getObject(Number.class);
}

public String getString() {
return getObject(String.class);
Expand Down
2 changes: 2 additions & 0 deletions src/org/nutz/dao/sql/DaoStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ public interface DaoStatement {
* @return 将结果对象作为 int 返回
*/
int getInt();

Number getNumber();

/**
* @return 将结果对象作为 String 返回
Expand Down

0 comments on commit c05cb03

Please sign in to comment.