processs generic type and criteria query.