rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
zigDepth, min,
0.0, min,
private void renderLocation( Graphics2D g, Location loc, SequenceRenderContext context ) { Rectangle2D.Double block = new Rectangle2D.Double(); double min = context.sequenceToGraphics(loc.getMin()); double max = context.sequenceToGraphics(loc.getMax()+1); if(context.getDirection() == context.HORIZONTA...
private Post fillPost(ResultSet rs) throws Exception
private Post fillPost(ResultSet rs) throws SQLException
private Post fillPost(ResultSet rs) throws Exception { Post post = new Post(); post.setId(rs.getInt("post_id")); post.setTopicId(rs.getInt("topic_id")); post.setForumId(rs.getInt("forum_id")); post.setUserId(rs.getInt("user_id")); Timestamp postTime = rs.getTimestamp("post_time"); post.setTime(postTime); pos...
public List listRecipients() throws Exception
public List listRecipients()
public List listRecipients() throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectAllRecipients"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); List recipients = new ArrayList(); ResultSet rs = p.executeQuery(); String mail = null; while (rs.next...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query);
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(query);
public List listRecipients() throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectAllRecipients"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); List recipients = new ArrayList(); ResultSet rs = p.executeQuery(); String mail = null; while (rs.next...
List recipients = new ArrayList(); ResultSet rs = p.executeQuery();
List recipients = new ArrayList(); rs = p.executeQuery();
public List listRecipients() throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectAllRecipients"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); List recipients = new ArrayList(); ResultSet rs = p.executeQuery(); String mail = null; while (rs.next...
String mail = null; while (rs.next()) { mail = rs.getString("user_email"); if(mail != null && !mail.trim().equals("") ) recipients.add(mail); }
String mail = null; while (rs.next()) { mail = rs.getString("user_email"); if(mail != null && !mail.trim().equals("") ) { recipients.add(mail); } }
public List listRecipients() throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectAllRecipients"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); List recipients = new ArrayList(); ResultSet rs = p.executeQuery(); String mail = null; while (rs.next...
rs.close(); p.close(); return recipients; }
return recipients; } catch (SQLException e) { String es = "Erorr listRecipients()"; log.error(es, e); throw new RuntimeException(es, e); } finally { DbUtils.close(rs, p); } }
public List listRecipients() throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectAllRecipients"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); List recipients = new ArrayList(); ResultSet rs = p.executeQuery(); String mail = null; while (rs.next...
public List selectLastPosts(Date firstDate, Date lastDate) throws Exception
public List selectLastPosts(Date firstDate, Date lastDate)
public List selectLastPosts(Date firstDate, Date lastDate) throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectPosts"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setTimestamp(1, new Timestamp(firstDate.getTime())); p.setTimestamp(2, new Timestamp(l...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setTimestamp(1, new Timestamp(firstDate.getTime())); p.setTimestamp(2, new Timestamp(lastDate.getTime()));
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(query); p.setTimestamp(1, new Timestamp(firstDate.getTime())); p.setTimestamp(2, new Timestamp(lastDate.getTime()));
public List selectLastPosts(Date firstDate, Date lastDate) throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectPosts"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setTimestamp(1, new Timestamp(firstDate.getTime())); p.setTimestamp(2, new Timestamp(l...
List posts = new ArrayList(); ResultSet rs = p.executeQuery();
List posts = new ArrayList(); rs = p.executeQuery();
public List selectLastPosts(Date firstDate, Date lastDate) throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectPosts"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setTimestamp(1, new Timestamp(firstDate.getTime())); p.setTimestamp(2, new Timestamp(l...
while (rs.next()) { posts.add(this.fillPost(rs)); } rs.close(); p.close();
while (rs.next()) { posts.add(this.fillPost(rs)); }
public List selectLastPosts(Date firstDate, Date lastDate) throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectPosts"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setTimestamp(1, new Timestamp(firstDate.getTime())); p.setTimestamp(2, new Timestamp(l...
return posts; }
return posts; } catch (SQLException e) { String es = "Erorr selectLastPosts()"; log.error(es, e); throw new RuntimeException(es, e); } finally { DbUtils.close(rs, p); } }
public List selectLastPosts(Date firstDate, Date lastDate) throws Exception { String query = SystemGlobals.getSql("SummaryDAO.selectPosts"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setTimestamp(1, new Timestamp(firstDate.getTime())); p.setTimestamp(2, new Timestamp(l...
public KarmaStatus getPostKarma(int postId) throws Exception;
public KarmaStatus getPostKarma(int postId) ;
public KarmaStatus getPostKarma(int postId) throws Exception;
public List listRecipients() throws Exception;
public List listRecipients() ;
public List listRecipients() throws Exception;
public List selectLastPosts(Date firstDate, Date lastDate) throws Exception;
public List selectLastPosts(Date firstDate, Date lastDate) ;
public List selectLastPosts(Date firstDate, Date lastDate) throws Exception;
try { ITypedRegion partition = document.getPartition(offset); mCurrentOffset = partition.getOffset(); mCurrentLength = partition.getLength(); mEmpty = false; } catch (BadLocationException exception) { }
mCurrentOffset = offset; mCurrentLength = length; mEmpty = false;
public void setRange(IDocument document, int offset, int length) { try { ITypedRegion partition = document.getPartition(offset); mCurrentOffset = partition.getOffset(); mCurrentLength = partition.getLength(); mEmpty = false; } catch (BadLocationExcept...
public CommonGroupLoader(String dirStr, StringTemplateErrorListener errors) { super(dirStr,errors);
public CommonGroupLoader(StringTemplateErrorListener errors) { super(errors);
public CommonGroupLoader(String dirStr, StringTemplateErrorListener errors) { super(dirStr,errors); }
public void delete() throws Exception
public void delete()
public void delete() throws Exception { String[] ids = this.request.getParameterValues("id"); if (ids != null) { SmilieDAO dao = DataAccessDriver.getInstance().newSmilieDAO(); for (int i = 0; i < ids.length; i++) { int id = Integer.parseInt(ids[i]); Smilie s = dao.selectById(id); dao.delete(id)...
public void edit() throws Exception
public void edit()
public void edit() throws Exception { int id = 1; if (this.request.getParameter("id") != null) { id = this.request.getIntParameter("id"); } this.setTemplateName(TemplateKeys.SMILIES_EDIT); this.context.put("smilie", DataAccessDriver.getInstance().newSmilieDAO().selectById(id)); this.context.put("action", "...
public void editSave() throws Exception
public void editSave()
public void editSave() throws Exception { Smilie s = DataAccessDriver.getInstance().newSmilieDAO().selectById(this.request.getIntParameter("id")); s.setCode(this.request.getParameter("code")); if (this.request.getObjectParameter("smilie_img") != null) { String imgName = this.processUpload(); s.setUrl(SystemGl...
public void insertSave() throws Exception
public void insertSave()
public void insertSave() throws Exception { Smilie s = new Smilie(); s.setCode(this.request.getParameter("code")); String imgName = this.processUpload(); s.setUrl(SystemGlobals.getValue(ConfigKeys.SMILIE_IMAGE_PATTERN).replaceAll("#IMAGE#", imgName)); s.setDiskName(imgName); DataAccessDriver.getInstance()....
public void list() throws Exception
public void list()
public void list() throws Exception { this.context.put("smilies", SmiliesRepository.getSmilies()); this.setTemplateName(TemplateKeys.SMILIES_LIST); }
private String processUpload() throws Exception
private String processUpload()
private String processUpload() throws Exception { String imgName = ""; if (this.request.getObjectParameter("smilie_img") != null) { FileItem item = (FileItem)this.request.getObjectParameter("smilie_img"); UploadUtils uploadUtils = new UploadUtils(item); imgName = MD5.crypt(item.getName()); uploadUtils.s...
public Smilie selectById(int id) throws Exception;
public Smilie selectById(int id) ;
public Smilie selectById(int id) throws Exception;
public void delete(int id) throws Exception;
public void delete(int id) ;
public void delete(int id) throws Exception;
public void update(Smilie smilie) throws Exception;
public void update(Smilie smilie) ;
public void update(Smilie smilie) throws Exception;
public int addNew(Smilie smilie) throws Exception;
public int addNew(Smilie smilie) ;
public int addNew(Smilie smilie) throws Exception;
public void saveUploadedFile(String filename) throws Exception
public void saveUploadedFile(String filename)
public void saveUploadedFile(String filename) throws Exception { BufferedInputStream inputStream = null; FileOutputStream outputStream = null; try { inputStream = new BufferedInputStream(this.item.getInputStream()); outputStream = new FileOutputStream(filename); int c = 0; byte[] b = new byte[4096]; ...
int c = 0;
int c;
public void saveUploadedFile(String filename) throws Exception { BufferedInputStream inputStream = null; FileOutputStream outputStream = null; try { inputStream = new BufferedInputStream(this.item.getInputStream()); outputStream = new FileOutputStream(filename); int c = 0; byte[] b = new byte[4096]; ...
outputStream.flush(); outputStream.close(); }
try { outputStream.flush(); outputStream.close(); } catch (IOException e) { } }
public void saveUploadedFile(String filename) throws Exception { BufferedInputStream inputStream = null; FileOutputStream outputStream = null; try { inputStream = new BufferedInputStream(this.item.getInputStream()); outputStream = new FileOutputStream(filename); int c = 0; byte[] b = new byte[4096]; ...
inputStream.close(); }
try { inputStream.close(); } catch (IOException e) { } }
public void saveUploadedFile(String filename) throws Exception { BufferedInputStream inputStream = null; FileOutputStream outputStream = null; try { inputStream = new BufferedInputStream(this.item.getInputStream()); outputStream = new FileOutputStream(filename); int c = 0; byte[] b = new byte[4096]; ...
SAXParser parser = new SAXParser();
XMLReader parser; try { SAXParserFactory spf = SAXParserFactory.newInstance(); spf.setValidating(false); spf.setNamespaceAware(true); parser = spf.newSAXParser().getXMLReader(); } catch (Exception ex) { throw new IOException("Error creating SAX parser"); }
public boolean readSequence(BufferedReader reader, SymbolTokenization symParser, SeqIOListener listener) throws IOException { try { // set up processing pipeline InputSource is = new InputSource(reader); GAMEHandler handler = new GAMEHandler(listener); SA...
if (fExceptionListener != null) { if (isBuffered()) { fContents.append("Connection closed!\n"); } fireStreamAppended("Connection closed!\n"); fExceptionListener.exceptionOccurred(se); }
notifiedSocketException(se); return;
private void read() { lastSleep = System.currentTimeMillis(); long currentTime = lastSleep; byte[] bytes= new byte[BUFFER_SIZE]; int read = 0; while (read >= 0) { try { if (fKilled) { break; } read= fStream...
notifiedSocketException(null);
private void read() { lastSleep = System.currentTimeMillis(); long currentTime = lastSleep; byte[] bytes= new byte[BUFFER_SIZE]; int read = 0; while (read >= 0) { try { if (fKilled) { break; } read= fStream...
public TRParen(int line, int pos)
public TRParen()
public TRParen(int line, int pos) { super.setText(")"); setLine(line); setPos(pos); }
setLine(line); setPos(pos);
public TRParen(int line, int pos) { super.setText(")"); setLine(line); setPos(pos); }
if (currentAtOrder != null) {
if (currentAtOrder != null && c.getId() != currentAtOrder.getId()) {
public synchronized static void reloadCategory(Category c) { Category current = (Category)cache.get(FQN, Integer.toString(c.getId())); Category currentAtOrder = findCategoryByOrder(c.getOrder()); Set tmpSet = new TreeSet(new CategoryOrderComparator()); tmpSet.addAll((Set)cache.get(FQN, CATEGORIES_SET)); if (c...
public void update(Properties newValues) throws IOException
public void update(String name, String value) throws IOException
public void update(Properties newValues) throws IOException { Properties p = new Properties(); p.load(new FileInputStream(SystemGlobals.getApplicationResourceDir() +"config/SystemGlobals.properties")); for (Iterator iter = newValues.entrySet().iterator(); iter.hasNext(); ) { Map.Entry entry = (Map.Entry)iter.ne...
for (Iterator iter = newValues.entrySet().iterator(); iter.hasNext(); ) { Map.Entry entry = (Map.Entry)iter.next();
if (p.get(name) != null) { p.setProperty(name, value);
public void update(Properties newValues) throws IOException { Properties p = new Properties(); p.load(new FileInputStream(SystemGlobals.getApplicationResourceDir() +"config/SystemGlobals.properties")); for (Iterator iter = newValues.entrySet().iterator(); iter.hasNext(); ) { Map.Entry entry = (Map.Entry)iter.ne...
p.setProperty((String)entry.getKey(), (String)entry.getValue()); } p.store(new FileOutputStream(SystemGlobals.getApplicationResourceDir() +"config/SystemGlobals.properties", false), null);
p.store(new FileOutputStream(SystemGlobals.getApplicationResourceDir() +"config/SystemGlobals.properties", false), null); }
public void update(Properties newValues) throws IOException { Properties p = new Properties(); p.load(new FileInputStream(SystemGlobals.getApplicationResourceDir() +"config/SystemGlobals.properties")); for (Iterator iter = newValues.entrySet().iterator(); iter.hasNext(); ) { Map.Entry entry = (Map.Entry)iter.ne...
public TypedLinkedList(Cast cast)
public TypedLinkedList()
public TypedLinkedList(Cast cast) { super(); this.cast = cast; }
this.cast = cast;
cast = NoCast.instance;
public TypedLinkedList(Cast cast) { super(); this.cast = cast; }
document.setDocumentPartitioner(partitioner);
public void setup(IDocument document) { String[] partitions = new String[] { SchemePartitionScanner.SCHEME_STRING, SchemePartitionScanner.SCHEME_COMMENT, SchemePartitionScanner.SCHEME_HERESTRING }; IDocumentPartitioner partitioner = new FastPartitioner(new SchemePartitionScann...
assertNull(ns.getDescription()); try{ ns.setDescription(desc); }catch(Exception ex){ fail("Was not expecting "+ex.getClass().getName()); }
public void testGetDescription() { System.out.println("testGetDescription"); //should be null until set assertEquals(desc, ns.getDescription()); }
public static Object newDummy( final String name ) { return new Object() { public String toString() { return name; } };
public static Object newDummy( Class interfaceClass ) { return newDummy(interfaceClass, "dummy" + Formatting.classShortName(interfaceClass));
public static Object newDummy( final String name ) { return new Object() { public String toString() { return name; } }; }
public int addNew(User user) throws Exception
public int addNew(User user)
public int addNew(User user) throws Exception { PreparedStatement p = this.getStatementForAutoKeys("UserModel.addNew"); this.initNewUser(user, p); this.setAutoGeneratedKeysQuery(SystemGlobals.getSql("UserModel.lastGeneratedUserId")); int id = this.executeAutoKeysQuery(p); p.close(); this.addToGroup(id, ne...
PreparedStatement p = this.getStatementForAutoKeys("UserModel.addNew"); this.initNewUser(user, p); this.setAutoGeneratedKeysQuery(SystemGlobals.getSql("UserModel.lastGeneratedUserId")); int id = this.executeAutoKeysQuery(p); p.close(); this.addToGroup(id, new int[] { SystemGlobals.getIntValue(ConfigKeys.DEFAULT_USER...
PreparedStatement p=null; try { p = this.getStatementForAutoKeys("UserModel.addNew"); this.initNewUser(user, p); this.setAutoGeneratedKeysQuery(SystemGlobals.getSql("UserModel.lastGeneratedUserId")); int id = this.executeAutoKeysQuery(p); this.addToGroup(id, new int[] { SystemGlobals.getIntValue(ConfigKeys.DEFAULT_U...
public int addNew(User user) throws Exception { PreparedStatement p = this.getStatementForAutoKeys("UserModel.addNew"); this.initNewUser(user, p); this.setAutoGeneratedKeysQuery(SystemGlobals.getSql("UserModel.lastGeneratedUserId")); int id = this.executeAutoKeysQuery(p); p.close(); this.addToGroup(id, ne...
public void addNewWithId(User user) throws Exception
public void addNewWithId(User user)
public void addNewWithId(User user) throws Exception { PreparedStatement p = this.getStatementForAutoKeys("UserModel.addNewWithId"); this.initNewUser(user, p); p.setInt(6, user.getId()); p.executeUpdate(); p.close(); this.addToGroup(user.getId(), new int[] { SystemGlobals.getIntValue(ConfigKeys.DEFAULT_US...
PreparedStatement p = this.getStatementForAutoKeys("UserModel.addNewWithId"); this.initNewUser(user, p); p.setInt(6, user.getId()); p.executeUpdate(); p.close(); this.addToGroup(user.getId(), new int[] { SystemGlobals.getIntValue(ConfigKeys.DEFAULT_USER_GROUP) }); }
PreparedStatement p=null; try { p = this.getStatementForAutoKeys("UserModel.addNewWithId"); this.initNewUser(user, p); p.setInt(6, user.getId()); p.executeUpdate(); this.addToGroup(user.getId(), new int[] { SystemGlobals.getIntValue(ConfigKeys.DEFAULT_USER_GROUP) }); } catch (SQLException e) { String es = "Erorr add...
public void addNewWithId(User user) throws Exception { PreparedStatement p = this.getStatementForAutoKeys("UserModel.addNewWithId"); this.initNewUser(user, p); p.setInt(6, user.getId()); p.executeUpdate(); p.close(); this.addToGroup(user.getId(), new int[] { SystemGlobals.getIntValue(ConfigKeys.DEFAULT_US...
public void addToGroup(int userId, int[] groupId) throws Exception
public void addToGroup(int userId, int[] groupId)
public void addToGroup(int userId, int[] groupId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.addToGroup")); p.setInt(1, userId); for (int i = 0; i < groupId.length; i++) { p.setInt(2, groupId[i]); p.executeUpdate(); } p...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.addToGroup")); p.setInt(1, userId); for (int i = 0; i < groupId.length; i++) { p.setInt(2, groupId[i]); p.executeUpdate(); } p.close(); }
PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.addToGroup")); p.setInt(1, userId); for (int i = 0; i < groupId.length; i++) { p.setInt(2, groupId[i]); p.executeUpdate(); } } catch (SQLException e) { String es = "Erorr addToGroup()"; log.error...
public void addToGroup(int userId, int[] groupId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.addToGroup")); p.setInt(1, userId); for (int i = 0; i < groupId.length; i++) { p.setInt(2, groupId[i]); p.executeUpdate(); } p...
public void decrementPosts(int userId) throws Exception
public void decrementPosts(int userId)
public void decrementPosts(int userId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.decrementPosts")); p.setInt(1, userId); p.executeUpdate(); p.close(); }
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.decrementPosts")); p.setInt(1, userId); p.executeUpdate(); p.close(); }
PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.decrementPosts")); p.setInt(1, userId); p.executeUpdate(); } catch (SQLException e) { String es = "Erorr update()"; log.error(es, e); throw new RuntimeException(es, e); } finally { DbUtils.close(...
public void decrementPosts(int userId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.decrementPosts")); p.setInt(1, userId); p.executeUpdate(); p.close(); }
public void delete(int userId) throws Exception
public void delete(int userId)
public void delete(int userId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.deletedStatus")); p.setInt(1, 1); p.setInt(2, userId); p.executeUpdate(); p.close(); }
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.deletedStatus")); p.setInt(1, 1); p.setInt(2, userId); p.executeUpdate(); p.close();
PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.deletedStatus")); p.setInt(1, 1); p.setInt(2, userId); p.executeUpdate(); } catch (SQLException e) { String es = "Erorr delete()"; log.error(es, e); throw new RuntimeException(es, e); } finally {...
public void delete(int userId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.deletedStatus")); p.setInt(1, 1); p.setInt(2, userId); p.executeUpdate(); p.close(); }
protected void fillUserFromResultSet(User u, ResultSet rs) throws Exception
protected void fillUserFromResultSet(User u, ResultSet rs) throws SQLException
protected void fillUserFromResultSet(User u, ResultSet rs) throws Exception { u.setAim(rs.getString("user_aim")); u.setAvatar(rs.getString("user_avatar")); u.setGender(rs.getString("gender")); u.setRankId(rs.getInt("rank_id")); u.setThemeId(rs.getInt("themes_id")); u.setPrivateMessagesEnabled(rs.getInt("user_al...
public List findByName(String input, boolean exactMatch) throws Exception
public List findByName(String input, boolean exactMatch)
public List findByName(String input, boolean exactMatch) throws Exception { List namesList = new ArrayList(); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.findByName")); p.setString(1, exactMatch ? input : "%" + input + "%"); ResultSet rs = p.exec...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.findByName")); p.setString(1, exactMatch ? input : "%" + input + "%"); ResultSet rs = p.executeQuery(); while (rs.next()) { User u = new User(); u.setId(rs.getInt("user_id")); u.setUsername(rs.getString("user...
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.findByName")); p.setString(1, exactMatch ? input : "%" + input + "%");
public List findByName(String input, boolean exactMatch) throws Exception { List namesList = new ArrayList(); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.findByName")); p.setString(1, exactMatch ? input : "%" + input + "%"); ResultSet rs = p.exec...
namesList.add(u); } rs.close(); p.close(); return namesList; }
rs = p.executeQuery(); while (rs.next()) { User u = new User(); u.setId(rs.getInt("user_id")); u.setUsername(rs.getString("username")); u.setEmail(rs.getString("user_email")); u.setDeleted(rs.getInt("deleted")); namesList.add(u); } return namesList; } catch (SQLException e) { String es = "Erorr findByName()"; log.err...
public List findByName(String input, boolean exactMatch) throws Exception { List namesList = new ArrayList(); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.findByName")); p.setString(1, exactMatch ? input : "%" + input + "%"); ResultSet rs = p.exec...
public User getLastUserInfo() throws Exception
public User getLastUserInfo()
public User getLastUserInfo() throws Exception { User u = new User(); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.lastUserRegistered")); ResultSet rs = p.executeQuery(); rs.next(); u.setUsername(rs.getString("username")); u.setId(rs.getInt("u...
User u = new User(); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.lastUserRegistered")); ResultSet rs = p.executeQuery(); rs.next(); u.setUsername(rs.getString("username")); u.setId(rs.getInt("user_id")); rs.close(); p.close(); return u; }
PreparedStatement p=null; ResultSet rs=null; try { User u = new User(); p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.lastUserRegistered")); rs = p.executeQuery(); rs.next(); u.setUsername(rs.getString("username")); u.setId(rs.getInt("user_id")); return u; } catch (SQLEx...
public User getLastUserInfo() throws Exception { User u = new User(); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.lastUserRegistered")); ResultSet rs = p.executeQuery(); rs.next(); u.setUsername(rs.getString("username")); u.setId(rs.getInt("u...
public int getTotalUsers() throws Exception { return this.getTotalUsersCommon(JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.totalUsers"))); }
public int getTotalUsers() { PreparedStatement preparedStatement=null; try { preparedStatement = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.totalUsers")); return this.getTotalUsersCommon(preparedStatement); } catch (SQLException e) { String es = "Erorr getTotalUsers()"; log...
public int getTotalUsers() throws Exception { return this.getTotalUsersCommon(JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.totalUsers"))); }
public int getTotalUsersByGroup(int groupId) throws Exception
public int getTotalUsersByGroup(int groupId)
public int getTotalUsersByGroup(int groupId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.totalUsersByGroup")); p.setInt(1, groupId); return this.getTotalUsersCommon(p); }
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.totalUsersByGroup")); p.setInt(1, groupId); return this.getTotalUsersCommon(p); }
PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.totalUsersByGroup")); p.setInt(1, groupId); return this.getTotalUsersCommon(p); } catch (SQLException e) { String es = "Erorr getTotalUsersByGroup()"; log.error(es, e); throw new RuntimeExceptio...
public int getTotalUsersByGroup(int groupId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.totalUsersByGroup")); p.setInt(1, groupId); return this.getTotalUsersCommon(p); }
protected int getTotalUsersCommon(PreparedStatement p) throws Exception
protected int getTotalUsersCommon(PreparedStatement p) throws SQLException
protected int getTotalUsersCommon(PreparedStatement p) throws Exception { ResultSet rs = p.executeQuery(); rs.next(); int total = rs.getInt(1); rs.close(); p.close(); return total; }
public String getUserAuthHash(int userId) throws Exception
public String getUserAuthHash(int userId)
public String getUserAuthHash(int userId) throws Exception { String hash = null; PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.getUserAuthHash")); p.setInt(1, userId); ResultSet rs = p.executeQuery(); if (rs.next()) { hash = rs.getString(...
String hash = null; PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.getUserAuthHash")); p.setInt(1, userId); ResultSet rs = p.executeQuery(); if (rs.next()) { hash = rs.getString(1); } rs.close(); p.close(); return hash; }
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.getUserAuthHash")); p.setInt(1, userId); rs = p.executeQuery(); String hash = null; if (rs.next()) { hash = rs.getString(1); } return hash; } catch (SQLException e) { String...
public String getUserAuthHash(int userId) throws Exception { String hash = null; PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.getUserAuthHash")); p.setInt(1, userId); ResultSet rs = p.executeQuery(); if (rs.next()) { hash = rs.getString(...
public String getUsernameByEmail(String email) throws Exception
public String getUsernameByEmail(String email)
public String getUsernameByEmail(String email) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.getUsernameByEmail")); p.setString(1, email); String username = ""; ResultSet rs = p.executeQuery(); if (rs.next()) { username = rs....
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.getUsernameByEmail")); p.setString(1, email); String username = ""; ResultSet rs = p.executeQuery(); if (rs.next()) { username = rs.getString("username"); } rs.close(); p.close(); return username; }
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.getUsernameByEmail")); p.setString(1, email); String username = ""; rs = p.executeQuery(); if (rs.next()) { username = rs.getString("username"); } return username; } catch (S...
public String getUsernameByEmail(String email) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.getUsernameByEmail")); p.setString(1, email); String username = ""; ResultSet rs = p.executeQuery(); if (rs.next()) { username = rs....
public boolean hasUsernameChanged(int userId, String usernameToCheck) throws Exception
public boolean hasUsernameChanged(int userId, String usernameToCheck)
public boolean hasUsernameChanged(int userId, String usernameToCheck) throws Exception { boolean status = false; PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.getUsername")); p.setString(1, usernameToCheck); p.setInt(2, userId); String dbUsername...
boolean status = false; PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.getUsername")); p.setString(1, usernameToCheck); p.setInt(2, userId); String dbUsername = null; ResultSet rs = p.executeQuery(); if (rs.next()) { dbUsername = rs.getString("username")...
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.getUsername")); p.setString(1, usernameToCheck); p.setInt(2, userId); String dbUsername = null; rs = p.executeQuery(); if (rs.next()) { dbUsername = rs.getString("username"); ...
public boolean hasUsernameChanged(int userId, String usernameToCheck) throws Exception { boolean status = false; PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.getUsername")); p.setString(1, usernameToCheck); p.setInt(2, userId); String dbUsername...
public void incrementPosts(int userId) throws Exception
public void incrementPosts(int userId)
public void incrementPosts(int userId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.incrementPosts")); p.setInt(1, userId); p.executeUpdate(); p.close(); }
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.incrementPosts")); p.setInt(1, userId); p.executeUpdate(); p.close(); }
PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.incrementPosts")); p.setInt(1, userId); p.executeUpdate(); } catch (SQLException e) { String es = "Erorr incrementPosts()"; log.error(es, e); throw new RuntimeException(es, e); } finally { DbUtil...
public void incrementPosts(int userId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.incrementPosts")); p.setInt(1, userId); p.executeUpdate(); p.close(); }
protected void initNewUser(User user, PreparedStatement p) throws Exception
protected void initNewUser(User user, PreparedStatement p) throws SQLException
protected void initNewUser(User user, PreparedStatement p) throws Exception { p.setString(1, user.getUsername()); p.setString(2, user.getPassword()); p.setString(3, user.getEmail()); p.setTimestamp(4, new Timestamp(System.currentTimeMillis())); p.setString(5, user.getActivationKey()); }
public boolean isDeleted(int userId) throws Exception
public boolean isDeleted(int userId)
public boolean isDeleted(int userId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.isDeleted")); p.setInt(1, userId); int deleted = 0; ResultSet rs = p.executeQuery(); if (rs.next()) { deleted = rs.getInt("deleted"); } ...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.isDeleted")); p.setInt(1, userId); int deleted = 0; ResultSet rs = p.executeQuery(); if (rs.next()) { deleted = rs.getInt("deleted"); } rs.close(); p.close(); return deleted == 1; }
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.isDeleted")); p.setInt(1, userId); int deleted = 0; rs = p.executeQuery(); if (rs.next()) { deleted = rs.getInt("deleted"); } return deleted == 1; } catch (SQLException e) { ...
public boolean isDeleted(int userId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.isDeleted")); p.setInt(1, userId); int deleted = 0; ResultSet rs = p.executeQuery(); if (rs.next()) { deleted = rs.getInt("deleted"); } ...
public boolean isUsernameRegistered(String username) throws Exception
public boolean isUsernameRegistered(String username)
public boolean isUsernameRegistered(String username) throws Exception { boolean status = false; PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.isUsernameRegistered")); p.setString(1, username); ResultSet rs = p.executeQuery(); if (rs.next() &...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.isUsernameRegistered")); p.setString(1, username); ResultSet rs = p.executeQuery(); if (rs.next() && rs.getInt("registered") > 0) { status = true; } rs.close(); p.close(); return status; }
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.isUsernameRegistered")); p.setString(1, username); rs = p.executeQuery(); if (rs.next() && rs.getInt("registered") > 0) { status = true; } return status; } catch (SQLExceptio...
public boolean isUsernameRegistered(String username) throws Exception { boolean status = false; PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.isUsernameRegistered")); p.setString(1, username); ResultSet rs = p.executeQuery(); if (rs.next() &...
protected List loadKarma(List users) throws Exception{
protected List loadKarma(List users) throws SQLException{
protected List loadKarma(List users) throws Exception{ List result = new ArrayList(users.size()); for (Iterator iter = users.iterator(); iter.hasNext(); ) { User user = (User) iter.next(); // Load Karma DataAccessDriver.getInstance().newKarmaDAO().getUserTotalKarma(user); result.add(u...
protected List processSelectAll(ResultSet rs) throws Exception
protected List processSelectAll(ResultSet rs) throws SQLException
protected List processSelectAll(ResultSet rs) throws Exception { List list = new ArrayList(); while (rs.next()) { User u = new User(); u.setEmail(rs.getString("user_email")); u.setId(rs.getInt("user_id")); u.setTotalPosts(rs.getInt("user_posts")); u.setRegistrationDate(new Date(rs.getTimestamp("user_reg...
public void removeFromGroup(int userId, int[] groupId) throws Exception
public void removeFromGroup(int userId, int[] groupId)
public void removeFromGroup(int userId, int[] groupId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.removeFromGroup")); p.setInt(1, userId); for (int i = 0; i < groupId.length; i++) { p.setInt(2, groupId[i]); p.executeUpdate(...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.removeFromGroup")); p.setInt(1, userId); for (int i = 0; i < groupId.length; i++) { p.setInt(2, groupId[i]); p.executeUpdate(); } p.close();
PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.removeFromGroup")); p.setInt(1, userId); for (int i = 0; i < groupId.length; i++) { p.setInt(2, groupId[i]); p.executeUpdate(); } } catch (SQLException e) { String es = "Erorr removeFromGroup()";...
public void removeFromGroup(int userId, int[] groupId) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.removeFromGroup")); p.setInt(1, userId); for (int i = 0; i < groupId.length; i++) { p.setInt(2, groupId[i]); p.executeUpdate(...
public void saveNewPassword(String password, String email) throws Exception
public void saveNewPassword(String password, String email)
public void saveNewPassword(String password, String email) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.saveNewPassword")); p.setString(1, password); p.setString(2, email); p.executeUpdate(); p.close(); }
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.saveNewPassword")); p.setString(1, password); p.setString(2, email); p.executeUpdate(); p.close(); }
PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.saveNewPassword")); p.setString(1, password); p.setString(2, email); p.executeUpdate(); } catch (SQLException e) { String es = "Erorr saveNewPassword()"; log.error(es, e); throw new RuntimeExcepti...
public void saveNewPassword(String password, String email) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.saveNewPassword")); p.setString(1, password); p.setString(2, email); p.executeUpdate(); p.close(); }
public void saveUserAuthHash(int userId, String hash) throws Exception
public void saveUserAuthHash(int userId, String hash)
public void saveUserAuthHash(int userId, String hash) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.saveUserAuthHash")); p.setString(1, hash); p.setInt(2, userId); p.executeUpdate(); p.close(); }
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.saveUserAuthHash")); p.setString(1, hash); p.setInt(2, userId); p.executeUpdate(); p.close();
PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.saveUserAuthHash")); p.setString(1, hash); p.setInt(2, userId); p.executeUpdate(); } catch (SQLException e) { String es = "Erorr saveUserAuthHash()"; log.error(es, e); throw new RuntimeException(...
public void saveUserAuthHash(int userId, String hash) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.saveUserAuthHash")); p.setString(1, hash); p.setInt(2, userId); p.executeUpdate(); p.close(); }
public List selectAll(int startFrom, int count) throws Exception
public List selectAll()
public List selectAll(int startFrom, int count) throws Exception { PreparedStatement p; if (count > 0) { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.selectAllByLimit")); p.setInt(1, startFrom); p.setInt(2, count); } else { p = JForumExecutionContext.getCon...
PreparedStatement p; if (count > 0) { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.selectAllByLimit")); p.setInt(1, startFrom); p.setInt(2, count); } else { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.selectAll")); } Result...
return selectAll(0, 0);
public List selectAll(int startFrom, int count) throws Exception { PreparedStatement p; if (count > 0) { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.selectAllByLimit")); p.setInt(1, startFrom); p.setInt(2, count); } else { p = JForumExecutionContext.getCon...
public List selectAllByGroup(int groupId, int start, int count) throws Exception
public List selectAllByGroup(int groupId, int start, int count)
public List selectAllByGroup(int groupId, int start, int count) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.selectAllByGroup")); p.setInt(1, groupId); p.setInt(2, start); p.setInt(3, count); ResultSet rs = p.executeQuery(); Li...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.selectAllByGroup")); p.setInt(1, groupId); p.setInt(2, start); p.setInt(3, count); ResultSet rs = p.executeQuery(); List l = this.processSelectAll(rs); rs.close(); return l; }
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.selectAllByGroup")); p.setInt(1, groupId); p.setInt(2, start); p.setInt(3, count); rs = p.executeQuery(); return this.processSelectAll(rs); } catch (SQLException e) { String e...
public List selectAllByGroup(int groupId, int start, int count) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.selectAllByGroup")); p.setInt(1, groupId); p.setInt(2, start); p.setInt(3, count); ResultSet rs = p.executeQuery(); Li...
public List selectAllWithKarma(int startFrom, int count) throws Exception
public List selectAllWithKarma()
public List selectAllWithKarma(int startFrom, int count) throws Exception { return this.loadKarma( this.selectAll(startFrom, count) ); }
return this.loadKarma( this.selectAll(startFrom, count) );
return this.selectAllWithKarma(0, 0);
public List selectAllWithKarma(int startFrom, int count) throws Exception { return this.loadKarma( this.selectAll(startFrom, count) ); }
public User selectById(int userId) throws Exception
public User selectById(int userId)
public User selectById(int userId) throws Exception { String q = SystemGlobals.getSql("UserModel.selectById"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(q); p.setInt(1, userId); ResultSet rs = p.executeQuery(); User u = new User(); if (rs.next()) { this.fillUserFromR...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(q); p.setInt(1, userId); ResultSet rs = p.executeQuery(); User u = new User(); if (rs.next()) { this.fillUserFromResultSet(u, rs); u.setPrivateMessagesCount(rs.getInt("private_messages")); rs.close(); p.close();
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(q); p.setInt(1, userId);
public User selectById(int userId) throws Exception { String q = SystemGlobals.getSql("UserModel.selectById"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(q); p.setInt(1, userId); ResultSet rs = p.executeQuery(); User u = new User(); if (rs.next()) { this.fillUserFromR...
p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.selectGroups")); p.setInt(1, userId); rs = p.executeQuery(); while (rs.next()) { Group g = new Group(); g.setName(rs.getString("group_name")); g.setId(rs.getInt("group_id"));
rs = p.executeQuery(); User u = new User();
public User selectById(int userId) throws Exception { String q = SystemGlobals.getSql("UserModel.selectById"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(q); p.setInt(1, userId); ResultSet rs = p.executeQuery(); User u = new User(); if (rs.next()) { this.fillUserFromR...
u.getGroupsList().add(g); } } rs.close(); p.close();
if (rs.next()) { this.fillUserFromResultSet(u, rs); u.setPrivateMessagesCount(rs.getInt("private_messages"));
public User selectById(int userId) throws Exception { String q = SystemGlobals.getSql("UserModel.selectById"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(q); p.setInt(1, userId); ResultSet rs = p.executeQuery(); User u = new User(); if (rs.next()) { this.fillUserFromR...
return u; }
rs.close(); p.close(); p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("UserModel.selectGroups")); p.setInt(1, userId); rs = p.executeQuery(); while (rs.next()) { Group g = new Group(); g.setName(rs.getString("group_name")); g.setId(rs.getInt("group_id")); u.getGroupsList().add(g); ...
public User selectById(int userId) throws Exception { String q = SystemGlobals.getSql("UserModel.selectById"); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(q); p.setInt(1, userId); ResultSet rs = p.executeQuery(); User u = new User(); if (rs.next()) { this.fillUserFromR...
public User selectByName(String username) throws Exception
public User selectByName(String username)
public User selectByName(String username) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.selectByName")); p.setString(1, username); ResultSet rs = p.executeQuery(); User u = null; if (rs.next()) { u = new User(); this.f...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.selectByName")); p.setString(1, username); ResultSet rs = p.executeQuery(); User u = null; if (rs.next()) { u = new User(); this.fillUserFromResultSet(u, rs); } rs.close(); p.close();
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.selectByName")); p.setString(1, username);
public User selectByName(String username) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.selectByName")); p.setString(1, username); ResultSet rs = p.executeQuery(); User u = null; if (rs.next()) { u = new User(); this.f...
return u; }
rs = p.executeQuery(); User u = null; if (rs.next()) { u = new User(); this.fillUserFromResultSet(u, rs); } return u; } catch (SQLException e) { String es = "Erorr selectByName()"; log.error(es, e); throw new RuntimeException(es, e); } finally { DbUtils.close(rs, p); } }
public User selectByName(String username) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.selectByName")); p.setString(1, username); ResultSet rs = p.executeQuery(); User u = null; if (rs.next()) { u = new User(); this.f...