use buildCriteria and buildLimitOrOffset methods to simplify code.
full spell w as where.
simplify Builder by extracting the building part into GenericSql class.
removed some unused methods, member properties, etc.