Class MeterClassService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.accounts.rs1.meterclass.MeterClassService
@RestController
@RequestMapping("assets/accounts/r1/meter-classes")
@Resource(logging=true)
public class MeterClassService
extends PrivateService
Service to manage meter class
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOMeterClass> get(Long meterClassId, Collection<String> fields) Retrieves the requiredDTOMeterClassby calling theMeterClassLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOMeterClass>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid DTOMeterClassFilter filter) Returns the collection of all the stored meter classes by calling theMeterClassSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long meterClassId, @Valid DTOMeterClassUpdate dto) Update a meter class by calling theMeterClassUpdateEventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> Create a new meter class by calling theMeterClassInsertEvent
-
Constructor Details
-
MeterClassService
public MeterClassService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOMeterClass>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOMeterClassFilter filter) throws DAValidateException, DAException Returns the collection of all the stored meter classes by calling theMeterClassSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOMeterClassFilter- Returns:
- the collection of
DTOMeterClass - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{meterClassId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOMeterClass> get(@PathVariable("meterClassId") Long meterClassId, @RequestParam(required=false,name="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOMeterClassby calling theMeterClassLoadEvent.- Parameters:
meterClassId- the meter class idfields- the collection of fields the response will contain- Returns:
- the response containing the loaded meter class
- 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 DTOMeterClassInsert dto) throws DAValidateException, DAException Create a new meter class by calling theMeterClassInsertEvent- Parameters:
dto- theDTOMeterClassInsert- Returns:
- the standard response containing the new meter class id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{meterClassId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("meterClassId") Long meterClassId, @Valid @RequestBody @Valid DTOMeterClassUpdate dto) throws DAValidateException, DAException Update a meter class by calling theMeterClassUpdateEvent- Parameters:
meterClassId- the meter class iddto- theDTOMeterClassUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-