if (pkType.equals(Long.class) || pkType.equals(long.class))
return new LongId(cls, (Long) oid);
if (pkType.equals(Short.class) || pkType.equals(short.class))
return new ShortId(cls, (Short) oid);
if (pkType.equals(String.class))
return new StringId(cls, (String) oid);
if (pkType.equals(BigDecimal.class))
return new BigDecimalId(cls, (BigDecimal) oid);
if (pkType.equals(BigInteger.class))
return new BigIntegerId(cls, (BigInteger) oid);
} catch (ClassCastException cce) {