'Loop logic for nested if statement to grab column values

I have a database with the following columns: ("PULL", "CON", TRANSFER_1, TRANSFER_2, LIST)

The following logic I'm trying to achieve in my for loop:

If COLUMN "PULL" = "MOBILE" OR "LAPTOP" OR NULL,

AND IF COLUMN "CON" = "RAIN"

AND IF Columns (TRANSFER_1, TRANSFER_2, LIST) = null

Pass

Else
Fail

I'm only printing fail, which shouldn't be happening based on the values in my table. I think there's an issue with the logic of my loop, and if not, possibly another issue. If anyone is able to confirm is my loop will perform the logic above?

    query = "select * FROM PSA.SECOND where T_DATE >'2202-10-10'";
    resultSet = statement.executeQuery(Query)
    ResultSetMetaData rsmd = resultSet.getMetaData();
    long pId = 1:
    while (resultSet.next()) {
    for int col = 1; col <= rsmd.getColumnCount(); col ++) {
    result.put(rsmd.getColumnLabel(col)+pId, resultSet.getString(col)); {
    pId ++;
    }
 
    //problem
    for (int i=0; i<pId;i++)
        if (result.get("PULL"+i)==null) || result.get("PULL"+i).startsWith("MOBILE") || result.get("PULL"+i).startsWith("LAPTOP"))
            if (result.get("CON"+i)!null) && result.get("CON"+i).startsWith("RAIN"))
                if (result.get("TRANSFER_ONE+i")==null) && result.get("TRANSFER_TWO"+i).startsWith("NDUP")==null && result.get("LIST"+i)==null)
                System.out.println("Pass");
                else {
                    System.out.println("Fail");
                }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source