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 ; }
Gets the where clause .