Added typesafe collection and added resultset asEntity() implementation.