Class MeterTypeService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.accounts.rs1.metertype.MeterTypeService
@RestController
@RequestMapping("assets/accounts/r1/meter-types")
@Resource(logging=true)
public class MeterTypeService
extends PrivateService
Service to manage meter type
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOMeterType> get(Long id, Collection<String> fields) Retrieves the requiredDTOMeterTypeby calling theMeterTypeLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOMeterType>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid DTOMeterTypeFilter filter) Returns the collection of all the stored meter types by calling theMeterTypeSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOMeterTypeUpdate dto) Update a meter type by calling theMeterTypeUpdateEventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid DTOMeterTypeInsert dto) Create a new meter type by calling theMeterTypeInsertEvent
-
Constructor Details
-
MeterTypeService
public MeterTypeService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOMeterType>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOMeterTypeFilter filter) throws DAValidateException, DAException Returns the collection of all the stored meter types by calling theMeterTypeSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOMeterTypeFilter- Returns:
- the collection of
DTOMeterType - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{meterTypeId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOMeterType> get(@PathVariable("meterTypeId") Long id, @RequestParam(required=false,name="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOMeterTypeby calling theMeterTypeLoadEvent.- Parameters:
id- the meter type idfields- the collection of fields the response will contain- Returns:
- the response containing the loaded meter type
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid @RequestBody @Valid DTOMeterTypeInsert dto) throws DAValidateException, DAException Create a new meter type by calling theMeterTypeInsertEvent- Parameters:
dto- theDTOMeterTypeInsert- Returns:
- the standard response containing the new meter type id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{meterTypeId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("meterTypeId") Long id, @Valid @RequestBody @Valid DTOMeterTypeUpdate dto) throws DAValidateException, DAException Update a meter type by calling theMeterTypeUpdateEvent- Parameters:
id- the meter type iddto- theDTOMeterTypeUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-