Query query=em.createNativeQuery("select count(*) as rowcount from candidate where loginid=?1 or email=?2");
query.setParameter(1,getCandidate().getLoginid().trim());
query.setParameter(2,getCandidate().getEmail().trim());
if( ((BigInteger)query.getSingleResult()).intValue() > 0){
return true;
}
query.setParameter(1,getCandidate().getLoginid().trim());
query.setParameter(2,getCandidate().getEmail().trim());
if( ((BigInteger)query.getSingleResult()).intValue() > 0){
return true;
}