diff options
author | Marcus G K Williams <marcus.williams@intel.com> | 2017-08-02 15:09:24 -0700 |
---|---|---|
committer | Marcus G K Williams <marcus.williams@intel.com> | 2017-08-02 16:08:09 -0700 |
commit | 806052bf4df8bd023cfb391794bc5937f2624716 (patch) | |
tree | 166e4a28582d96eaf3a8dd69b484cf02076d634c /resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDaoImpl.java | |
parent | 16508ffde287f481791ae0b9c071f60a331c680d (diff) |
Convert tabs to spaces
Per Java Code Style Guide: https://wiki.onap.org/display/DW/Java+code+style
Converting tabs to 4 spaces.
Issue-Id: SDNC-25
Change-Id: I99ce6c244df72f805b52d0d66403d8b76d9929ae
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
Diffstat (limited to 'resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDaoImpl.java')
-rw-r--r-- | resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDaoImpl.java | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDaoImpl.java index ea0bd7715..b0cc7d2cc 100644 --- a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDaoImpl.java +++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDaoImpl.java @@ -3,7 +3,7 @@ * openECOMP : SDN-C * ================================================================================ * Copyright (C) 2017 ONAP Intellectual Property. All rights - * reserved. + * reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,53 +33,53 @@ import org.springframework.jdbc.core.RowMapper; public class MaxPortSpeedDaoImpl implements MaxPortSpeedDao { - @SuppressWarnings("unused") - private static final Logger log = LoggerFactory.getLogger(MaxPortSpeedDaoImpl.class); + @SuppressWarnings("unused") + private static final Logger log = LoggerFactory.getLogger(MaxPortSpeedDaoImpl.class); - private final static String GET_SQL = - "SELECT * FROM MAX_PORT_SPEED WHERE image_file_name = ? AND end_point_position = ? AND interface_name = ?"; + private final static String GET_SQL = + "SELECT * FROM MAX_PORT_SPEED WHERE image_file_name = ? AND end_point_position = ? AND interface_name = ?"; - private JdbcTemplate jdbcTemplate; - private long defaultMaxPortSpeed = 5000000; - private SpeedUtil speedUtil; + private JdbcTemplate jdbcTemplate; + private long defaultMaxPortSpeed = 5000000; + private SpeedUtil speedUtil; - @Override - public long getMaxPortSpeed(String imageFile, String endPointPosition, String interfaceName) { - List<MaxPortSpeed> maxPortSpeedList = - jdbcTemplate.query(GET_SQL, new Object[] { imageFile, endPointPosition, interfaceName }, - new RowMapper<MaxPortSpeed>() { + @Override + public long getMaxPortSpeed(String imageFile, String endPointPosition, String interfaceName) { + List<MaxPortSpeed> maxPortSpeedList = + jdbcTemplate.query(GET_SQL, new Object[] { imageFile, endPointPosition, interfaceName }, + new RowMapper<MaxPortSpeed>() { - @Override - public MaxPortSpeed mapRow(ResultSet rs, int rowNum) throws SQLException { - MaxPortSpeed mps = new MaxPortSpeed(); - mps.maxSpeed = rs.getLong("max_speed"); - mps.unit = rs.getString("unit"); - return mps; - } - }); + @Override + public MaxPortSpeed mapRow(ResultSet rs, int rowNum) throws SQLException { + MaxPortSpeed mps = new MaxPortSpeed(); + mps.maxSpeed = rs.getLong("max_speed"); + mps.unit = rs.getString("unit"); + return mps; + } + }); - if (maxPortSpeedList.isEmpty()) - return defaultMaxPortSpeed; + if (maxPortSpeedList.isEmpty()) + return defaultMaxPortSpeed; - MaxPortSpeed mps = maxPortSpeedList.get(0); - return speedUtil.convertToKbps(mps.maxSpeed, mps.unit); - } + MaxPortSpeed mps = maxPortSpeedList.get(0); + return speedUtil.convertToKbps(mps.maxSpeed, mps.unit); + } - private static class MaxPortSpeed { + private static class MaxPortSpeed { - public long maxSpeed; - public String unit; - } + public long maxSpeed; + public String unit; + } - public void setJdbcTemplate(JdbcTemplate jdbcTemplate) { - this.jdbcTemplate = jdbcTemplate; - } + public void setJdbcTemplate(JdbcTemplate jdbcTemplate) { + this.jdbcTemplate = jdbcTemplate; + } - public void setDefaultMaxPortSpeed(long defaultMaxPortSpeed) { - this.defaultMaxPortSpeed = defaultMaxPortSpeed; - } + public void setDefaultMaxPortSpeed(long defaultMaxPortSpeed) { + this.defaultMaxPortSpeed = defaultMaxPortSpeed; + } - public void setSpeedUtil(SpeedUtil speedUtil) { - this.speedUtil = speedUtil; - } + public void setSpeedUtil(SpeedUtil speedUtil) { + this.speedUtil = speedUtil; + } } |