Java tutorial
/*Copyright (c) 2016-2017 vcstest2.com All Rights Reserved. This software is the confidential and proprietary information of vcstest2.com You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the source code license agreement you entered into with vcstest2.com*/ package com.testmvnbuild.dbscenarios.controller; /*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/ import java.math.BigDecimal; import java.math.BigInteger; import java.util.Date; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.hibernate.TypeMismatchException; import org.joda.time.LocalDateTime; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartHttpServletRequest; import com.wavemaker.runtime.data.exception.EntityNotFoundException; import com.wavemaker.runtime.data.export.ExportType; import com.wavemaker.runtime.data.expression.QueryFilter; import com.wavemaker.runtime.file.model.Downloadable; import com.wavemaker.runtime.util.WMMultipartUtils; import com.wavemaker.runtime.util.WMRuntimeUtils; import com.wavemaker.tools.api.core.annotations.WMAccessVisibility; import com.wavemaker.tools.api.core.models.AccessSpecifier; import com.wordnik.swagger.annotations.Api; import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiParam; import com.testmvnbuild.dbscenarios.AllExternalTypes; import com.testmvnbuild.dbscenarios.AllExternalTypesId; import com.testmvnbuild.dbscenarios.service.AllExternalTypesService; /** * Controller object for domain model class AllExternalTypes. * @see AllExternalTypes */ @RestController("dbscenarios.AllExternalTypesController") @Api(value = "AllExternalTypesController", description = "Exposes APIs to work with AllExternalTypes resource.") @RequestMapping("/dbscenarios/AllExternalTypes") public class AllExternalTypesController { private static final Logger LOGGER = LoggerFactory.getLogger(AllExternalTypesController.class); @Autowired @Qualifier("dbscenarios.AllExternalTypesService") private AllExternalTypesService allExternalTypesService; @ApiOperation(value = "Creates a new AllExternalTypes instance.") @RequestMapping(method = RequestMethod.POST) @WMAccessVisibility(value = AccessSpecifier.APP_ONLY) public AllExternalTypes createAllExternalTypes(@RequestBody AllExternalTypes allExternalTypes) { LOGGER.debug("Create AllExternalTypes with information: {}", allExternalTypes); allExternalTypes = allExternalTypesService.create(allExternalTypes); LOGGER.debug("Created AllExternalTypes with information: {}", allExternalTypes); return allExternalTypes; } @ApiOperation(value = "Creates a new AllExternalTypes instance.This API should be used when the AllExternalTypes instance has fields that requires multipart data.") @RequestMapping(method = RequestMethod.POST, consumes = { "multipart/form-data" }) @WMAccessVisibility(value = AccessSpecifier.APP_ONLY) public AllExternalTypes createAllExternalTypes(MultipartHttpServletRequest multipartHttpServletRequest) { AllExternalTypes allExternalTypes = WMMultipartUtils.toObject(multipartHttpServletRequest, AllExternalTypes.class, "dbscenarios"); LOGGER.debug("Creating a new AllExternalTypes with information: {}", allExternalTypes); return allExternalTypesService.create(allExternalTypes); } @ApiOperation(value = "Returns the AllExternalTypes instance associated with the given composite-id.") @RequestMapping(value = "/composite-id", method = RequestMethod.GET) @WMAccessVisibility(value = AccessSpecifier.APP_ONLY) public AllExternalTypes getAllExternalTypes(@RequestParam("tinyIntCol") Short tinyIntCol, @RequestParam("smallIntCol") Short smallIntCol, @RequestParam("mediumIntCol") Integer mediumIntCol, @RequestParam("intCol") Integer intCol, @RequestParam("bigintCol") BigInteger bigintCol, @RequestParam("decimalCol") Integer decimalCol, @RequestParam("floatCol") Double floatCol, @RequestParam("doubleCol") BigDecimal doubleCol, @RequestParam("bitCol") Boolean bitCol, @RequestParam("booleanCol") Boolean booleanCol, @RequestParam("serialCol") BigInteger serialCol, @RequestParam("dateCol") Date dateCol, @RequestParam("datetimeCol") LocalDateTime datetimeCol, @RequestParam("timestampCol") Date timestampCol, @RequestParam("timeCol") Date timeCol, @RequestParam("charCol") Character charCol, @RequestParam("varcharCol") String varcharCol, @RequestParam("tinytextCol") String tinytextCol, @RequestParam("textCol") String textCol, @RequestParam("mediumTextCol") String mediumTextCol, @RequestParam("longtextCol") String longtextCol, @RequestParam("blobCol") byte[] blobCol, @RequestParam("longblobCol") byte[] longblobCol) throws EntityNotFoundException { AllExternalTypesId allexternaltypesId = new AllExternalTypesId(); allexternaltypesId.setTinyIntCol(tinyIntCol); allexternaltypesId.setSmallIntCol(smallIntCol); allexternaltypesId.setMediumIntCol(mediumIntCol); allexternaltypesId.setIntCol(intCol); allexternaltypesId.setBigintCol(bigintCol); allexternaltypesId.setDecimalCol(decimalCol); allexternaltypesId.setFloatCol(floatCol); allexternaltypesId.setDoubleCol(doubleCol); allexternaltypesId.setBitCol(bitCol); allexternaltypesId.setBooleanCol(booleanCol); allexternaltypesId.setSerialCol(serialCol); allexternaltypesId.setDateCol(dateCol); allexternaltypesId.setDatetimeCol(datetimeCol); allexternaltypesId.setTimestampCol(timestampCol); allexternaltypesId.setTimeCol(timeCol); allexternaltypesId.setCharCol(charCol); allexternaltypesId.setVarcharCol(varcharCol); allexternaltypesId.setTinytextCol(tinytextCol); allexternaltypesId.setTextCol(textCol); allexternaltypesId.setMediumTextCol(mediumTextCol); allexternaltypesId.setLongtextCol(longtextCol); allexternaltypesId.setBlobCol(blobCol); allexternaltypesId.setLongblobCol(longblobCol); LOGGER.debug("Getting AllExternalTypes with id: {}", allexternaltypesId); AllExternalTypes allExternalTypes = allExternalTypesService.getById(allexternaltypesId); LOGGER.debug("AllExternalTypes details with id: {}", allExternalTypes); return allExternalTypes; } @ApiOperation(value = "Retrieves content for the given BLOB field in AllExternalTypes instance associated with the given composite-id.") @RequestMapping(value = "/composite-id/content/{fieldName}", method = RequestMethod.GET) @WMAccessVisibility(value = AccessSpecifier.APP_ONLY) public void getAllExternalTypesBLOBContent(@RequestParam("tinyIntCol") Short tinyIntCol, @RequestParam("smallIntCol") Short smallIntCol, @RequestParam("mediumIntCol") Integer mediumIntCol, @RequestParam("intCol") Integer intCol, @RequestParam("bigintCol") BigInteger bigintCol, @RequestParam("decimalCol") Integer decimalCol, @RequestParam("floatCol") Double floatCol, @RequestParam("doubleCol") BigDecimal doubleCol, @RequestParam("bitCol") Boolean bitCol, @RequestParam("booleanCol") Boolean booleanCol, @RequestParam("serialCol") BigInteger serialCol, @RequestParam("dateCol") Date dateCol, @RequestParam("datetimeCol") LocalDateTime datetimeCol, @RequestParam("timestampCol") Date timestampCol, @RequestParam("timeCol") Date timeCol, @RequestParam("charCol") Character charCol, @RequestParam("varcharCol") String varcharCol, @RequestParam("tinytextCol") String tinytextCol, @RequestParam("textCol") String textCol, @RequestParam("mediumTextCol") String mediumTextCol, @RequestParam("longtextCol") String longtextCol, @RequestParam("blobCol") byte[] blobCol, @RequestParam("longblobCol") byte[] longblobCol, @PathVariable("fieldName") String fieldName, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws EntityNotFoundException { LOGGER.debug("Retrieves content for the given BLOB field {} in AllExternalTypes instance", fieldName); if (!WMRuntimeUtils.isLob(AllExternalTypes.class, fieldName)) { throw new TypeMismatchException("Given field " + fieldName + " is not a valid BLOB type"); } AllExternalTypesId allexternaltypesId = new AllExternalTypesId(); allexternaltypesId.setTinyIntCol(tinyIntCol); allexternaltypesId.setSmallIntCol(smallIntCol); allexternaltypesId.setMediumIntCol(mediumIntCol); allexternaltypesId.setIntCol(intCol); allexternaltypesId.setBigintCol(bigintCol); allexternaltypesId.setDecimalCol(decimalCol); allexternaltypesId.setFloatCol(floatCol); allexternaltypesId.setDoubleCol(doubleCol); allexternaltypesId.setBitCol(bitCol); allexternaltypesId.setBooleanCol(booleanCol); allexternaltypesId.setSerialCol(serialCol); allexternaltypesId.setDateCol(dateCol); allexternaltypesId.setDatetimeCol(datetimeCol); allexternaltypesId.setTimestampCol(timestampCol); allexternaltypesId.setTimeCol(timeCol); allexternaltypesId.setCharCol(charCol); allexternaltypesId.setVarcharCol(varcharCol); allexternaltypesId.setTinytextCol(tinytextCol); allexternaltypesId.setTextCol(textCol); allexternaltypesId.setMediumTextCol(mediumTextCol); allexternaltypesId.setLongtextCol(longtextCol); allexternaltypesId.setBlobCol(blobCol); allexternaltypesId.setLongblobCol(longblobCol); AllExternalTypes allExternalTypes = allExternalTypesService.getById(allexternaltypesId); WMMultipartUtils.buildHttpResponseForBlob(allExternalTypes, fieldName, httpServletRequest, httpServletResponse); } @ApiOperation(value = "Updates the AllExternalTypes instance associated with the given composite-id.") @RequestMapping(value = "/composite-id", method = RequestMethod.PUT) @WMAccessVisibility(value = AccessSpecifier.APP_ONLY) public AllExternalTypes editAllExternalTypes(@RequestParam("tinyIntCol") Short tinyIntCol, @RequestParam("smallIntCol") Short smallIntCol, @RequestParam("mediumIntCol") Integer mediumIntCol, @RequestParam("intCol") Integer intCol, @RequestParam("bigintCol") BigInteger bigintCol, @RequestParam("decimalCol") Integer decimalCol, @RequestParam("floatCol") Double floatCol, @RequestParam("doubleCol") BigDecimal doubleCol, @RequestParam("bitCol") Boolean bitCol, @RequestParam("booleanCol") Boolean booleanCol, @RequestParam("serialCol") BigInteger serialCol, @RequestParam("dateCol") Date dateCol, @RequestParam("datetimeCol") LocalDateTime datetimeCol, @RequestParam("timestampCol") Date timestampCol, @RequestParam("timeCol") Date timeCol, @RequestParam("charCol") Character charCol, @RequestParam("varcharCol") String varcharCol, @RequestParam("tinytextCol") String tinytextCol, @RequestParam("textCol") String textCol, @RequestParam("mediumTextCol") String mediumTextCol, @RequestParam("longtextCol") String longtextCol, @RequestParam("blobCol") byte[] blobCol, @RequestParam("longblobCol") byte[] longblobCol, @RequestBody AllExternalTypes allExternalTypes) throws EntityNotFoundException { allExternalTypes.setTinyIntCol(tinyIntCol); allExternalTypes.setSmallIntCol(smallIntCol); allExternalTypes.setMediumIntCol(mediumIntCol); allExternalTypes.setIntCol(intCol); allExternalTypes.setBigintCol(bigintCol); allExternalTypes.setDecimalCol(decimalCol); allExternalTypes.setFloatCol(floatCol); allExternalTypes.setDoubleCol(doubleCol); allExternalTypes.setBitCol(bitCol); allExternalTypes.setBooleanCol(booleanCol); allExternalTypes.setSerialCol(serialCol); allExternalTypes.setDateCol(dateCol); allExternalTypes.setDatetimeCol(datetimeCol); allExternalTypes.setTimestampCol(timestampCol); allExternalTypes.setTimeCol(timeCol); allExternalTypes.setCharCol(charCol); allExternalTypes.setVarcharCol(varcharCol); allExternalTypes.setTinytextCol(tinytextCol); allExternalTypes.setTextCol(textCol); allExternalTypes.setMediumTextCol(mediumTextCol); allExternalTypes.setLongtextCol(longtextCol); allExternalTypes.setBlobCol(blobCol); allExternalTypes.setLongblobCol(longblobCol); LOGGER.debug("AllExternalTypes details with id is updated with: {}", allExternalTypes); return allExternalTypesService.update(allExternalTypes); } @ApiOperation(value = "Updates the AllExternalTypes instance associated with the given composite-id.This API should be used when AllExternalTypes instance fields that require multipart data.") @RequestMapping(value = "/composite-id", method = RequestMethod.POST, consumes = "multipart/form-data") @WMAccessVisibility(value = AccessSpecifier.APP_ONLY) public AllExternalTypes editAllExternalTypes(@RequestParam("tinyIntCol") Short tinyIntCol, @RequestParam("smallIntCol") Short smallIntCol, @RequestParam("mediumIntCol") Integer mediumIntCol, @RequestParam("intCol") Integer intCol, @RequestParam("bigintCol") BigInteger bigintCol, @RequestParam("decimalCol") Integer decimalCol, @RequestParam("floatCol") Double floatCol, @RequestParam("doubleCol") BigDecimal doubleCol, @RequestParam("bitCol") Boolean bitCol, @RequestParam("booleanCol") Boolean booleanCol, @RequestParam("serialCol") BigInteger serialCol, @RequestParam("dateCol") Date dateCol, @RequestParam("datetimeCol") LocalDateTime datetimeCol, @RequestParam("timestampCol") Date timestampCol, @RequestParam("timeCol") Date timeCol, @RequestParam("charCol") Character charCol, @RequestParam("varcharCol") String varcharCol, @RequestParam("tinytextCol") String tinytextCol, @RequestParam("textCol") String textCol, @RequestParam("mediumTextCol") String mediumTextCol, @RequestParam("longtextCol") String longtextCol, @RequestParam("blobCol") byte[] blobCol, @RequestParam("longblobCol") byte[] longblobCol, MultipartHttpServletRequest multipartHttpServletRequest) throws EntityNotFoundException { return this.editAllExternalTypesAndMultiparts(tinyIntCol, smallIntCol, mediumIntCol, intCol, bigintCol, decimalCol, floatCol, doubleCol, bitCol, booleanCol, serialCol, dateCol, datetimeCol, timestampCol, timeCol, charCol, varcharCol, tinytextCol, textCol, mediumTextCol, longtextCol, blobCol, longblobCol, multipartHttpServletRequest); } @ApiOperation(value = "Updates the AllExternalTypes instance associated with the given composite-id.") @RequestMapping(value = "/composite-id", method = RequestMethod.PUT, consumes = "multipart/form-data") @WMAccessVisibility(value = AccessSpecifier.APP_ONLY) public AllExternalTypes editAllExternalTypesAndMultiparts(@RequestParam("tinyIntCol") Short tinyIntCol, @RequestParam("smallIntCol") Short smallIntCol, @RequestParam("mediumIntCol") Integer mediumIntCol, @RequestParam("intCol") Integer intCol, @RequestParam("bigintCol") BigInteger bigintCol, @RequestParam("decimalCol") Integer decimalCol, @RequestParam("floatCol") Double floatCol, @RequestParam("doubleCol") BigDecimal doubleCol, @RequestParam("bitCol") Boolean bitCol, @RequestParam("booleanCol") Boolean booleanCol, @RequestParam("serialCol") BigInteger serialCol, @RequestParam("dateCol") Date dateCol, @RequestParam("datetimeCol") LocalDateTime datetimeCol, @RequestParam("timestampCol") Date timestampCol, @RequestParam("timeCol") Date timeCol, @RequestParam("charCol") Character charCol, @RequestParam("varcharCol") String varcharCol, @RequestParam("tinytextCol") String tinytextCol, @RequestParam("textCol") String textCol, @RequestParam("mediumTextCol") String mediumTextCol, @RequestParam("longtextCol") String longtextCol, @RequestParam("blobCol") byte[] blobCol, @RequestParam("longblobCol") byte[] longblobCol, MultipartHttpServletRequest multipartHttpServletRequest) throws EntityNotFoundException { AllExternalTypesId allexternaltypesId = new AllExternalTypesId(); allexternaltypesId.setTinyIntCol(tinyIntCol); allexternaltypesId.setSmallIntCol(smallIntCol); allexternaltypesId.setMediumIntCol(mediumIntCol); allexternaltypesId.setIntCol(intCol); allexternaltypesId.setBigintCol(bigintCol); allexternaltypesId.setDecimalCol(decimalCol); allexternaltypesId.setFloatCol(floatCol); allexternaltypesId.setDoubleCol(doubleCol); allexternaltypesId.setBitCol(bitCol); allexternaltypesId.setBooleanCol(booleanCol); allexternaltypesId.setSerialCol(serialCol); allexternaltypesId.setDateCol(dateCol); allexternaltypesId.setDatetimeCol(datetimeCol); allexternaltypesId.setTimestampCol(timestampCol); allexternaltypesId.setTimeCol(timeCol); allexternaltypesId.setCharCol(charCol); allexternaltypesId.setVarcharCol(varcharCol); allexternaltypesId.setTinytextCol(tinytextCol); allexternaltypesId.setTextCol(textCol); allexternaltypesId.setMediumTextCol(mediumTextCol); allexternaltypesId.setLongtextCol(longtextCol); allexternaltypesId.setBlobCol(blobCol); allexternaltypesId.setLongblobCol(longblobCol); AllExternalTypes newAllExternalTypes = WMMultipartUtils.toObject(multipartHttpServletRequest, AllExternalTypes.class, "dbscenarios"); AllExternalTypes oldAllExternalTypes = allExternalTypesService.getById(allexternaltypesId); WMMultipartUtils.updateLobsContent(oldAllExternalTypes, newAllExternalTypes); newAllExternalTypes.setTinyIntCol(tinyIntCol); newAllExternalTypes.setSmallIntCol(smallIntCol); newAllExternalTypes.setMediumIntCol(mediumIntCol); newAllExternalTypes.setIntCol(intCol); newAllExternalTypes.setBigintCol(bigintCol); newAllExternalTypes.setDecimalCol(decimalCol); newAllExternalTypes.setFloatCol(floatCol); newAllExternalTypes.setDoubleCol(doubleCol); newAllExternalTypes.setBitCol(bitCol); newAllExternalTypes.setBooleanCol(booleanCol); newAllExternalTypes.setSerialCol(serialCol); newAllExternalTypes.setDateCol(dateCol); newAllExternalTypes.setDatetimeCol(datetimeCol); newAllExternalTypes.setTimestampCol(timestampCol); newAllExternalTypes.setTimeCol(timeCol); newAllExternalTypes.setCharCol(charCol); newAllExternalTypes.setVarcharCol(varcharCol); newAllExternalTypes.setTinytextCol(tinytextCol); newAllExternalTypes.setTextCol(textCol); newAllExternalTypes.setMediumTextCol(mediumTextCol); newAllExternalTypes.setLongtextCol(longtextCol); newAllExternalTypes.setBlobCol(blobCol); newAllExternalTypes.setLongblobCol(longblobCol); LOGGER.debug("AllExternalTypes details with id is updated with: {}", newAllExternalTypes); return allExternalTypesService.update(newAllExternalTypes); } @ApiOperation(value = "Deletes the AllExternalTypes instance associated with the given composite-id.") @RequestMapping(value = "/composite-id", method = RequestMethod.DELETE) @WMAccessVisibility(value = AccessSpecifier.APP_ONLY) public boolean deleteAllExternalTypes(@RequestParam("tinyIntCol") Short tinyIntCol, @RequestParam("smallIntCol") Short smallIntCol, @RequestParam("mediumIntCol") Integer mediumIntCol, @RequestParam("intCol") Integer intCol, @RequestParam("bigintCol") BigInteger bigintCol, @RequestParam("decimalCol") Integer decimalCol, @RequestParam("floatCol") Double floatCol, @RequestParam("doubleCol") BigDecimal doubleCol, @RequestParam("bitCol") Boolean bitCol, @RequestParam("booleanCol") Boolean booleanCol, @RequestParam("serialCol") BigInteger serialCol, @RequestParam("dateCol") Date dateCol, @RequestParam("datetimeCol") LocalDateTime datetimeCol, @RequestParam("timestampCol") Date timestampCol, @RequestParam("timeCol") Date timeCol, @RequestParam("charCol") Character charCol, @RequestParam("varcharCol") String varcharCol, @RequestParam("tinytextCol") String tinytextCol, @RequestParam("textCol") String textCol, @RequestParam("mediumTextCol") String mediumTextCol, @RequestParam("longtextCol") String longtextCol, @RequestParam("blobCol") byte[] blobCol, @RequestParam("longblobCol") byte[] longblobCol) throws EntityNotFoundException { AllExternalTypesId allexternaltypesId = new AllExternalTypesId(); allexternaltypesId.setTinyIntCol(tinyIntCol); allexternaltypesId.setSmallIntCol(smallIntCol); allexternaltypesId.setMediumIntCol(mediumIntCol); allexternaltypesId.setIntCol(intCol); allexternaltypesId.setBigintCol(bigintCol); allexternaltypesId.setDecimalCol(decimalCol); allexternaltypesId.setFloatCol(floatCol); allexternaltypesId.setDoubleCol(doubleCol); allexternaltypesId.setBitCol(bitCol); allexternaltypesId.setBooleanCol(booleanCol); allexternaltypesId.setSerialCol(serialCol); allexternaltypesId.setDateCol(dateCol); allexternaltypesId.setDatetimeCol(datetimeCol); allexternaltypesId.setTimestampCol(timestampCol); allexternaltypesId.setTimeCol(timeCol); allexternaltypesId.setCharCol(charCol); allexternaltypesId.setVarcharCol(varcharCol); allexternaltypesId.setTinytextCol(tinytextCol); allexternaltypesId.setTextCol(textCol); allexternaltypesId.setMediumTextCol(mediumTextCol); allexternaltypesId.setLongtextCol(longtextCol); allexternaltypesId.setBlobCol(blobCol); allexternaltypesId.setLongblobCol(longblobCol); LOGGER.debug("Deleting AllExternalTypes with id: {}", allexternaltypesId); AllExternalTypes allExternalTypes = allExternalTypesService.delete(allexternaltypesId); return allExternalTypes != null; } /** * @deprecated Use {@link #findAllExternalTypes(String, Pageable)} instead. */ @Deprecated @ApiOperation(value = "Returns the list of AllExternalTypes instances matching the search criteria.") @RequestMapping(value = "/search", method = RequestMethod.POST) @WMAccessVisibility(value = AccessSpecifier.APP_ONLY) public Page<AllExternalTypes> searchAllExternalTypesByQueryFilters(Pageable pageable, @RequestBody QueryFilter[] queryFilters) { LOGGER.debug("Rendering AllExternalTypes list"); return allExternalTypesService.findAll(queryFilters, pageable); } @ApiOperation(value = "Returns the list of AllExternalTypes instances matching the search criteria.") @RequestMapping(method = RequestMethod.GET) @WMAccessVisibility(value = AccessSpecifier.APP_ONLY) public Page<AllExternalTypes> findAllExternalTypes( @ApiParam("conditions to filter the results") @RequestParam(value = "q", required = false) String query, Pageable pageable) { LOGGER.debug("Rendering AllExternalTypes list"); return allExternalTypesService.findAll(query, pageable); } @ApiOperation(value = "Returns downloadable file for the data.") @RequestMapping(value = "/export/{exportType}", method = RequestMethod.GET, produces = "application/octet-stream") @WMAccessVisibility(value = AccessSpecifier.APP_ONLY) public Downloadable exportAllExternalTypes(@PathVariable("exportType") ExportType exportType, @ApiParam("conditions to filter the results") @RequestParam(value = "q", required = false) String query, Pageable pageable) { return allExternalTypesService.export(exportType, query, pageable); } @ApiOperation(value = "Returns the total count of AllExternalTypes instances.") @RequestMapping(value = "/count", method = RequestMethod.GET) @WMAccessVisibility(value = AccessSpecifier.APP_ONLY) public Long countAllExternalTypes( @ApiParam("conditions to filter the results") @RequestParam(value = "q", required = false) String query) { LOGGER.debug("counting AllExternalTypes"); return allExternalTypesService.count(query); } /** * This setter method should only be used by unit tests * * @param service AllExternalTypesService instance */ protected void setAllExternalTypesService(AllExternalTypesService service) { this.allExternalTypesService = service; } }