public void saveOrUpdate ( E e ) { final Integer id = e . getId ( ) ; final boolean hasId = id != null ; String createOrUpdatePrefix = hasId ? "Updating" : "Creating a new" ; String idSuffix = hasId ? " with ID " + id : "" ; LOG . trace ( createOrUpdatePrefix + " instance of " + entityClass . getSimpleName ( ) + idSuffix ) ; e . setModified ( DateTime . now ( ) ) ; getSession ( ) . saveOrUpdate ( e ) ; }
Saves or updates the passed entity .