I have a POJO class.
class Activity{ private String name; public String getName() return name; } public void setName(String name){ this.name=name; } }
im having belw.it conditions that do not comply with the rule in these conditions, respectively
if(stlmtTransRequestVO.getStlmtTransId()!=null && stlmtTransRequestVO.getPaymentTransId()!=null){ stlmtTransDtlsList = (List<StlmtTransResponseVO>) queryForList( "GET_STLMTPAY_TRANSACTIONS", stlmtTransRequestVO); }else if(stlmtTransRequestVO.getAgentId()!=null && stlmtTransRequestVO.getAgencyId()==null){ stlmtTransDtlsList = (List<StlmtTransResponseVO>) queryForList( "GET_AGENT_TRANSACTIONS", stlmtTransRequestVO); }else if(stlmtTransRequestVO.getAgencyId()!=null && stlmtTransRequestVO.getAgentId()==null){ stlmtTransDtlsList = (List<StlmtTransResponseVO>) queryForList( "GET_AGENCY_TRANSACTIONS", stlmtTransRequestVO); }else if(stlmtTransRequestVO.getAgencyId()!=null && stlmtTransRequestVO.getAgentId()!=null){ }
How to check this getter method for data or not?
I tried the scripts below but didn't work
1) obj.getName()!=null 2) obj.getName().isEmpty()
source share