Java Code Examples for javax.jdo.Query#deletePersistentAll()
The following examples show how to use
javax.jdo.Query#deletePersistentAll() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: QueryManager.java From dependency-track with Apache License 2.0 | 5 votes |
/** * Deletes all dependencies for the specified Project. * @param project the Project to delete dependencies of */ @SuppressWarnings("unchecked") private void deleteDependencies(Project project) { final Query query = pm.newQuery(Dependency.class, "project == :project"); query.getFetchPlan().addGroup(Dependency.FetchGroup.PROJECT_ONLY.name()); query.deletePersistentAll(project); }
Example 2
Source File: QueryManager.java From dependency-track with Apache License 2.0 | 5 votes |
/** * Deletes all dependencies for the specified Component. * @param component the Component to delete dependencies of */ @SuppressWarnings("unchecked") private void deleteDependencies(Component component) { final Query query = pm.newQuery(Dependency.class, "component == :component"); query.getFetchPlan().addGroup(Dependency.FetchGroup.COMPONENT_ONLY.name()); query.deletePersistentAll(component); }
Example 3
Source File: QueryManager.java From dependency-track with Apache License 2.0 | 5 votes |
/** * Deleted all metrics associated for the specified Project. * @param project the Project to delete metrics for */ private void deleteMetrics(Project project) { final Query query = pm.newQuery(ProjectMetrics.class, "project == :project"); query.deletePersistentAll(project); final Query query2 = pm.newQuery(DependencyMetrics.class, "project == :project"); query2.deletePersistentAll(project); }
Example 4
Source File: QueryManager.java From dependency-track with Apache License 2.0 | 5 votes |
/** * Deleted all metrics associated for the specified Component. * @param component the Component to delete metrics for */ private void deleteMetrics(Component component) { final Query query = pm.newQuery(ComponentMetrics.class, "component == :component"); query.deletePersistentAll(component); final Query query2 = pm.newQuery(DependencyMetrics.class, "component == :component"); query2.deletePersistentAll(component); }
Example 5
Source File: QueryManager.java From dependency-track with Apache License 2.0 | 4 votes |
/** * Deletes boms belonging to the specified Project. * @param project the Project to delete boms for */ private void deleteBoms(Project project) { final Query query = pm.newQuery(Bom.class, "project == :project"); query.deletePersistentAll(project); }
Example 6
Source File: QueryManager.java From dependency-track with Apache License 2.0 | 4 votes |
/** * Deleted all analysis and comments associated for the specified Component. * @param component the Component to delete analysis for */ private void deleteAnalysisTrail(Component component) { final Query query = pm.newQuery(Analysis.class, "component == :component"); query.deletePersistentAll(component); }
Example 7
Source File: QueryManager.java From dependency-track with Apache License 2.0 | 4 votes |
/** * Deleted all analysis and comments associated for the specified Project. * @param project the Project to delete analysis for */ private void deleteAnalysisTrail(Project project) { final Query query = pm.newQuery(Analysis.class, "project == :project"); query.deletePersistentAll(project); }