code: private Object instantiateEntity(Class entityClass, Object entity)
      {
          if (entity == null)
          {
              return KunderaCoreUtils.createNewInstance(entityClass);
          }
          return entity;
      }
docs: Instantiate entity.
  
  @param entityClass
  the entity class
  @param entity
  the entity
  @return the object