Renamed getAllUsers to getUsers
Former-commit-id: 25666b0e14f38fa10625bc62460bc744be85736b
This commit is contained in:
parent
fa719a8b18
commit
9f9d0e73ee
2 changed files with 7 additions and 5 deletions
|
|
@ -35,7 +35,7 @@ public class PCOverviewHttpPage extends HalHttpPage {
|
||||||
|
|
||||||
DBConnection db = HalContext.getDB();
|
DBConnection db = HalContext.getDB();
|
||||||
|
|
||||||
List<User> users = User.getAllUsers(db);
|
List<User> users = User.getUsers(db);
|
||||||
|
|
||||||
ArrayList<PowerData> minDataList = new ArrayList<PowerData>();
|
ArrayList<PowerData> minDataList = new ArrayList<PowerData>();
|
||||||
ArrayList<PowerData> hourDataList = new ArrayList<PowerData>();
|
ArrayList<PowerData> hourDataList = new ArrayList<PowerData>();
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,16 @@ public class User extends DBBean{
|
||||||
return DBConnection.exec(stmt, DBBeanSQLResultHandler.create(User.class, db) );
|
return DBConnection.exec(stmt, DBBeanSQLResultHandler.create(User.class, db) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<User> getUsers(DBConnection db) throws SQLException{
|
||||||
|
PreparedStatement stmt = db.getPreparedStatement( "SELECT * FROM user" );
|
||||||
|
return DBConnection.exec(stmt, DBBeanSQLResultHandler.createList(User.class, db) );
|
||||||
|
}
|
||||||
|
|
||||||
public static User getUser(DBConnection db, int id) throws SQLException {
|
public static User getUser(DBConnection db, int id) throws SQLException {
|
||||||
return DBBean.load(db, User.class, id);
|
return DBBean.load(db, User.class, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<User> getAllUsers(DBConnection db) throws SQLException{
|
|
||||||
PreparedStatement stmt = db.getPreparedStatement( "SELECT * FROM user" );
|
|
||||||
return DBConnection.exec(stmt, DBBeanSQLResultHandler.createList(User.class, db) );
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUsername() {
|
public String getUsername() {
|
||||||
return username;
|
return username;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue