Type safe criteria generator for morphia