Class MeterBrandService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.accounts.rs1.meterbrand.MeterBrandService
@RestController
@RequestMapping("assets/accounts/r1/meter-brands")
@Resource(logging=true)
public class MeterBrandService
extends PrivateService
Service to manage meter brand
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOMeterBrand> get(Long meterBrandId, Collection<String> fields) Retrieves the requiredDTOMeterBrandby calling theMeterBrandLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOMeterBrand>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid DTOMeterBrandFilter filter) Returns the collection of all the stored meter brands by calling theMeterBrandSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long meterBrandId, @Valid DTOMeterBrandUpdate dto) Update a meter brand by calling theMeterBrandUpdateEventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> Create a new meter brand by calling theMeterBrandInsertEvent
-
Constructor Details
-
MeterBrandService
public MeterBrandService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOMeterBrand>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOMeterBrandFilter filter) throws DAValidateException, DAException Returns the collection of all the stored meter brands by calling theMeterBrandSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOMeterBrandFilter- Returns:
- the collection of
DTOMeterBrand - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{meterBrandId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOMeterBrand> get(@PathVariable("meterBrandId") Long meterBrandId, @RequestParam(required=false,name="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOMeterBrandby calling theMeterBrandLoadEvent.- Parameters:
meterBrandId- the meter brand idfields- the collection of fields the response will contain- Returns:
- the response containing the loaded meter brand
- 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 DTOMeterBrandInsert dto) throws DAValidateException, DAException Create a new meter brand by calling theMeterBrandInsertEvent- Parameters:
dto- theDTOMeterBrandInsert- Returns:
- the standard response containing the new meter brand id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{meterBrandId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("meterBrandId") Long meterBrandId, @Valid @RequestBody @Valid DTOMeterBrandUpdate dto) throws DAValidateException, DAException Update a meter brand by calling theMeterBrandUpdateEvent- Parameters:
meterBrandId- the meter brand iddto- theDTOMeterBrandUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-