Search in sources :

Example 1 with DataGridSpecificQuery

use of com.emc.metalnx.core.domain.entity.DataGridSpecificQuery in project metalnx-web by irods-contrib.

the class SpecificQueryController method showAddForm.

@RequestMapping(value = "/add/", method = RequestMethod.GET)
public String showAddForm(Model model) {
    model.addAttribute("specificQueryForm", new DataGridSpecificQuery());
    model.addAttribute("requestMapping", URLMap.URL_ADD_SPECIFIC_QUERY);
    return "specificqueries/form";
}
Also used : DataGridSpecificQuery(com.emc.metalnx.core.domain.entity.DataGridSpecificQuery) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 2 with DataGridSpecificQuery

use of com.emc.metalnx.core.domain.entity.DataGridSpecificQuery in project metalnx-web by irods-contrib.

the class SpecificQueryController method removeSpecificQuery.

@RequestMapping(value = "/remove/{specAlias}/", method = RequestMethod.GET)
public String removeSpecificQuery(Model model, @PathVariable String specAlias) throws DataGridConnectionRefusedException {
    DataGridSpecificQuery specQuery = specificQueryService.findByAlias(specAlias);
    specificQueryService.removeSpecificQueryByAlias(specQuery);
    return "specificqueries/index";
}
Also used : DataGridSpecificQuery(com.emc.metalnx.core.domain.entity.DataGridSpecificQuery) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 3 with DataGridSpecificQuery

use of com.emc.metalnx.core.domain.entity.DataGridSpecificQuery in project metalnx-web by irods-contrib.

the class SpecificQueryController method executeQuery.

@RequestMapping(value = "/execute/{specAlias}/", method = RequestMethod.GET)
public String executeQuery(@PathVariable String specAlias, Model model) throws DataGridConnectionRefusedException {
    DataGridSpecificQuery specQuery = specificQueryService.findByAlias(specAlias);
    SpecificQueryResultSet results = specificQueryService.executeSpecificQuery(specQuery, irodsZoneName);
    int totalRecords = results.getTotalRecords();
    model.addAttribute("totalRecords", totalRecords);
    model.addAttribute("results", results);
    return "specificqueries/results";
}
Also used : SpecificQueryResultSet(org.irods.jargon.core.query.SpecificQueryResultSet) DataGridSpecificQuery(com.emc.metalnx.core.domain.entity.DataGridSpecificQuery) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 4 with DataGridSpecificQuery

use of com.emc.metalnx.core.domain.entity.DataGridSpecificQuery in project metalnx-web by irods-contrib.

the class SpecificQueryController method showModifyForm.

@RequestMapping(value = "/modify/{specAlias}/", method = RequestMethod.GET)
public String showModifyForm(Model model, @PathVariable String specAlias) throws DataGridConnectionRefusedException {
    DataGridSpecificQuery specQuery = specificQueryService.findByAlias(specAlias);
    model.addAttribute("specificQueryForm", specQuery);
    model.addAttribute("requestMapping", URLMap.URL_MODIFY_SPECIFIC_QUERY);
    return "specificqueries/form";
}
Also used : DataGridSpecificQuery(com.emc.metalnx.core.domain.entity.DataGridSpecificQuery) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 5 with DataGridSpecificQuery

use of com.emc.metalnx.core.domain.entity.DataGridSpecificQuery in project metalnx-web by irods-contrib.

the class SpecificQueryServiceImpl method createDataGridSpecificQuery.

private final DataGridSpecificQuery createDataGridSpecificQuery(SpecificQueryDefinition specificQueryFromIrods) {
    DataGridSpecificQuery newQuery = new DataGridSpecificQuery();
    newQuery.setAlias(specificQueryFromIrods.getAlias());
    newQuery.setQuery(specificQueryFromIrods.getSql());
    return newQuery;
}
Also used : DataGridSpecificQuery(com.emc.metalnx.core.domain.entity.DataGridSpecificQuery)

Aggregations

DataGridSpecificQuery (com.emc.metalnx.core.domain.entity.DataGridSpecificQuery)6 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)4 ArrayList (java.util.ArrayList)1 SpecificQueryDefinition (org.irods.jargon.core.pub.domain.SpecificQueryDefinition)1 SpecificQueryResultSet (org.irods.jargon.core.query.SpecificQueryResultSet)1