Package com.mysql.jdbc

Examples of com.mysql.jdbc.Connection.createStatement()


    public List getConstructionDefectZonesByConstrType(String typeId,  String buildingObjectId,Properties props) throws SQLException {


        Connection dbConn = getConnection(props);
        Statement st = (Statement) dbConn.createStatement();
        ResultSet rs = (ResultSet) st.executeQuery("select constructionDefectsZone.constructionDefectId from constructionExamples, constructionDefectsZone where constructionExamples.buildObjectId="+buildingObjectId+" and constructionExamples.exampleId=constructionDefectsZone.exampleId and constructionDefectsZone.constructionTypeId="+typeId+" group by uniqueForExamples");
        List plList = setValues(rs);
        rs.close();

        return plList;
View Full Code Here


        return plList;
    }

    public List getExamplesByDefect(String unique,Properties properties) throws SQLException {
        Connection dbConn = getConnection(properties);
        Statement st = (Statement) dbConn.createStatement();
        ResultSet rs = (ResultSet) st.executeQuery("select exampleId from constructionDefectsZone where uniqueForExamples="+unique);
        List list=new ArrayList();
        while (rs.next()) {
              list.add(rs.getString(1));
        }
View Full Code Here

        }

        public List getExamplesWithNoDefects(Integer buildingObjectId, Properties props) throws SQLException {

            Connection dbConn = getConnection(props);
            Statement st = (Statement) dbConn.createStatement();
            System.out.println("select exampleId from constructionExamples where constructionExamples.noDeffects=false and objectConstructionId in (select typeId from objectConstructions where objectId="+buildingObjectId+")");
            ResultSet rs = (ResultSet) st.executeQuery("select exampleId from constructionExamples where constructionExamples.noDeffects=false and objectConstructionId in (select typeId from objectConstructions where objectId="+buildingObjectId+")");
            List list=new ArrayList();
            while (rs.next()) {
                list.add(new Integer(rs.getInt(1)));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.