Exemple #1
0
 /** POST /servicess -> Create a new services. */
 @RequestMapping(
     value = "/servicess",
     method = RequestMethod.POST,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<Services> createServices(@Valid @RequestBody Services services)
     throws URISyntaxException {
   log.debug("REST request to save Services : {}", services);
   if (services.getId() != null) {
     return ResponseEntity.badRequest()
         .headers(
             HeaderUtil.createFailureAlert(
                 "services", "idexists", "A new services cannot already have an ID"))
         .body(null);
   }
   Services result = servicesService.save(services);
   return ResponseEntity.created(new URI("/api/servicess/" + result.getId()))
       .headers(HeaderUtil.createEntityCreationAlert("services", result.getId().toString()))
       .body(result);
 }
 /** POST /education_levels -> Create a new education_level. */
 @RequestMapping(
     value = "/education_levels",
     method = RequestMethod.POST,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<Education_level> createEducation_level(
     @Valid @RequestBody Education_level education_level) throws URISyntaxException {
   log.debug("REST request to save Education_level : {}", education_level);
   if (education_level.getId() != null) {
     return ResponseEntity.badRequest()
         .headers(
             HeaderUtil.createFailureAlert(
                 "education_level", "idexists", "A new education_level cannot already have an ID"))
         .body(null);
   }
   Education_level result = education_levelService.save(education_level);
   return ResponseEntity.created(new URI("/api/education_levels/" + result.getId()))
       .headers(HeaderUtil.createEntityCreationAlert("education_level", result.getId().toString()))
       .body(result);
 }
 /** DELETE /status_bill_services/:id -> delete the "id" status_bill_service. */
 @RequestMapping(
     value = "/status_bill_services/{id}",
     method = RequestMethod.DELETE,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<Void> deleteStatus_bill_service(@PathVariable Long id) {
   log.debug("REST request to delete Status_bill_service : {}", id);
   status_bill_serviceService.delete(id);
   return ResponseEntity.ok()
       .headers(HeaderUtil.createEntityDeletionAlert("status_bill_service", id.toString()))
       .build();
 }
Exemple #4
0
 /** PUT /servicess -> Updates an existing services. */
 @RequestMapping(
     value = "/servicess",
     method = RequestMethod.PUT,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<Services> updateServices(@Valid @RequestBody Services services)
     throws URISyntaxException {
   log.debug("REST request to update Services : {}", services);
   if (services.getId() == null) {
     return createServices(services);
   }
   Services result = servicesService.save(services);
   return ResponseEntity.ok()
       .headers(HeaderUtil.createEntityUpdateAlert("services", services.getId().toString()))
       .body(result);
 }
 /** PUT /education_levels -> Updates an existing education_level. */
 @RequestMapping(
     value = "/education_levels",
     method = RequestMethod.PUT,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<Education_level> updateEducation_level(
     @Valid @RequestBody Education_level education_level) throws URISyntaxException {
   log.debug("REST request to update Education_level : {}", education_level);
   if (education_level.getId() == null) {
     return createEducation_level(education_level);
   }
   Education_level result = education_levelService.save(education_level);
   return ResponseEntity.ok()
       .headers(
           HeaderUtil.createEntityUpdateAlert(
               "education_level", education_level.getId().toString()))
       .body(result);
 }