From fe141929877051957e67f3cc2178da29d2183c59 Mon Sep 17 00:00:00 2001 From: "guillaume.lambert" Date: Tue, 5 May 2020 15:19:19 +0200 Subject: [PATCH] fix some inventory issues SpotBugs issues - Huge string constants duplicated across multiple class files - unused local variables Checkstyle issue - 120 characters line length enforced in queries strings JIRA: TRNSPRTPCE-207 TRNSPRTPCE-241 TRNSPRTPCE-265 Signed-off-by: guillaume.lambert Change-Id: I8b4971f503897df566eb833fb01b8693e451dc68 --- .../transportpce/inventory/INode121.java | 4 +- .../transportpce/inventory/INode221.java | 4 +- .../transportpce/inventory/query/Queries.java | 391 +++++++++++++----- 3 files changed, 298 insertions(+), 101 deletions(-) diff --git a/inventory/src/main/java/org/opendaylight/transportpce/inventory/INode121.java b/inventory/src/main/java/org/opendaylight/transportpce/inventory/INode121.java index b969c6d0d..5fd8b089c 100644 --- a/inventory/src/main/java/org/opendaylight/transportpce/inventory/INode121.java +++ b/inventory/src/main/java/org/opendaylight/transportpce/inventory/INode121.java @@ -619,7 +619,7 @@ public class INode121 { String maintTestsignalTypeEnu = ""; String otuFecEnu = ""; String otuMaintTypeEnu = ""; - String otsFiberTypeEnu = ""; + //String otsFiberTypeEnu = ""; String ethernetSpeed = "-1"; String ethernetFec = ""; String ethernetMtu = "-1"; @@ -730,7 +730,7 @@ public class INode121 { org.opendaylight.yang.gen.v1 .http.org.openroadm.optical.transport.interfaces.rev161014.Interface1.class) .getOts()); - otsFiberTypeEnu = String.valueOf(otsIfBuilder.getFiberType().getIntValue()); + //otsFiberTypeEnu = String.valueOf(otsIfBuilder.getFiberType().getIntValue()); otsSpanLossReceive = otsIfBuilder.getSpanLossReceive().toString(); otsSpanLossTransmit = otsIfBuilder.getSpanLossTransmit().toString(); break; diff --git a/inventory/src/main/java/org/opendaylight/transportpce/inventory/INode221.java b/inventory/src/main/java/org/opendaylight/transportpce/inventory/INode221.java index 27a959af6..2aff959d8 100644 --- a/inventory/src/main/java/org/opendaylight/transportpce/inventory/INode221.java +++ b/inventory/src/main/java/org/opendaylight/transportpce/inventory/INode221.java @@ -601,7 +601,7 @@ public class INode221 { org.opendaylight.yang.gen.v1 .http.org.openroadm.optical.transport.interfaces.rev161014.Interface1.class) .getOts()); - int otsFiberTypeEnu = otsIfBuilder.getFiberType().getIntValue(); + //otsFiberTypeEnu = otsIfBuilder.getFiberType().getIntValue(); otsSpanLossReceive = otsIfBuilder.getSpanLossReceive().toString(); otsSpanLossTransmit = otsIfBuilder.getSpanLossTransmit().toString(); break; @@ -1305,7 +1305,7 @@ public class INode221 { SharedRiskGroup sharedRiskGroup = deviceObject.get().getSharedRiskGroup().get(i); String maxAddDropPorts = sharedRiskGroup.getMaxAddDropPorts().toString(); String srgNumber = sharedRiskGroup.getSrgNumber().toString(); - int wavelengthDuplicationEnu = sharedRiskGroup.getWavelengthDuplication().getIntValue(); + //int wavelengthDuplicationEnu = sharedRiskGroup.getWavelengthDuplication().getIntValue(); persistDevSrgCircuitPacks(nodeId, sharedRiskGroup, srgNumber, connection); //String currentProvisionedAddDropPorts = ""; //String mcCapSlotWidthGranularity = ""; diff --git a/inventory/src/main/java/org/opendaylight/transportpce/inventory/query/Queries.java b/inventory/src/main/java/org/opendaylight/transportpce/inventory/query/Queries.java index c0b2e34a9..0ffd8e975 100644 --- a/inventory/src/main/java/org/opendaylight/transportpce/inventory/query/Queries.java +++ b/inventory/src/main/java/org/opendaylight/transportpce/inventory/query/Queries.java @@ -11,80 +11,220 @@ package org.opendaylight.transportpce.inventory.query; import com.google.common.base.Preconditions; import com.google.common.base.Strings; -@SuppressWarnings("checkstyle:LineLength") public final class Queries { - private static final String DEVICE_INFO_INSERT = - "INSERT INTO %sinv_dev_info (node_id, node_number, node_type, clli, vendor, model, serial_id, ipAddress, prefix_length, default_gateway, " - + "source, current_ipAddress, current_prefix_length, current_default_gateway, macAddress, software_version, openroadm_version, " - + "template, current_datetime, geo_latitude, geo_longitude, max_degrees, max_srgs, max_num_bin_15min_historical_pm, " - + "max_num_bin_24hour_historical_pm, sw_version, sw_validation_timer, activation_date_time, create_date, update_date) VALUES " + private static final String DEVICE_INFO_INSERT; + + private static final String DEVICE_SHELF_INSERT; + + private static final String DEVICE_SHELF_SLOT_INSERT; + + private static final String DEVICE_CP_INSERT; + + private static final String DEVICE_CP_PORT_INSERT; + + private static final String DEVICE_CP_SLOT_INSERT; + + private static final String DEVICE_INTERFACES_INSERT; + + private static final String DEVICE_INTERFACE_ODU_OPU_MIS_TX_INSERT; + + private static final String DEVICE_INTERFACE_ODU_OPU_MIS_RX_INSERT; + + private static final String DEVICE_INTERFACE_ODU_OPU_MIS_EXP_INSERT; + + private static final String DEVICE_INTERFACE_TCM_INSERT; + + private static final String DEVICE_PROTOCOL_INSERT; + + private static final String DEVICE_PROTOCOL_PORT_CONFIG_INSERT; + + private static final String DEVICE_PROTOCOL_LLDP_NBR_LIST_INSERT; + + private static final String DEVICE_PROTOCOL_RSTP_INSERT; + + private static final String DEVICE_PROTOCOL_RSTP_BRIDGEPORT_INSERT; + + private static final String DEVICE_PROTOCOL_RSTP_BRIDGEPORT_ATTR_INSERT; + + private static final String DEVICE_INTERNAL_LINK_INSERT; + + private static final String DEVICE_EXTERNAL_LINK_INSERT; + + private static final String DEVICE_PHYSICAL_LINK_INSERT; + + private static final String DEVICE_DEGREE_INSERT; + + private static final String DEVICE_DEGREE_CIRCUITPACK_INSERT; + + private static final String DEVICE_CONNECTION_PORT_INSERT; + + private static final String DEVICE_SHARED_RISK_GROUP_INSERT; + + private static final String DEVICE_SRG_CIRCUITPACK_INSERT; + + private static final String DEVICE_ROADM_CONNECTIONS_INSERT; + + private static final String DEVICE_CONNECTION_MAP_INSERT; + + private static final String DEVICE_WAVELENGTH_INSERT; + + private static final String SERVICE_PATH_LIST; + + private static final String SERVICE_UPDATE; + + private static final String SERVICE_EVENT_INSERT; + + private static final String SERVICE_INSERT; + + private static final String SERVICE_HCON_CREATE; + + private static final String SERVICE_HCON_DIVERSITY_CREATE; + + private static final String SERVICE_HCON_DIVERSITY_CAPABILITY_CREATE; + + private static final String SERVICE_HCON_COMPONENT_CREATE; + + private static final String SERVICE_HCON_COROUTING_CREATE; + + private static final String SERVICE_SCON_CREATE; + + private static final String SERVICE_SCON_DIVERSITY_CREATE; + + private static final String SERVICE_SCON_DIVERSITY_CAPABILITY_CREATE; + + private static final String SERVICE_SCON_COMPONENT_CREATE; + + private static final String SERVICE_SCON_COROUTING_CREATE; + + private static final String SERVICE_FIBERSPAN_SRLG_CREATE; + + private static final String SERVICE_EQUIPMENT_SRG_CREATE; + + private static final String SERVICE_SUPPORTING_SVC_CREATE; + + private static final String SERVICE_DELETE; + + static { + + DEVICE_INFO_INSERT = + "INSERT INTO %sinv_dev_info (node_id, node_number, node_type, clli, vendor, model, serial_id, ipAddress, " + + " prefix_length, default_gateway, " + + "source, current_ipAddress, current_prefix_length, current_default_gateway, macAddress, " + + "software_version, openroadm_version, " + + "template, current_datetime, geo_latitude, geo_longitude, max_degrees, max_srgs, " + + "max_num_bin_15min_historical_pm, " + + "max_num_bin_24hour_historical_pm, sw_version, sw_validation_timer, activation_date_time, create_date, " + + "update_date) VALUES " + "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_SHELF_INSERT = "INSERT INTO %sinv_dev_shelf" - + " (node_id, shelf_name, shelf_type, rack, shelf_position, administrative_state, vendor, model, serial_id, type, product_code, manufacture_date, clei, hardware_version, operational_state, equipment_state, due_date, " + DEVICE_SHELF_INSERT = + "INSERT INTO %sinv_dev_shelf" + + " (node_id, shelf_name, shelf_type, rack, shelf_position, administrative_state, vendor, model, " + + "serial_id, type, product_code, manufacture_date, clei, hardware_version, operational_state, " + + "equipment_state, due_date, " + "create_date, update_date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_SHELF_SLOT_INSERT = "INSERT INTO %sinv_dev_shelf_slot " - + " (node_id, shelf_name, slot_name, label, provisioned_circuit_pack, slot_status, create_date, update_date) " + DEVICE_SHELF_SLOT_INSERT = + "INSERT INTO %sinv_dev_shelf_slot " + + " (node_id, shelf_name, slot_name, label, provisioned_circuit_pack, slot_status, create_date, " + + "update_date) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_CP_INSERT = "INSERT INTO %sinv_dev_circuit_pack" - + " (node_id, circuit_pack_name, circuit_pack_type, circuit_pack_product_code, administrative_state, vendor, model, serial_id, type, " - + " product_code, manufacture_date, clei, hardware_version, operational_state, cpc_type, cpc_extension, equipment_state, circuit_pack_mode, shelf, slot, " + DEVICE_CP_INSERT = + "INSERT INTO %sinv_dev_circuit_pack" + + " (node_id, circuit_pack_name, circuit_pack_type, circuit_pack_product_code, administrative_state, " + + "vendor, model, serial_id, type, " + + " product_code, manufacture_date, clei, hardware_version, operational_state, cpc_type, cpc_extension, " + + "equipment_state, circuit_pack_mode, shelf, slot, " + " subSlot, due_date, pcp_circuit_pack_name, pcp_cp_slot_name, create_date, update_date) " + " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_CP_PORT_INSERT = "INSERT INTO %sinv_dev_cp_ports " - + " (node_id, circuit_pack_name, port_name, port_type, port_qual, port_wavelength_type, port_direction, label, circuit_id, " - + "administrative_state, operational_state, logical_connection_point, partner_port_circuit_pack_name, partner_port_port_name, parent_port_circuit_pack_name, " - + "parent_port_port_name, roadm_port_port_power_capability_min_rx, roadm_port_port_power_capability_min_tx, roadm_port_port_power_capability_max_rx, " - + "roadm_port_port_power_capability_max_tx, roadm_port_capable_wavelengths, roadm_port_available_wavelengths, roadm_port_used_wavelengths, " - + "transponder_port_port_power_capability_min_rx, transponder_port_port_power_capability_min_tx, transponder_port_port_power_capability_max_rx, " - + "transponder_port_port_power_capability_max_tx, transponder_port_capable_wavelengths, otdr_port_launch_cable_length, otdr_port_port_direction, " - + "ila_port_port_power_capability_mix_rx, ila_port_port_power_capability_mix_tx, ila_port_port_power_capability_max_rx, ila_port_port_power_capability_max_tx, " + DEVICE_CP_PORT_INSERT = + "INSERT INTO %sinv_dev_cp_ports " + + " (node_id, circuit_pack_name, port_name, port_type, port_qual, port_wavelength_type, port_direction, " + + "label, circuit_id, " + + "administrative_state, operational_state, logical_connection_point, partner_port_circuit_pack_name, " + + "partner_port_port_name, parent_port_circuit_pack_name, " + + "parent_port_port_name, roadm_port_port_power_capability_min_rx, " + + "roadm_port_port_power_capability_min_tx, roadm_port_port_power_capability_max_rx, " + + "roadm_port_port_power_capability_max_tx, roadm_port_capable_wavelengths, " + + "roadm_port_available_wavelengths, roadm_port_used_wavelengths, " + + "transponder_port_port_power_capability_min_rx, transponder_port_port_power_capability_min_tx, " + + "transponder_port_port_power_capability_max_rx, " + + "transponder_port_port_power_capability_max_tx, transponder_port_capable_wavelengths, " + + "otdr_port_launch_cable_length, otdr_port_port_direction, " + + "ila_port_port_power_capability_mix_rx, ila_port_port_power_capability_mix_tx, " + + "ila_port_port_power_capability_max_rx, ila_port_port_power_capability_max_tx, " + "create_date, update_date) " - + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; + + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + + "?, ?, ?, ?)"; - private static final String DEVICE_CP_SLOT_INSERT = "INSERT INTO %sinv_dev_cp_slots " - + " (node_id, circuit_pack_name, slot_name, label, provisioned_circuit_pack, slot_status, slot_type, create_date, update_date) " + DEVICE_CP_SLOT_INSERT = + "INSERT INTO %sinv_dev_cp_slots " + + " (node_id, circuit_pack_name, slot_name, label, provisioned_circuit_pack, slot_status, slot_type, " + + "create_date, update_date) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_INTERFACES_INSERT = "INSERT INTO %sinv_dev_interfaces " - + " (node_id, name, description, type, administrative_state, operational_state, circuit_id, supporting_interface, supporting_circuit_pack_name, " - + "supporting_port, ethernet_speed, ethernet_fec, ethernet_duplex, ethernet_mtu, ethernet_auto_negotiation, ethernet_curr_speed, " - + "ethernet_curr_duplex, mci_mcttp_min_freq, mci_mcttp_max_freq, mci_mcttp_center_freq, mci_mcttp_slot_width, mci_nmc_ctp_frequency, mci_nmc_ctp_width, " - + "och_rate, och_frequency, och_width, och_wavelength_number, och_modulation_format, och_transmit_power, ots_fiber_type, ots_span_loss_receive, " - + "ots_span_loss_transmit, ots_ingress_span_loss_aging_margin, ots_eol_max_load_pin, odu_rate, odu_function, odu_monitoring_mode, odu_no_oam_function, " - + "odu_proactive_delay_measurement_enabled, odu_poa_trib_port_number, odu_tx_sapi, odu_tx_dapi, odu_tx_operator, odu_accepted_sapi, odu_accepted_dapi, " - + "odu_accepted_operator, odu_expected_sapi, odu_expected_dapi, odu_tim_act_enabled, odu_tim_detect_mode, odu_degm_intervals, odu_degthr_percentage, " - + "opu_payload_type, opu_rx_payload_type, opu_exp_payload_type, opu_payload_interface, maint_testsignal_enabled, maint_testsignal_testpattern, " - + "maint_testsignal_type, maint_testsignal_biterrors, maint_testsignal_biterrorsterminal, maint_testsignal_syncseconds, " - + "maint_testsignal_syncsecondsterminal, otu_rate, otu_fec, otu_tx_sapi, otu_tx_dapi, otu_tx_operator, otu_accepted_sapi, otu_accepted_dapi, " - + "otu_accepted_operator, otu_expected_sapi, otu_expected_dapi, otu_tim_act_enabled, otu_tim_detect_mode, otu_degm_intervals, otu_degthr_percentage, " - + "otu_maint_loopback_enabled, otu_maint_type, mt_otu_rate, mt_otu_fec, mt_otu_maint_loopback, mt_otu_enabled, mt_otu_type, create_date, update_date) " - + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?," - + " ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - - private static final String DEVICE_INTERFACE_ODU_OPU_MIS_TX_INSERT = "INSERT INTO %sinv_dev_interface_odu_opu_tx_msi " - + " (node_id, interface_name, trib_slot, odtu_type, trib_port, trib_port_payload, create_date, update_date ) " + DEVICE_INTERFACES_INSERT = + "INSERT INTO %sinv_dev_interfaces " + + " (node_id, name, description, type, administrative_state, operational_state, circuit_id, " + + "supporting_interface, supporting_circuit_pack_name, " + + "supporting_port, ethernet_speed, ethernet_fec, ethernet_duplex, ethernet_mtu, " + + "ethernet_auto_negotiation, ethernet_curr_speed, " + + "ethernet_curr_duplex, mci_mcttp_min_freq, mci_mcttp_max_freq, mci_mcttp_center_freq, " + + "mci_mcttp_slot_width, mci_nmc_ctp_frequency, mci_nmc_ctp_width, " + + "och_rate, och_frequency, och_width, och_wavelength_number, och_modulation_format, och_transmit_power, " + + "ots_fiber_type, ots_span_loss_receive, " + + "ots_span_loss_transmit, ots_ingress_span_loss_aging_margin, ots_eol_max_load_pin, odu_rate, " + + "odu_function, odu_monitoring_mode, odu_no_oam_function, " + + "odu_proactive_delay_measurement_enabled, odu_poa_trib_port_number, odu_tx_sapi, odu_tx_dapi, " + + "odu_tx_operator, odu_accepted_sapi, odu_accepted_dapi, " + + "odu_accepted_operator, odu_expected_sapi, odu_expected_dapi, odu_tim_act_enabled, odu_tim_detect_mode, " + + "odu_degm_intervals, odu_degthr_percentage, " + + "opu_payload_type, opu_rx_payload_type, opu_exp_payload_type, opu_payload_interface, " + + "maint_testsignal_enabled, maint_testsignal_testpattern, " + + "maint_testsignal_type, maint_testsignal_biterrors, maint_testsignal_biterrorsterminal, " + + "maint_testsignal_syncseconds, " + + "maint_testsignal_syncsecondsterminal, otu_rate, otu_fec, otu_tx_sapi, otu_tx_dapi, otu_tx_operator, " + + "otu_accepted_sapi, otu_accepted_dapi, " + + "otu_accepted_operator, otu_expected_sapi, otu_expected_dapi, otu_tim_act_enabled, otu_tim_detect_mode, " + + "otu_degm_intervals, otu_degthr_percentage, " + + "otu_maint_loopback_enabled, otu_maint_type, mt_otu_rate, mt_otu_fec, mt_otu_maint_loopback, " + + "mt_otu_enabled, mt_otu_type, create_date, update_date) " + + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + + "?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + + "?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + + "?, ?)"; + + DEVICE_INTERFACE_ODU_OPU_MIS_TX_INSERT = + "INSERT INTO %sinv_dev_interface_odu_opu_tx_msi " + + " (node_id, interface_name, trib_slot, odtu_type, trib_port, trib_port_payload, create_date, " + + "update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_INTERFACE_ODU_OPU_MIS_RX_INSERT = "INSERT INTO %sinv_dev_interface_odu_opu_rx_msi " - + " (node_id, interface_name, trib_slot, odtu_type, trib_port, trib_port_payload, create_date, update_date ) " + DEVICE_INTERFACE_ODU_OPU_MIS_RX_INSERT = + "INSERT INTO %sinv_dev_interface_odu_opu_rx_msi " + + " (node_id, interface_name, trib_slot, odtu_type, trib_port, trib_port_payload, create_date, " + + "update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_INTERFACE_ODU_OPU_MIS_EXP_INSERT = "INSERT INTO %sinv_dev_interface_odu_opu_exp_msi " - + " (node_id, interface_name, trib_slot, odtu_type, trib_port, trib_port_payload, create_date, update_date ) " + DEVICE_INTERFACE_ODU_OPU_MIS_EXP_INSERT = + "INSERT INTO %sinv_dev_interface_odu_opu_exp_msi " + + " (node_id, interface_name, trib_slot, odtu_type, trib_port, trib_port_payload, create_date, " + + "update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_INTERFACE_TCM_INSERT = "INSERT INTO %sinv_dev_interface_odu_tcm " - + " (node_id, interface_name, layer, monitoring_mode, ltc_act_enabled, proactive_delay_measurement_enabled, tcm_direction, tx_sapi, tx_dapi, tx_operator, accepted_sapi," - + " accepted_dapi, accepted_operator, expected_sapi, expected_dapi, tim_act_enabled, tim_detect_mode, degm_intervals, degthr_percentage, create_date, update_date ) " + DEVICE_INTERFACE_TCM_INSERT = + "INSERT INTO %sinv_dev_interface_odu_tcm " + + " (node_id, interface_name, layer, monitoring_mode, ltc_act_enabled, " + + "proactive_delay_measurement_enabled, tcm_direction, tx_sapi, tx_dapi, tx_operator, accepted_sapi, " + + "accepted_dapi, accepted_operator, expected_sapi, expected_dapi, tim_act_enabled, tim_detect_mode, " + + "degm_intervals, degthr_percentage, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )"; - private static final String DEVICE_PROTOCOL_INSERT = + DEVICE_PROTOCOL_INSERT = "INSERT INTO %sinv_dev_proto_lldp" + "(node_id," + "adminstatus," @@ -99,69 +239,107 @@ public final class Queries { + "?," + "? )"; - private static final String DEVICE_PROTOCOL_PORT_CONFIG_INSERT = "INSERT INTO %sinv_dev_proto_lldp_port_config " + DEVICE_PROTOCOL_PORT_CONFIG_INSERT = + "INSERT INTO %sinv_dev_proto_lldp_port_config " + " (node_id, ifname, adminstatus, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ? )"; - private static final String DEVICE_PROTOCOL_LLDP_NBR_LIST_INSERT = "INSERT INTO %sinv_dev_proto_lldp_nbr_lst " - + " (node_id, ifname, remotesysname, remotemgmtaddresssubtype, remotemgmtaddress, remoteportidsubtype, remoteportid, remotechassisidsubtype, remotechassisid, create_date, update_date ) " + DEVICE_PROTOCOL_LLDP_NBR_LIST_INSERT = + "INSERT INTO %sinv_dev_proto_lldp_nbr_lst " + + " (node_id, ifname, remotesysname, remotemgmtaddresssubtype, remotemgmtaddress, remoteportidsubtype, " + + "remoteportid, remotechassisidsubtype, remotechassisid, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_PROTOCOL_RSTP_INSERT = "INSERT INTO %sinv_dev_proto_rstp " - + " (node_id, bridge_name, bridge_priority, shutdown, hold_time, hello_time, max_age, forward_delay, transmit_hold_count, " - + "root_bridge_port, root_path_cost, root_bridge_priority, root_bridge_id, root_hold_time, root_hello_time, root_max_age, " + DEVICE_PROTOCOL_RSTP_INSERT = + "INSERT INTO %sinv_dev_proto_rstp " + + " (node_id, bridge_name, bridge_priority, shutdown, hold_time, hello_time, max_age, forward_delay, " + + "transmit_hold_count, " + + "root_bridge_port, root_path_cost, root_bridge_priority, root_bridge_id, root_hold_time, " + + "root_hello_time, root_max_age, " + "root_forward_delay, bridge_id, topo_change_count, time_since_topo_change, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_PROTOCOL_RSTP_BRIDGEPORT_INSERT = "INSERT INTO %sinv_dev_proto_rstp_bridge_port " + DEVICE_PROTOCOL_RSTP_BRIDGEPORT_INSERT = + "INSERT INTO %sinv_dev_proto_rstp_bridge_port " + " (node_id, bridge_name, ifname, cost, priority, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_PROTOCOL_RSTP_BRIDGEPORT_ATTR_INSERT = "INSERT INTO %sinv_dev_proto_rstp_bridge_port_attr " - + " (node_id, bridge_name, ifname, bridge_port_state, bridge_port_role, bridge_port_id, open_edge_bridge_port, designated_bridge_port, designated_bridgeid, create_date, update_date ) " + DEVICE_PROTOCOL_RSTP_BRIDGEPORT_ATTR_INSERT = + "INSERT INTO %sinv_dev_proto_rstp_bridge_port_attr " + + " (node_id, bridge_name, ifname, bridge_port_state, bridge_port_role, bridge_port_id, " + + "open_edge_bridge_port, designated_bridge_port, designated_bridgeid, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_INTERNAL_LINK_INSERT = "INSERT INTO %sinv_dev_internal_link " - + " (node_id, internal_link_name, source_circuit_pack_name, source_port_name, destination_circuit_pack_name, destination_port_name, create_date, update_date ) " + DEVICE_INTERNAL_LINK_INSERT = + "INSERT INTO %sinv_dev_internal_link " + + " (node_id, internal_link_name, source_circuit_pack_name, source_port_name, " + + "destination_circuit_pack_name, destination_port_name, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_EXTERNAL_LINK_INSERT = "INSERT INTO %sinv_dev_external_link " - + " (node_id, external_link_name, source_node_id, source_circuit_pack_name, source_port_name, destination_node_id, destination_circuit_pack_name, destination_port_name, create_date, update_date) " + + DEVICE_EXTERNAL_LINK_INSERT = + "INSERT INTO %sinv_dev_external_link " + + " (node_id, external_link_name, source_node_id, source_circuit_pack_name, source_port_name, " + + "destination_node_id, destination_circuit_pack_name, destination_port_name, create_date, update_date) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_PHYSICAL_LINK_INSERT = "INSERT INTO %sinv_dev_physical_link " - + " (node_id, physical_link_name, source_circuit_pack_name, source_port_name, destination_circuit_pack_name, destination_port_name, create_date, update_date ) " + + DEVICE_PHYSICAL_LINK_INSERT = + "INSERT INTO %sinv_dev_physical_link " + + " (node_id, physical_link_name, source_circuit_pack_name, source_port_name, " + + "destination_circuit_pack_name, destination_port_name, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_DEGREE_INSERT = "INSERT INTO %sinv_dev_degree " - + " (node_id, degree_number, max_wavelengths, otdr_port_circuit_pack_name, otdr_port_port_name, mc_capabilities_slot_width_granularity, mc_capabilities_center_freq_granularity, mc_capabilities_min_slots, mc_capabilities_max_slots, create_date, update_date ) " + + DEVICE_DEGREE_INSERT = + "INSERT INTO %sinv_dev_degree " + + " (node_id, degree_number, max_wavelengths, otdr_port_circuit_pack_name, otdr_port_port_name, " + + "mc_capabilities_slot_width_granularity, mc_capabilities_center_freq_granularity, " + + "mc_capabilities_min_slots, mc_capabilities_max_slots, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_DEGREE_CIRCUITPACK_INSERT = "INSERT INTO %sinv_dev_degree_circuit_packs " + + DEVICE_DEGREE_CIRCUITPACK_INSERT = + "INSERT INTO %sinv_dev_degree_circuit_packs " + " (node_id, degree_number, cktpk_index, circuit_pack_name, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_CONNECTION_PORT_INSERT = "INSERT INTO %sinv_dev_degree_connection_ports " + + DEVICE_CONNECTION_PORT_INSERT = + "INSERT INTO %sinv_dev_degree_connection_ports " + " (node_id, degree_number, conn_port_index, circuit_pack_name, port_name, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_SHARED_RISK_GROUP_INSERT = "INSERT INTO %sinv_dev_srg " - + " (node_id, max_add_drop_ports, current_provisioned_add_drop_ports, srg_number, wavelength_duplication, mc_cap_slot_width_granularity, mc_cap_center_freq_granularity, mc_cap_min_slots, mc_cap_max_slots, create_date, update_date ) " + + DEVICE_SHARED_RISK_GROUP_INSERT = + "INSERT INTO %sinv_dev_srg " + + " (node_id, max_add_drop_ports, current_provisioned_add_drop_ports, srg_number, wavelength_duplication, " + + "mc_cap_slot_width_granularity, mc_cap_center_freq_granularity, mc_cap_min_slots, mc_cap_max_slots, " + + "create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_SRG_CIRCUITPACK_INSERT = "INSERT INTO %sinv_dev_srg_circuit_pack " + + DEVICE_SRG_CIRCUITPACK_INSERT = + "INSERT INTO %sinv_dev_srg_circuit_pack " + " (node_id, srg_number, ckptk_index, circuit_pack_name, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_ROADM_CONNECTIONS_INSERT = "INSERT INTO %sinv_dev_roadm_connections " - + " (node_id, connection_name, connection_number, wavelength_number, opticalcontrolmode, target_output_power, src_if, dst_if, create_date, update_date ) " + + DEVICE_ROADM_CONNECTIONS_INSERT = + "INSERT INTO %sinv_dev_roadm_connections " + + " (node_id, connection_name, connection_number, wavelength_number, opticalcontrolmode, " + + "target_output_power, src_if, dst_if, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_CONNECTION_MAP_INSERT = "INSERT INTO %sinv_dev_connection_map " - + " (node_id, connection_map_number, source_circuit_pack_name, source_port_name, create_date, update_date ) " + + DEVICE_CONNECTION_MAP_INSERT = + "INSERT INTO %sinv_dev_connection_map " + + " (node_id, connection_map_number, source_circuit_pack_name, source_port_name, create_date, " + + "update_date ) " + "VALUES (?, ?, ?, ?, ?, ?)"; - private static final String DEVICE_WAVELENGTH_INSERT = "INSERT INTO %sinv_dev_wavelength_map " + + DEVICE_WAVELENGTH_INSERT = "INSERT INTO %sinv_dev_wavelength_map " + " (node_id, wavelength_number, center_frequency, wavelength, create_date, update_date ) " + "VALUES (?, ?, ?, ?, ?, ?)"; - - private static final String SERVICE_PATH_LIST = + SERVICE_PATH_LIST = "INSERT INTO %sinv_ser_pathlist ( path_name ) values (?)"; - private static final String SERVICE_UPDATE = "UPDATE %sinv_ser_main " + SERVICE_UPDATE = + "UPDATE %sinv_ser_main " + "set " + "common_id = ? " + "sdnc_req_header_request_id = ? " @@ -269,7 +447,7 @@ public final class Queries { + "update_date" + " where service_name = ? "; - private static final String SERVICE_EVENT_INSERT = + SERVICE_EVENT_INSERT = "INSERT INTO %sinv_ser_events" + "(event," + "event_key," @@ -286,7 +464,7 @@ public final class Queries { + "?" + "? )"; - private static final String SERVICE_INSERT = + SERVICE_INSERT = "INSERT INTO %sinv_ser_main " + "( service_name, " + "common_id, " @@ -562,48 +740,67 @@ public final class Queries { + "?, " + "?) "; - - private static final String SERVICE_HCON_CREATE = "insert into @inv_ser_hcon (service_name, customer_code, create_date, update_date)" + SERVICE_HCON_CREATE = + "insert into @inv_ser_hcon (service_name, customer_code, create_date, update_date)" + "values (?, ?, ?, ?) "; - private static final String SERVICE_HCON_DIVERSITY_CREATE = "insert into @inv_ser_hcon_diversity_service (service_name, existing_service, create_date, update_date)" + SERVICE_HCON_DIVERSITY_CREATE = + "insert into @inv_ser_hcon_diversity_service (service_name, existing_service, create_date, update_date)" + "values (?, ?, ?, ?) "; - private static final String SERVICE_HCON_DIVERSITY_CAPABILITY_CREATE = "insert into @inv_ser_hcon_diversity_service_capability (service_name, site, node, srlg, create_date, update_date)" + SERVICE_HCON_DIVERSITY_CAPABILITY_CREATE = + "insert into @inv_ser_hcon_diversity_service_capability (service_name, site, node, srlg, create_date, " + + "update_date)" + "values (?, ?, ?, ?, ?) "; - private static final String SERVICE_HCON_COMPONENT_CREATE = "insert into @inv_ser_hcon_components (service_name, application, component, value, create_date, update_date)" + SERVICE_HCON_COMPONENT_CREATE = + "insert into @inv_ser_hcon_components (service_name, application, component, value, create_date, " + + "update_date)" + "values (?, ?, ?, ?, ?, ?) "; - private static final String SERVICE_HCON_COROUTING_CREATE = "insert into @inv_ser_hcon_corouting (service_name, existing_service, create_date, update_date)" + SERVICE_HCON_COROUTING_CREATE = + "insert into @inv_ser_hcon_corouting (service_name, existing_service, create_date, update_date)" + "values (?, ?, ?, ?) "; - private static final String SERVICE_SCON_CREATE = "insert into @inv_ser_scon (service_name, customer_code, create_date, update_date)" + SERVICE_SCON_CREATE = + "insert into @inv_ser_scon (service_name, customer_code, create_date, update_date)" + "values (?, ?, ?, ?) "; - private static final String SERVICE_SCON_DIVERSITY_CREATE = "insert into @inv_ser_scon_diversity_service (service_name, existing_service, create_date, update_date)" + SERVICE_SCON_DIVERSITY_CREATE = + "insert into @inv_ser_scon_diversity_service (service_name, existing_service, create_date, update_date)" + "values (?, ?, ?, ?) "; - private static final String SERVICE_SCON_DIVERSITY_CAPABILITY_CREATE = "insert into @inv_ser_scon_diversity_service_capability (service_name, site, node, srlg, create_date, update_date)" + SERVICE_SCON_DIVERSITY_CAPABILITY_CREATE = + "insert into @inv_ser_scon_diversity_service_capability (service_name, site, node, srlg, create_date, " + + "update_date)" + "values (?, ?, ?, ?, ?) "; - private static final String SERVICE_SCON_COMPONENT_CREATE = "insert into @inv_ser_scon_components (service_name, application, component, value, create_date, update_date)" + SERVICE_SCON_COMPONENT_CREATE = + "insert into @inv_ser_scon_components (service_name, application, component, value, create_date, " + + "update_date)" + "values (?, ?, ?, ?, ?, ?) "; - private static final String SERVICE_SCON_COROUTING_CREATE = "insert into @inv_ser_scon_corouting (service_name, existing_service, create_date, update_date)" + SERVICE_SCON_COROUTING_CREATE = + "insert into @inv_ser_scon_corouting (service_name, existing_service, create_date, update_date)" + "values (?, ?, ?, ?) "; - private static final String SERVICE_FIBERSPAN_SRLG_CREATE = "insert into inv_ser_fiber_span_srlgs values (service_name, fiber_span_srlg, create_date, update_date) " + SERVICE_FIBERSPAN_SRLG_CREATE = + "insert into inv_ser_fiber_span_srlgs values (service_name, fiber_span_srlg, create_date, update_date) " + "values(?, ?, ?, ?)"; - private static final String SERVICE_EQUIPMENT_SRG_CREATE = "insert into inv_ser_equipment_srgs values (service_name, srg_number, create_date, update_date) " + SERVICE_EQUIPMENT_SRG_CREATE = + "insert into inv_ser_equipment_srgs values (service_name, srg_number, create_date, update_date) " + "values(?, ?, ?, ?)"; - private static final String SERVICE_SUPPORTING_SVC_CREATE = "insert into inv_ser_supporting_service values (service_name, supporting_service_name, create_date, update_date) " + SERVICE_SUPPORTING_SVC_CREATE = + "insert into inv_ser_supporting_service values (service_name, supporting_service_name, create_date, " + + "update_date) " + "values(?, ?, ?, ?)"; - private static final String SERVICE_DELETE = "DELETE FROM %sinv_ser_main WHERE service_name = ?"; + SERVICE_DELETE = + "DELETE FROM %sinv_ser_main WHERE service_name = ?"; + } private Queries() { // util class -- 2.36.6