codegen: Add method to get entity by string id

Currently the method that allows retrieving an entity by id assumes that
the identifier is a UUID, but this isn't true for some entities. This
patch adds an additional method that allows retrieving entities by id
using a string as the parameter.

Change-Id: Idc86f12d1e336f02f6086d34e464d45a0ad9c48b
Related: https://bugzilla.redhat.com/1099818
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
(cherry picked from commit 8ad49637b4a55d019da64f23b1ef933023f0463f)