code: public static WhereClause getWhereClause(JPQLExpression jpqlExpression)
      {
          WhereClause whereClause = null;
  
          if (hasWhereClause(jpqlExpression))
          {
              if (isSelectStatement(jpqlExpression))
              {
                  whereClause = (WhereClause) ((SelectStatement) jpqlExpression.getQueryStatement()).getWhereClause();
  
              }
              else if (isUpdateStatement(jpqlExpression))
              {
                  whereClause = (WhereClause) ((UpdateStatement) jpqlExpression.getQueryStatement()).getWhereClause();
  
              }
              if (isDeleteStatement(jpqlExpression))
              {
                  whereClause = (WhereClause) ((DeleteStatement) jpqlExpression.getQueryStatement()).getWhereClause();
              }
          }
          return whereClause;
      }
docs: Gets the where clause.
  
  @param jpqlExpression
  the jpql expression
  @return the where clause