* @param id
* the id to set in the instance
*/
public Object instantiate(Serializable id) {
if (mappedClass != null) {
final Identifiable obObject = (Identifiable) OBProvider.getInstance().get(mappedClass);
obObject.setId(id);
Check.isTrue(obObject.getEntityName().equals(entityName),
"Entityname of instantiated object " + obObject.getEntityName()
+ " and expected entityName: " + entityName + " is different.");
return obObject;
} else {
final DynamicOBObject dob = new DynamicOBObject();
dob.setEntityName(entityName);