/** * Creates an entity on the database. The object is updated with the ID that it is created with. * * @param entity The entity to create */ public void persist(T entity) { prePersist(entity); // TODO check access entityManager.persist(entity); }
/** * Persists an entity without performing the normal user level access check. Should only be used by subclasses * in special cases where you know exactly what you are doing. * * @param entity The entity to update without access check */ protected void persistWithoutAccessCheck(T entity) { prePersist(entity); entityManager.persist(entity); }