public Vector<Customer> filter(Customer customer) {
        Vector<Customer> cV = new Vector<Customer>();
        try {
            Connection conn = Database.getConnection();
            String sql = "SELECT * FROM Customer";
            String where = "";
            if (customer.getCustomerName() != null) {
                where += "[Customer_name] like ? AND ";
            }
            if (customer.getPhone() != null) {
                where += "[phone] = ? AND ";
            }
            if (where.length() > 0) {
                sql += " WHERE " + where.substring(0, where.length() - 5);
            }
            PreparedStatement stmt = conn.prepareStatement(sql);
            int i = 1;
            if (customer.getCustomerName() != null) {
                stmt.setString(i++, "%" + customer.getCustomerName() + "%");
            }
            if (customer.getPhone() != null) {
                stmt.setString(i++, "%" + customer.getPhone() + "%");
            }
            ResultSet rs = stmt.executeQuery();
            while (rs.next()) {
                Customer c = new Customer();
                c.setAddress(rs.getString("address"));
                c.setCustomerId(rs.getInt("Customer_id"));
                c.setCustomerName(rs.getString("Customer_name"));
                c.setPhone(rs.getString("phone"));
                cV.addElement(c);
            }
        } catch (Exception e) {
        }
        return cV;
    }