1 43 package net.jforum.dao; 44 45 import java.security.NoSuchAlgorithmException ; 46 import java.util.List ; 47 48 import net.jforum.entities.User; 49 50 60 public interface UserDAO 61 { 62 70 public User selectById(int userId) throws Exception ; 71 72 81 public User selectByName(String username) throws Exception ; 82 83 89 public List selectAll() throws Exception ; 90 91 98 public List selectAllWithKarma() throws Exception ; 99 100 109 public List selectAllByGroup(int groupId, int start, int count) throws Exception ; 110 111 120 public List selectAllWithKarma(int startFrom, int count) throws Exception ; 121 122 136 public List findByName(String input, boolean exactMath) throws Exception ; 137 138 146 public List selectAll(int startFrom, int count) throws Exception ; 147 148 149 156 public void delete(int userId) throws Exception ; 157 158 169 public void undelete(int userId) throws Exception ; 170 171 178 public void update(User user) throws Exception ; 179 180 189 public int addNew(User user) throws Exception ; 190 191 198 public void addNewWithId(User user) throws Exception ; 199 200 211 public void setActive(int userId, boolean active) throws Exception ; 212 213 219 public void setRanking(int userId, int rankingId) throws Exception ; 220 221 227 public void incrementPosts(int userId) throws Exception ; 228 229 235 public void decrementPosts(int userId) throws Exception ; 236 237 246 public User getLastUserInfo() throws Exception ; 247 248 254 public int getTotalUsers() throws Exception ; 255 256 263 public int getTotalUsersByGroup(int groupId) throws Exception ; 264 265 271 public boolean isDeleted(int user_id) throws Exception ; 272 273 281 public boolean isUsernameRegistered(String username) throws Exception ; 282 283 291 public User validateLogin(String username, String password) throws NoSuchAlgorithmException , Exception ; 292 293 300 public void addToGroup(int userId, int[] groupId) throws Exception ; 301 302 308 public void removeFromGroup(int userId, int[] groupId) throws Exception ; 309 310 319 public void writeLostPasswordHash(String email, String hash) throws Exception ; 320 321 329 public boolean validateLostPasswordHash(String email, String hash) throws Exception ; 330 331 338 public void saveNewPassword(String password, String email) throws Exception ; 339 340 347 public String getUsernameByEmail(String email) throws Exception ; 348 349 357 public boolean validateActivationKeyHash(int userId , String hash) throws Exception ; 358 359 365 public void writeUserActive(int userId) throws Exception ; 366 367 378 public void updateUsername(int userId, String username) throws Exception ; 379 380 390 public boolean hasUsernameChanged(int userId, String usernameToCheck) throws Exception ; 391 392 } 393 | Popular Tags |