Issue with ADF Tree Table

I have the following requirement where i need to display a tree table. Here is how the initial implementation is:
I have created the read only view for : ManagersVO > PoolsVO > MachinesVO. Where 'MachinesVO' is the destination view. And created view links between ManagersVO & PoolsVO using ManagerId and PoolsVO & MachinesVO using PoolId.
And using this implementation, successfully created tree table on the UI. Now we got an enhancement for this:
i.e., MachinesVO should return list of machines as per user logs in. i.e., we have 4 different roles. 'Super Admin', 'Sys Admin', 'App Admin', 'End User'. The default query for MachinesVO is for 'Super Admin'. The query for other user roles is different except the SELECT statement.
The requirement is to dynamically change the query of MachinesVO based on user logs in and display the tree table accordingly. To implement the same i have tried using setQuery() operation on 'MachinesVO' which results with the following error:
JBO-26016: InvalidOperException
Cause: You cannot set customer query (calling setQuery()) on a view object if it is the detail view object in a master detail view link.
Action: Do not call setQuery() if the view object is a detail.
Can one suggest me a best solution to implement this.
Thanks & Regards,

Hi Navaneetha Krishnan,
Here is how i implemented based on your comments. As i have tree table based 3 different VO's, created the following method at middle view(i.e., PoolsVO).
1.Tree Model hierarchy
ManagersVO > PoolsVO > MachinesVO
I actually want to filter the data at Machines level. Hence wrote a method at PoolsVOImpls and exposed it in the PoolsVO client interface. Here is the code that i have placed in the PoolVOImpl
public class PoolsVOImpl extends ViewObjectImpl implements PoolsVO{
     * This is the default constructor (do not remove).
    public PoolsVOImpl () {
  public void filterMachinesDataByUserRole(String userRole,String vzId){
    Row row = getCurrentRow();
    String query = "";
    if(row != null){
      RowSet rowSet = (RowSet)row.getAttribute("MachinesVO");
      if(rowSet != null){
        MachinesVOImpl machinesVOImpl = (MachinesVOImpl)rowSet.getViewObject();
        if(userRole.equalsIgnoreCase("SYS ADMIN")){
                machinesVOImpl .setWhereClause(query related to sysadmin);
         //Similarly for other user roles.
}And this piece of code needs to be executed before the jsff(which has the tree table) renders. Hence, i created a this methodAction as a default activity in the respective taskflow where the jsff is placed. Once this method get executed, the page should render the machines specific to the user.
Here is the issue: getCurrentRow() method call is returning always NULL.
Please correct me if i'm doing something wrong. I do tried the above mentioned approach by creating the method at '*ManagersVOImpl*' level too. Still the same issue.
Thanks & Regards,