コード例 #1
0
 public AssetEntity editAsset(HttpServletRequest request) {
   Long assetId = (long) request.getSession().getAttribute("assetId");
   request.removeAttribute("assetId");
   String assetName = request.getParameter("assetName");
   int assetQuantity = Integer.parseInt(request.getParameter("assetQuantity"));
   String assetCondition = request.getParameter("assetCondition");
   double assetCost = Double.parseDouble(request.getParameter("assetCost"));
   return assetManagerSessionLocal.editAsset(
       assetId, assetName, assetQuantity, assetCondition, assetCost);
 }
コード例 #2
0
 public AssetEntity createNewAsset(HttpServletRequest request) {
   long facilityId = Long.parseLong((String) request.getSession().getAttribute("facilityId"));
   request.removeAttribute("facilityId");
   String assetName = request.getParameter("assetName");
   int assetQuantity = Integer.parseInt(request.getParameter("assetQuantity"));
   String assetCondition = request.getParameter("assetCondition");
   double assetCost = Double.parseDouble(request.getParameter("assetCost"));
   return assetManagerSessionLocal.addAsset(
       assetName, assetQuantity, assetCondition, assetCost, facilityId);
 }
コード例 #3
0
 public void deleteAsset(HttpServletRequest request) {
   Long assetId = Long.parseLong(request.getParameter("assetId"));
   assetManagerSessionLocal.deleteAsset(assetId);
 }
コード例 #4
0
 public AssetEntity getAsset(HttpServletRequest request) {
   Long assetId = Long.parseLong(request.getParameter("assetId"));
   return assetManagerSessionLocal.getAsset(assetId);
 }