generic getBy(), get() with criteria, and getRandom() for Type