Java Code Examples for javax.jdo.Query#executeResultList()

The following examples show how to use javax.jdo.Query#executeResultList() . 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 vote down vote up
/**
 * Returns a list of all projects.
 * This method if designed NOT to provide paginated results.
 * @return a List of Projects
 */
@SuppressWarnings("unchecked")
public List<Project> getAllProjects() {
    final Query query = pm.newQuery(Project.class);
    query.setOrdering("name asc");
    return query.executeResultList(Project.class);
}
 
Example 2
Source File: QueryManager.java    From dependency-track with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a list of all components.
 * This method if designed NOT to provide paginated results.
 * @return a List of Components
 */
@SuppressWarnings("unchecked")
public List<Component> getAllComponents() {
    final Query query = pm.newQuery(Component.class);
    query.setOrdering("id asc");
    return query.executeResultList(Component.class);
}
 
Example 3
Source File: QueryManager.java    From dependency-track with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a list of all repositories
 * This method if designed NOT to provide paginated results.
 * @return a List of Repositories
 */
@SuppressWarnings("unchecked")
public List<Repository> getAllRepositories() {
    final Query query = pm.newQuery(Repository.class);
    query.setOrdering("type asc, identifier asc");
    return query.executeResultList(Repository.class);
}