1 41 package com.mvnforum.db; 42 43 import java.sql.Date ; 44 import java.sql.Timestamp ; 45 import java.util.Collection ; 46 47 import net.myvietnam.mvncore.exception.AssertionException; 48 import net.myvietnam.mvncore.exception.CreateException; 49 import net.myvietnam.mvncore.exception.DatabaseException; 50 import net.myvietnam.mvncore.exception.DuplicateKeyException; 51 import net.myvietnam.mvncore.exception.ObjectNotFoundException; 52 53 59 public interface MemberDAO { 60 61 public static final String TABLE_NAME = DatabaseConfig.TABLE_PREFIX + "Member"; 62 63 public void findByPrimaryKey(int memberID) 64 throws ObjectNotFoundException, DatabaseException; 65 66 public void findByPrimaryKey2(int memberID, String memberName) 67 throws ObjectNotFoundException, DatabaseException; 68 69 public void findByAlternateKey_MemberName(String memberName) 70 throws ObjectNotFoundException, DatabaseException; 71 72 public void findByAlternateKey_MemberEmail(String memberEmail) 73 throws ObjectNotFoundException, DatabaseException; 74 75 public void deleteByPrimaryKey(int memberID) 76 throws DatabaseException; 77 78 public void create(String memberName, 79 String memberPassword, 80 String memberFirstEmail, 81 String memberEmail, 82 int memberEmailVisible, 83 int memberNameVisible, 84 String memberFirstIP, 85 String memberLastIP, 86 int memberViewCount, 87 int memberPostCount, 88 Timestamp memberCreationDate, 89 Timestamp memberModifiedDate, 90 Timestamp memberExpireDate, 91 Timestamp memberLastLogon, 92 int memberOption, 93 int memberStatus, 94 String memberActivateCode, 95 String memberTempPassword, 96 int memberMessageCount, 97 int memberMessageOption, 98 int memberPostsPerPage, 99 int memberWarnCount, 100 int memberVoteCount, 101 int memberVoteTotalStars, 102 int memberRewardPoints, 103 String memberTitle, 104 double memberTimeZone, 105 String memberSignature, 106 String memberAvatar, 107 String memberSkin, 108 String memberLanguage, 109 String memberFirstname, 110 String memberLastname, 111 int memberGender, 112 Date memberBirthday, 113 String memberAddress, 114 String memberCity, 115 String memberState, 116 String memberCountry, 117 String memberPhone, 118 String memberMobile, 119 String memberFax, 120 String memberCareer, 121 String memberHomepage, 122 String memberYahoo, 123 String memberAol, 124 String memberIcq, 125 String memberMsn, 126 String memberCoolLink1, 127 String memberCoolLink2) 128 throws CreateException, DatabaseException, DuplicateKeyException; 129 130 public void update(int memberID, int memberEmailVisible, 132 int memberNameVisible, 133 Timestamp memberModifiedDate, 134 int memberOption, 135 int memberStatus, 136 int memberMessageOption, 137 int memberPostsPerPage, 138 double memberTimeZone, 139 String memberSkin, 140 String memberLanguage, 141 String memberFirstname, 142 String memberLastname, 143 int memberGender, 144 Date memberBirthday, 145 String memberAddress, 146 String memberCity, 147 String memberState, 148 String memberCountry, 149 String memberPhone, 150 String memberMobile, 151 String memberFax, 152 String memberCareer, 153 String memberHomepage, 154 String memberYahoo, 155 String memberAol, 156 String memberIcq, 157 String memberMsn, 158 String memberCoolLink1, 159 String memberCoolLink2) 160 throws ObjectNotFoundException, DatabaseException; 161 162 public void updateEmail(int memberID, String memberEmail) 164 throws ObjectNotFoundException, DatabaseException, DuplicateKeyException; 165 166 public void updatePassword(int memberID, String memberPassword) 168 throws ObjectNotFoundException, DatabaseException; 169 170 public void updateTempPassword(int memberID, String memberTempPassword) 172 throws ObjectNotFoundException, DatabaseException; 173 174 public void updateActivateCode(int memberID, String memberActivateCode) 176 throws ObjectNotFoundException, DatabaseException; 177 178 public void updateAvatar(int memberID, String memberAvatar) 180 throws ObjectNotFoundException, DatabaseException; 181 182 public void updateSignature(int memberID, String memberSignature) 184 throws ObjectNotFoundException, DatabaseException; 185 186 public void updateTitle(int memberID, String memberTitle) 188 throws ObjectNotFoundException, DatabaseException; 189 190 public void updateLastLogon(int memberID, Timestamp memberLastLogon, String lastIP) 192 throws ObjectNotFoundException, DatabaseException; 193 194 public String getPassword(int memberID) 195 throws ObjectNotFoundException, DatabaseException; 196 197 public String getTempPassword(int memberID) 198 throws ObjectNotFoundException, DatabaseException; 199 200 public String getActivateCode(int memberID) 201 throws ObjectNotFoundException, DatabaseException; 202 203 public MemberBean getMember_forViewCurrentMember(int memberID) 204 throws ObjectNotFoundException, DatabaseException; 205 206 public MemberBean getMember_forEditCurrentMember(int memberID) 207 throws ObjectNotFoundException, DatabaseException; 208 209 public MemberBean getMember_forPublic(int memberID) 210 throws ObjectNotFoundException, DatabaseException; 211 212 public int getNumberOfMembers() 213 throws AssertionException, DatabaseException; 214 215 public int getNumberOfMembers_inMemberStatus(int memberStatus) 216 throws AssertionException, DatabaseException; 217 218 public int getNumberOfMembers_inActivationStatus(boolean activationStatus) 219 throws AssertionException, DatabaseException; 220 221 224 public int getMemberIDFromMemberName(String memberName) 225 throws ObjectNotFoundException, DatabaseException; 226 227 228 public int getMemberIDFromMemberEmail(String memberEmail) 229 throws ObjectNotFoundException, DatabaseException; 230 231 public Collection getMembers_withSortSupport_limit(int offset, int rowsToReturn, String sort, String order) 232 throws IllegalArgumentException , DatabaseException; 233 234 240 public Collection getEnableMembers_inActivationStatus(String kind) 241 throws DatabaseException; 242 243 public void updateStatus(int memberID, int memberStatus) 245 throws ObjectNotFoundException, DatabaseException; 246 247 public void updatePostCount(int memberID, int memberPostCount) 249 throws ObjectNotFoundException, DatabaseException; 250 251 254 public void increaseViewCount(int memberID) 255 throws DatabaseException, ObjectNotFoundException; 256 257 260 public void increasePostCount(int memberID) 261 throws DatabaseException, ObjectNotFoundException; 262 263 public Collection getMembers_inExpire_limit(Timestamp expireDate, int offset, int rowsToReturn, String sort, String order) 264 throws IllegalArgumentException , DatabaseException; 265 266 public int getNumberOfMembers_inExpire(Timestamp expireDate) 267 throws AssertionException, DatabaseException; 268 269 public void updateMember_expireDate(int memberID, Timestamp expireDate) 271 throws ObjectNotFoundException, DatabaseException; 272 273 public Collection getMembers() 274 throws DatabaseException; 275 276 public Collection getEnableMembers_inGroup(int groupID) 277 throws DatabaseException; 278 279 public Collection getForumsAuthorizedMembers() 280 throws DatabaseException; 281 282 public Collection getAuthorizedMembers() 283 throws DatabaseException; 284 285 public Collection getNonActivatedNoPostMembers(Timestamp before) 286 throws DatabaseException; 287 288 } 289 | Popular Tags |