simplify code by introducing setPareparedType method.
refactored BuildWhere; simplified logic.
simplify code by introducing addPrefixToName method.