code: public static boolean hasWhereClause(JPQLExpression jpqlExpression)
      {
          if (isSelectStatement(jpqlExpression))
          {
              return ((SelectStatement) jpqlExpression.getQueryStatement()).hasWhereClause();
          }
          else if (isUpdateStatement(jpqlExpression))
          {
              return ((UpdateStatement) jpqlExpression.getQueryStatement()).hasWhereClause();
          }
          if (isDeleteStatement(jpqlExpression))
          {
              return ((DeleteStatement) jpqlExpression.getQueryStatement()).hasWhereClause();
          }
          return false;
      }
docs: Checks for where clause.
  
  @param jpqlExpression
  the jpql expression
  @return true, if successful