Package org.jresearch.gossip.beans.user

Examples of org.jresearch.gossip.beans.user.Sender


    public Sender getSenderInfo(String username) throws SQLException {
        Connection connection = this.dataSource.getConnection();
        PreparedStatement st = connection.prepareStatement(dbDriver
                .getQueries().getUserQueries().getSql_GET_USER_INFO());
        ResultSet rs = null;
        Sender bean = new Sender();

        try {
            st.setString(1, username);
            rs = (ResultSet) st.executeQuery();

            if (rs.next()) {
                UserInfo info = new UserInfo();
                UserSettings settings = new UserSettings();
                bean.setName(rs.getString("user_name"));
                info.setCity(rs.getString("user_city"));
                settings.setSignature(rs.getString("user_signature"));
                bean.setTotalMess(rs.getInt("tot_mes"));
                bean.setStatus(rs.getInt("user_status"));
                bean.setSettings(settings);
                bean.setInfo(info);
            }
        } finally {
            if (rs != null) {
                rs.close();
            }
View Full Code Here

TOP

Related Classes of org.jresearch.gossip.beans.user.Sender

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.