protected List<DataLead> selectAll() {

        String query = buildQueryString();

        String url = buildConnectionString();
        String class_name = "com.mysql.jdbc.Driver";
        Connection conn = getConnection(url, class_name);

        if (conn == null) {
            errorLogFile.log(LoggingProxy.ERROR, "[---]Can't get database connection. " +
                    "Returns null.");
            return null;
        }

        ResultSet set = null;
        List<String> cols = new LinkedList<String>();
        List<DataLead> leads = new LinkedList<DataLead>();

        /* The first row should be column name. */
        DataLead title = new DataLead();
        for (int k = 0; k < this.labels.size(); ++ k) {
            title.add(this.labels.get(k));
        }
        leads.add(title);

        try {
            Statement stat = conn.createStatement();
            set = stat.executeQuery(query);

            ResultSetMetaData rsmd = set.getMetaData();
            int colcnt = rsmd.getColumnCount();
            for (int i = 1; i <= colcnt; ++i) {
                cols.add(rsmd.getColumnName(i));
            }

            while (set.next()) {
                DataLead lead = new DataLead();
                for (int i = 0; i < cols.size(); ++i) {

                    String t = set.getString(cols.get(i));
                    if(t == null) {
                        t = "无";
                    }
                    lead.add(t);
                }

                leads.add(lead);
            }

            return leads;


        } catch (SQLException e) {
            this.errorLogFile.log(LoggingProxy.ERROR, "[---]CsvProxy error. "
                    + e.getMessage() + query);

            return null;
        }

    }