domainObject = (IDomainObject) objectToEdit.getClass().newInstance();
domainObject = objectToEdit.getClass().newInstance();
    private IDomainObject getObjectToLock(IDomainObject objectToEdit, IDomainObject objectFromDatabase)            throws InstantiationException, IllegalAccessException {        IDomainObject domainObject = null;        if (isNew(objectToEdit)) {            domainObject = (IDomainObject) objectToEdit.getClass().newInstance();        } else {            domainObject = objectFromDatabase;        }        return domainObject;    }