text: // WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
  // You may push code into the target .java compilation unit if you wish to edit any member(s).
  
  package nl.bzk.brp.model.data.ber;
  
  import java.util.List;
  import javax.persistence.EntityManager;
  import javax.persistence.PersistenceContext;
  import nl.bzk.brp.model.data.ber.Verwerkingsresultaat;
  import org.springframework.transaction.annotation.Transactional;
  
  privileged aspect Verwerkingsresultaat_Roo_Jpa_ActiveRecord {
      
      @PersistenceContext
      transient EntityManager Verwerkingsresultaat.entityManager;
      
      public static final EntityManager Verwerkingsresultaat.entityManager() {
          EntityManager em = new Verwerkingsresultaat().entityManager;
          if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
          return em;
      }
      
      public static long Verwerkingsresultaat.countVerwerkingsresultaats() {
          return entityManager().createQuery("SELECT COUNT(o) FROM Verwerkingsresultaat o", Long.class).getSingleResult();
      }
      
      public static List<Verwerkingsresultaat> Verwerkingsresultaat.findAllVerwerkingsresultaats() {
          return entityManager().createQuery("SELECT o FROM Verwerkingsresultaat o", Verwerkingsresultaat.class).getResultList();
      }
      
      public static Verwerkingsresultaat Verwerkingsresultaat.findVerwerkingsresultaat(Short id) {
          if (id == null) return null;
          return entityManager().find(Verwerkingsresultaat.class, id);
      }
      
      public static List<Verwerkingsresultaat> Verwerkingsresultaat.findVerwerkingsresultaatEntries(int firstResult, int maxResults) {
          return entityManager().createQuery("SELECT o FROM Verwerkingsresultaat o", Verwerkingsresultaat.class).setFirstResult(firstResult).setMaxResults(maxResults).getResultList();
      }
      
      @Transactional
      public void Verwerkingsresultaat.persist() {
          if (this.entityManager == null) this.entityManager = entityManager();
          this.entityManager.persist(this);
      }
      
      @Transactional
      public void Verwerkingsresultaat.remove() {
          if (this.entityManager == null) this.entityManager = entityManager();
          if (this.entityManager.contains(this)) {
              this.entityManager.remove(this);
          } else {
              Verwerkingsresultaat attached = Verwerkingsresultaat.findVerwerkingsresultaat(this.id);
              this.entityManager.remove(attached);
          }
      }
      
      @Transactional
      public void Verwerkingsresultaat.flush() {
          if (this.entityManager == null) this.entityManager = entityManager();
          this.entityManager.flush();
      }
      
      @Transactional
      public void Verwerkingsresultaat.clear() {
          if (this.entityManager == null) this.entityManager = entityManager();
          this.entityManager.clear();
      }
      
      @Transactional
      public Verwerkingsresultaat Verwerkingsresultaat.merge() {
          if (this.entityManager == null) this.entityManager = entityManager();
          Verwerkingsresultaat merged = this.entityManager.merge(this);
          this.entityManager.flush();
          return merged;
      }
      
  }
  