Package com.axelor.studio.db.repo
Class StudioResourceRepository
java.lang.Object
com.axelor.db.JpaRepository<StudioResource>
com.axelor.studio.db.repo.AbstractStudioResourceRepository
com.axelor.studio.db.repo.StudioResourceRepository
- All Implemented Interfaces:
Repository<StudioResource>
-
Field Summary
Fields inherited from class com.axelor.db.JpaRepository
modelClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidremove(StudioResource entity) Teardown counterpart ofsave(com.axelor.studio.db.StudioResource): undeploy the artifact this resource produced, then remove its child resources, before the row itself is removed.save(StudioResource entity) Save the given entity.save(StudioResource entity, boolean validate) Methods inherited from class com.axelor.studio.db.repo.AbstractStudioResourceRepository
findByNameMethods inherited from class com.axelor.db.JpaRepository
all, all, copy, create, fields, find, findById, findByIds, flush, getReferenceById, isPermitted, isPermitted, merge, of, persist, populate, refresh, validate
-
Constructor Details
-
StudioResourceRepository
public StudioResourceRepository()
-
-
Method Details
-
save
Description copied from interface:RepositorySave 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:
savein interfaceRepository<StudioResource>- Overrides:
savein classJpaRepository<StudioResource>- Parameters:
entity- the entity object to save- Returns:
- an instance of the entity with saved state
-
save
-
remove
Teardown counterpart ofsave(com.axelor.studio.db.StudioResource): undeploy the artifact this resource produced, then remove its child resources, before the row itself is removed.StudioResource.parentcarries 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:
removein interfaceRepository<StudioResource>- Overrides:
removein classJpaRepository<StudioResource>- Parameters:
entity- the entity object
-