added basic class hierarchy for building query conditions