How to add user login check in GenericDao.java in Ofbiz

265 Views Asked by At

I am Trying to achieve single DB and multiple organization (not Multi tenancy) in ofbiz, how do i get user login Id till GenericDAO and append it to the query.

Please Suggest if you have any other ideas except multi tenancy!

Thanks

EDIT:

       if (!conditions.isEmpty()) {
            whereString.append(prefix);
            whereString.append(EntityCondition.makeCondition(conditions, EntityOperator.AND).makeWhereString(modelEntity, whereEntityConditionParams, this.datasource));
        }

        System.out.println("************ whereString ************ "+whereString+" ---- ");

        return whereString;

In line number 841 in my ofbiz v13.07 GenericDAO.java, i can get to know the place where query string is getting created. i want to access the session here to get the company Id and so i append it to the where clause. to get relevant data.

0

There are 0 best solutions below