Class StudioResourceRepository

All Implemented Interfaces:
Repository<StudioResource>

public class StudioResourceRepository extends AbstractStudioResourceRepository
  • Constructor Details

    • StudioResourceRepository

      public StudioResourceRepository()
  • Method Details

    • save

      public StudioResource save(StudioResource entity)
      Description copied from interface: Repository
      Save the given entity.

      Depending on the implementation, it may return same entity or a copy of it. For example JPA implementation may return a copy if the given entity can't be managed.

      Specified by:
      save in interface Repository<StudioResource>
      Overrides:
      save in class JpaRepository<StudioResource>
      Parameters:
      entity - the entity object to save
      Returns:
      an instance of the entity with saved state
    • save

      public StudioResource save(StudioResource entity, boolean validate)
    • remove

      public void remove(StudioResource entity)
      Teardown counterpart of save(com.axelor.studio.db.StudioResource): undeploy the artifact this resource produced, then remove its child resources, before the row itself is removed. StudioResource.parent carries no cascade REMOVE/orphanRemoval, so a resource with children (e.g. a revision with its fields/views/etc.) would otherwise hit a foreign key violation on delete — this makes every delete path (grid delete, revision delete, the assistant tool) recurse the same way instead of only the ones that happened to call a service method that did.
      Specified by:
      remove in interface Repository<StudioResource>
      Overrides:
      remove in class JpaRepository<StudioResource>
      Parameters:
      entity - the entity object