2 * Copyright © 2016 AT&T and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.transportpce.inventory.query;
11 import com.google.common.base.Preconditions;
12 import com.google.common.base.Strings;
14 public final class Queries {
16 private static final String DEVICE_INFO_INSERT;
18 private static final String DEVICE_SHELF_INSERT;
20 private static final String DEVICE_SHELF_SLOT_INSERT;
22 private static final String DEVICE_CP_INSERT;
24 private static final String DEVICE_CP_PORT_INSERT;
26 private static final String DEVICE_CP_SLOT_INSERT;
28 private static final String DEVICE_INTERFACES_INSERT;
30 private static final String DEVICE_INTERFACE_ODU_OPU_MIS_TX_INSERT;
32 private static final String DEVICE_INTERFACE_ODU_OPU_MIS_RX_INSERT;
34 private static final String DEVICE_INTERFACE_ODU_OPU_MIS_EXP_INSERT;
36 private static final String DEVICE_INTERFACE_TCM_INSERT;
38 private static final String DEVICE_PROTOCOL_INSERT;
40 private static final String DEVICE_PROTOCOL_PORT_CONFIG_INSERT;
42 private static final String DEVICE_PROTOCOL_LLDP_NBR_LIST_INSERT;
44 private static final String DEVICE_PROTOCOL_RSTP_INSERT;
46 private static final String DEVICE_PROTOCOL_RSTP_BRIDGEPORT_INSERT;
48 private static final String DEVICE_PROTOCOL_RSTP_BRIDGEPORT_ATTR_INSERT;
50 private static final String DEVICE_INTERNAL_LINK_INSERT;
52 private static final String DEVICE_EXTERNAL_LINK_INSERT;
54 private static final String DEVICE_PHYSICAL_LINK_INSERT;
56 private static final String DEVICE_DEGREE_INSERT;
58 private static final String DEVICE_DEGREE_CIRCUITPACK_INSERT;
60 private static final String DEVICE_CONNECTION_PORT_INSERT;
62 private static final String DEVICE_SHARED_RISK_GROUP_INSERT;
64 private static final String DEVICE_SRG_CIRCUITPACK_INSERT;
66 private static final String DEVICE_ROADM_CONNECTIONS_INSERT;
68 private static final String DEVICE_CONNECTION_MAP_INSERT;
70 private static final String DEVICE_WAVELENGTH_INSERT;
72 private static final String SERVICE_PATH_LIST;
74 private static final String SERVICE_UPDATE;
76 private static final String SERVICE_EVENT_INSERT;
78 private static final String SERVICE_INSERT;
80 private static final String SERVICE_HCON_CREATE;
82 private static final String SERVICE_HCON_DIVERSITY_CREATE;
84 private static final String SERVICE_HCON_DIVERSITY_CAPABILITY_CREATE;
86 private static final String SERVICE_HCON_COMPONENT_CREATE;
88 private static final String SERVICE_HCON_COROUTING_CREATE;
90 private static final String SERVICE_SCON_CREATE;
92 private static final String SERVICE_SCON_DIVERSITY_CREATE;
94 private static final String SERVICE_SCON_DIVERSITY_CAPABILITY_CREATE;
96 private static final String SERVICE_SCON_COMPONENT_CREATE;
98 private static final String SERVICE_SCON_COROUTING_CREATE;
100 private static final String SERVICE_FIBERSPAN_SRLG_CREATE;
102 private static final String SERVICE_EQUIPMENT_SRG_CREATE;
104 private static final String SERVICE_SUPPORTING_SVC_CREATE;
106 private static final String SERVICE_DELETE;
111 "INSERT INTO %sinv_dev_info (node_id, node_number, node_type, clli, vendor, model, serial_id, ipAddress, "
112 + " prefix_length, default_gateway, "
113 + "source, current_ipAddress, current_prefix_length, current_default_gateway, macAddress, "
114 + "software_version, openroadm_version, "
115 + "template, current_datetime, geo_latitude, geo_longitude, max_degrees, max_srgs, "
116 + "max_num_bin_15min_historical_pm, "
117 + "max_num_bin_24hour_historical_pm, sw_version, sw_validation_timer, activation_date_time, create_date, "
118 + "update_date) VALUES "
119 + "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
121 DEVICE_SHELF_INSERT =
122 "INSERT INTO %sinv_dev_shelf"
123 + " (node_id, shelf_name, shelf_type, rack, shelf_position, administrative_state, vendor, model, "
124 + "serial_id, type, product_code, manufacture_date, clei, hardware_version, operational_state, "
125 + "equipment_state, due_date, "
126 + "create_date, update_date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
128 DEVICE_SHELF_SLOT_INSERT =
129 "INSERT INTO %sinv_dev_shelf_slot "
130 + " (node_id, shelf_name, slot_name, label, provisioned_circuit_pack, slot_status, create_date, "
132 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
135 "INSERT INTO %sinv_dev_circuit_pack"
136 + " (node_id, circuit_pack_name, circuit_pack_type, circuit_pack_product_code, administrative_state, "
137 + "vendor, model, serial_id, type, "
138 + " product_code, manufacture_date, clei, hardware_version, operational_state, cpc_type, cpc_extension, "
139 + "equipment_state, circuit_pack_mode, shelf, slot, "
140 + " subSlot, due_date, pcp_circuit_pack_name, pcp_cp_slot_name, create_date, update_date) "
141 + " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
144 DEVICE_CP_PORT_INSERT =
145 "INSERT INTO %sinv_dev_cp_ports "
146 + " (node_id, circuit_pack_name, port_name, port_type, port_qual, port_wavelength_type, port_direction, "
147 + "label, circuit_id, "
148 + "administrative_state, operational_state, logical_connection_point, partner_port_circuit_pack_name, "
149 + "partner_port_port_name, parent_port_circuit_pack_name, "
150 + "parent_port_port_name, roadm_port_port_power_capability_min_rx, "
151 + "roadm_port_port_power_capability_min_tx, roadm_port_port_power_capability_max_rx, "
152 + "roadm_port_port_power_capability_max_tx, roadm_port_capable_wavelengths, "
153 + "roadm_port_available_wavelengths, roadm_port_used_wavelengths, "
154 + "transponder_port_port_power_capability_min_rx, transponder_port_port_power_capability_min_tx, "
155 + "transponder_port_port_power_capability_max_rx, "
156 + "transponder_port_port_power_capability_max_tx, transponder_port_capable_wavelengths, "
157 + "otdr_port_launch_cable_length, otdr_port_port_direction, "
158 + "ila_port_port_power_capability_mix_rx, ila_port_port_power_capability_mix_tx, "
159 + "ila_port_port_power_capability_max_rx, ila_port_port_power_capability_max_tx, "
160 + "create_date, update_date) "
161 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
164 DEVICE_CP_SLOT_INSERT =
165 "INSERT INTO %sinv_dev_cp_slots "
166 + " (node_id, circuit_pack_name, slot_name, label, provisioned_circuit_pack, slot_status, slot_type, "
167 + "create_date, update_date) "
168 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
170 DEVICE_INTERFACES_INSERT =
171 "INSERT INTO %sinv_dev_interfaces "
172 + " (node_id, name, description, type, administrative_state, operational_state, circuit_id, "
173 + "supporting_interface, supporting_circuit_pack_name, "
174 + "supporting_port, ethernet_speed, ethernet_fec, ethernet_duplex, ethernet_mtu, "
175 + "ethernet_auto_negotiation, ethernet_curr_speed, "
176 + "ethernet_curr_duplex, mci_mcttp_min_freq, mci_mcttp_max_freq, mci_mcttp_center_freq, "
177 + "mci_mcttp_slot_width, mci_nmc_ctp_frequency, mci_nmc_ctp_width, "
178 + "och_rate, och_frequency, och_width, och_wavelength_number, och_modulation_format, och_transmit_power, "
179 + "ots_fiber_type, ots_span_loss_receive, "
180 + "ots_span_loss_transmit, ots_ingress_span_loss_aging_margin, ots_eol_max_load_pin, odu_rate, "
181 + "odu_function, odu_monitoring_mode, odu_no_oam_function, "
182 + "odu_proactive_delay_measurement_enabled, odu_poa_trib_port_number, odu_tx_sapi, odu_tx_dapi, "
183 + "odu_tx_operator, odu_accepted_sapi, odu_accepted_dapi, "
184 + "odu_accepted_operator, odu_expected_sapi, odu_expected_dapi, odu_tim_act_enabled, odu_tim_detect_mode, "
185 + "odu_degm_intervals, odu_degthr_percentage, "
186 + "opu_payload_type, opu_rx_payload_type, opu_exp_payload_type, opu_payload_interface, "
187 + "maint_testsignal_enabled, maint_testsignal_testpattern, "
188 + "maint_testsignal_type, maint_testsignal_biterrors, maint_testsignal_biterrorsterminal, "
189 + "maint_testsignal_syncseconds, "
190 + "maint_testsignal_syncsecondsterminal, otu_rate, otu_fec, otu_tx_sapi, otu_tx_dapi, otu_tx_operator, "
191 + "otu_accepted_sapi, otu_accepted_dapi, "
192 + "otu_accepted_operator, otu_expected_sapi, otu_expected_dapi, otu_tim_act_enabled, otu_tim_detect_mode, "
193 + "otu_degm_intervals, otu_degthr_percentage, "
194 + "otu_maint_loopback_enabled, otu_maint_type, mt_otu_rate, mt_otu_fec, mt_otu_maint_loopback, "
195 + "mt_otu_enabled, mt_otu_type, create_date, update_date) "
196 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
197 + "?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
198 + "?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
201 DEVICE_INTERFACE_ODU_OPU_MIS_TX_INSERT =
202 "INSERT INTO %sinv_dev_interface_odu_opu_tx_msi "
203 + " (node_id, interface_name, trib_slot, odtu_type, trib_port, trib_port_payload, create_date, "
205 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
207 DEVICE_INTERFACE_ODU_OPU_MIS_RX_INSERT =
208 "INSERT INTO %sinv_dev_interface_odu_opu_rx_msi "
209 + " (node_id, interface_name, trib_slot, odtu_type, trib_port, trib_port_payload, create_date, "
211 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
213 DEVICE_INTERFACE_ODU_OPU_MIS_EXP_INSERT =
214 "INSERT INTO %sinv_dev_interface_odu_opu_exp_msi "
215 + " (node_id, interface_name, trib_slot, odtu_type, trib_port, trib_port_payload, create_date, "
217 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
219 DEVICE_INTERFACE_TCM_INSERT =
220 "INSERT INTO %sinv_dev_interface_odu_tcm "
221 + " (node_id, interface_name, layer, monitoring_mode, ltc_act_enabled, "
222 + "proactive_delay_measurement_enabled, tcm_direction, tx_sapi, tx_dapi, tx_operator, accepted_sapi, "
223 + "accepted_dapi, accepted_operator, expected_sapi, expected_dapi, tim_act_enabled, tim_detect_mode, "
224 + "degm_intervals, degthr_percentage, create_date, update_date ) "
225 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )";
227 DEVICE_PROTOCOL_INSERT =
228 "INSERT INTO %sinv_dev_proto_lldp"
232 + "msgtxholdmultiplier,"
242 DEVICE_PROTOCOL_PORT_CONFIG_INSERT =
243 "INSERT INTO %sinv_dev_proto_lldp_port_config "
244 + " (node_id, ifname, adminstatus, create_date, update_date ) "
245 + "VALUES (?, ?, ?, ?, ? )";
248 DEVICE_PROTOCOL_LLDP_NBR_LIST_INSERT =
249 "INSERT INTO %sinv_dev_proto_lldp_nbr_lst "
250 + " (node_id, ifname, remotesysname, remotemgmtaddresssubtype, remotemgmtaddress, remoteportidsubtype, "
251 + "remoteportid, remotechassisidsubtype, remotechassisid, create_date, update_date ) "
252 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
255 DEVICE_PROTOCOL_RSTP_INSERT =
256 "INSERT INTO %sinv_dev_proto_rstp "
257 + " (node_id, bridge_name, bridge_priority, shutdown, hold_time, hello_time, max_age, forward_delay, "
258 + "transmit_hold_count, "
259 + "root_bridge_port, root_path_cost, root_bridge_priority, root_bridge_id, root_hold_time, "
260 + "root_hello_time, root_max_age, "
261 + "root_forward_delay, bridge_id, topo_change_count, time_since_topo_change, create_date, update_date ) "
262 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
264 DEVICE_PROTOCOL_RSTP_BRIDGEPORT_INSERT =
265 "INSERT INTO %sinv_dev_proto_rstp_bridge_port "
266 + " (node_id, bridge_name, ifname, cost, priority, create_date, update_date ) "
267 + "VALUES (?, ?, ?, ?, ?, ?, ?)";
269 DEVICE_PROTOCOL_RSTP_BRIDGEPORT_ATTR_INSERT =
270 "INSERT INTO %sinv_dev_proto_rstp_bridge_port_attr "
271 + " (node_id, bridge_name, ifname, bridge_port_state, bridge_port_role, bridge_port_id, "
272 + "open_edge_bridge_port, designated_bridge_port, designated_bridgeid, create_date, update_date ) "
273 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
275 DEVICE_INTERNAL_LINK_INSERT =
276 "INSERT INTO %sinv_dev_internal_link "
277 + " (node_id, internal_link_name, source_circuit_pack_name, source_port_name, "
278 + "destination_circuit_pack_name, destination_port_name, create_date, update_date ) "
279 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
281 DEVICE_EXTERNAL_LINK_INSERT =
282 "INSERT INTO %sinv_dev_external_link "
283 + " (node_id, external_link_name, source_node_id, source_circuit_pack_name, source_port_name, "
284 + "destination_node_id, destination_circuit_pack_name, destination_port_name, create_date, update_date) "
285 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
287 DEVICE_PHYSICAL_LINK_INSERT =
288 "INSERT INTO %sinv_dev_physical_link "
289 + " (node_id, physical_link_name, source_circuit_pack_name, source_port_name, "
290 + "destination_circuit_pack_name, destination_port_name, create_date, update_date ) "
291 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
293 DEVICE_DEGREE_INSERT =
294 "INSERT INTO %sinv_dev_degree "
295 + " (node_id, degree_number, max_wavelengths, otdr_port_circuit_pack_name, otdr_port_port_name, "
296 + "mc_capabilities_slot_width_granularity, mc_capabilities_center_freq_granularity, "
297 + "mc_capabilities_min_slots, mc_capabilities_max_slots, create_date, update_date ) "
298 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
300 DEVICE_DEGREE_CIRCUITPACK_INSERT =
301 "INSERT INTO %sinv_dev_degree_circuit_packs "
302 + " (node_id, degree_number, cktpk_index, circuit_pack_name, create_date, update_date ) "
303 + "VALUES (?, ?, ?, ?, ?, ?)";
305 DEVICE_CONNECTION_PORT_INSERT =
306 "INSERT INTO %sinv_dev_degree_connection_ports "
307 + " (node_id, degree_number, conn_port_index, circuit_pack_name, port_name, create_date, update_date ) "
308 + "VALUES (?, ?, ?, ?, ?, ?, ?)";
310 DEVICE_SHARED_RISK_GROUP_INSERT =
311 "INSERT INTO %sinv_dev_srg "
312 + " (node_id, max_add_drop_ports, current_provisioned_add_drop_ports, srg_number, wavelength_duplication, "
313 + "mc_cap_slot_width_granularity, mc_cap_center_freq_granularity, mc_cap_min_slots, mc_cap_max_slots, "
314 + "create_date, update_date ) "
315 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
317 DEVICE_SRG_CIRCUITPACK_INSERT =
318 "INSERT INTO %sinv_dev_srg_circuit_pack "
319 + " (node_id, srg_number, ckptk_index, circuit_pack_name, create_date, update_date ) "
320 + "VALUES (?, ?, ?, ?, ?, ?)";
322 DEVICE_ROADM_CONNECTIONS_INSERT =
323 "INSERT INTO %sinv_dev_roadm_connections "
324 + " (node_id, connection_name, connection_number, wavelength_number, opticalcontrolmode, "
325 + "target_output_power, src_if, dst_if, create_date, update_date ) "
326 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
328 DEVICE_CONNECTION_MAP_INSERT =
329 "INSERT INTO %sinv_dev_connection_map "
330 + " (node_id, connection_map_number, source_circuit_pack_name, source_port_name, create_date, "
332 + "VALUES (?, ?, ?, ?, ?, ?)";
334 DEVICE_WAVELENGTH_INSERT = "INSERT INTO %sinv_dev_wavelength_map "
335 + " (node_id, wavelength_number, center_frequency, wavelength, create_date, update_date ) "
336 + "VALUES (?, ?, ?, ?, ?, ?)";
339 "INSERT INTO %sinv_ser_pathlist ( path_name ) values (?)";
342 "UPDATE %sinv_ser_main "
345 + "sdnc_req_header_request_id = ? "
346 + "sdnc_req_header_rpc_action = ? "
347 + "sdnc_req_header_notification_url = ? "
348 + "sdnc_req_header_request_system_id = ? "
349 + "connection_type = ? "
350 + "lifecycle_state = ? "
351 + "administrative_state = ? "
352 + "operational_state = ? "
353 + "serv_condition = ? "
354 + "a_end_service_format = ? "
355 + "a_end_service_rate = ? "
357 + "a_end_node_id = ? "
358 + "a_end_tx_port_device_name = ? "
359 + "a_end_tx_port_type = ? "
360 + "a_end_tx_port_name = ? "
361 + "a_end_tx_port_rack = ? "
362 + "a_end_tx_port_shelf = ? "
363 + "a_end_tx_port_slot = ? "
364 + "a_end_tx_port_sub_slot = ? "
365 + "a_end_tx_lgx_device_name = ? "
366 + "a_end_tx_lgx_port_name = ? "
367 + "a_end_tx_lgx_port_rack = ? "
368 + "a_end_tx_lgx_port_shelf = ? "
369 + "a_end_tx_tail_rnode_id = ? "
370 + "a_end_tx_xport_cp_name = ? "
371 + "a_end_tx_xport_port_name = ? "
372 + "a_end_tx_tail_roadm_port_aid = ? "
373 + "a_end_tx_tail_roadm_port_rack_loc = ? "
374 + "a_end_rx_port_device_name = ? "
375 + "a_end_rx_port_type = ? "
376 + "a_end_rx_port_name = ? "
377 + "a_end_rx_port_rack = ? "
378 + "a_end_rx_port_shelf = ? "
379 + "a_end_rx_port_slot = ? "
380 + "a_end_rx_port_sub_slot = ? "
381 + "a_end_rx_lgx_device_name = ? "
382 + "a_end_rx_lgx_port_name = ? "
383 + "a_end_rx_lgx_port_rack = ? "
384 + "a_end_rx_lgx_port_shelf = ? "
385 + "a_end_rx_tail_rnode_id = ? "
386 + "a_end_rx_xport_cp_name = ? "
387 + "a_end_rx_xport_port_name = ? "
388 + "a_end_rx_tail_roadm_port_aid = ? "
389 + "a_end_rx_tail_roadm_port_rack_loc = ? "
390 + "a_end_optic_type = ? "
391 + "a_end_router_node_id = ? "
392 + "a_end_router_ip_address = ? "
393 + "a_end_router_url = ? "
394 + "a_end_user_label = ? "
395 + "z_end_service_format = ? "
396 + "z_end_service_rate = ? "
398 + "z_end_node_id = ? "
399 + "z_end_tx_port_device_name = ? "
400 + "z_end_tx_port_type = ? "
401 + "z_end_tx_port_name = ? "
402 + "z_end_tx_port_rack = ? "
403 + "z_end_tx_port_shelf = ? "
404 + "z_end_tx_port_slot = ? "
405 + "z_end_tx_port_sub_slot = ? "
406 + "z_end_tx_lgx_device_name = ? "
407 + "z_end_tx_lgx_port_name = ? "
408 + "z_end_tx_lgx_port_rack = ? "
409 + "z_end_tx_lgx_port_shelf = ? "
410 + "z_end_tx_tail_rnode_id = ? "
411 + "z_end_tx_xport_cp_name = ? "
412 + "z_end_tx_xport_port_name = ? "
413 + "z_end_tx_tail_roadm_port_aid = ? "
414 + "z_end_tx_tail_roadm_port_rack_loc = ? "
415 + "z_end_rx_port_device_name = ? "
416 + "z_end_rx_port_type = ? "
417 + "z_end_rx_port_name = ? "
418 + "z_end_rx_port_rack = ? "
419 + "z_end_rx_port_shelf = ? "
420 + "z_end_rx_port_slot = ? "
421 + "z_end_rx_port_sub_slot = ? "
422 + "z_end_rx_lgx_device_name = ? "
423 + "z_end_rx_lgx_port_name = ? "
424 + "z_end_rx_lgx_port_rack = ? "
425 + "z_end_rx_lgx_port_shelf = ? "
426 + "z_end_rx_tail_rnode_id = ? "
427 + "z_end_rx_xport_cp_name = ? "
428 + "z_end_rx_xport_port_name = ? "
429 + "z_end_rx_tail_roadm_port_aid = ? "
430 + "z_end_rx_tail_roadm_port_rack_loc = ? "
431 + "z_end_optic_type = ? "
432 + "z_end_router_node_id = ? "
433 + "z_end_router_ip_address = ? "
434 + "z_end_router_url = ? "
435 + "z_end_user_label "
440 + "secondary_nci_code = ? "
442 + "customer_contact = ? "
443 + "operator_contact = ? "
445 + "fiber_span_srlgs = ? "
446 + "supp_serv_name = ? "
448 + " where service_name = ? ";
450 SERVICE_EVENT_INSERT =
451 "INSERT INTO %sinv_ser_events"
468 "INSERT INTO %sinv_ser_main "
471 + "sdnc_req_header_request_id, "
472 + "sdnc_req_header_rpc_action, "
473 + "sdnc_req_header_notification_url, "
474 + "sdnc_req_header_request_system_id, "
475 + "connection_type, "
476 + "lifecycle_state, "
477 + "administrative_state, "
478 + "operational_state, "
480 + "a_end_service_format, "
481 + "a_end_service_rate, "
484 + "a_end_tx_port_device_name, "
485 + "a_end_tx_port_type, "
486 + "a_end_tx_port_name, "
487 + "a_end_tx_port_rack, "
488 + "a_end_tx_port_shelf, "
489 + "a_end_tx_port_slot, "
490 + "a_end_tx_port_sub_slot, "
491 + "a_end_tx_lgx_device_name, "
492 + "a_end_tx_lgx_port_name, "
493 + "a_end_tx_lgx_port_rack, "
494 + "a_end_tx_lgx_port_shelf, "
495 + "a_end_tx_tail_rnode_id, "
496 + "a_end_tx_xport_cp_name, "
497 + "a_end_tx_xport_port_name, "
498 + "a_end_tx_tail_roadm_port_aid, "
499 + "a_end_tx_tail_roadm_port_rack_loc, "
500 + "a_end_rx_port_device_name, "
501 + "a_end_rx_port_type, "
502 + "a_end_rx_port_name, "
503 + "a_end_rx_port_rack, "
504 + "a_end_rx_port_shelf, "
505 + "a_end_rx_port_slot, "
506 + "a_end_rx_port_sub_slot, "
507 + "a_end_rx_lgx_device_name, "
508 + "a_end_rx_lgx_port_name, "
509 + "a_end_rx_lgx_port_rack, "
510 + "a_end_rx_lgx_port_shelf, "
511 + "a_end_rx_tail_rnode_id, "
512 + "a_end_rx_xport_cp_name, "
513 + "a_end_rx_xport_port_name, "
514 + "a_end_rx_tail_roadm_port_aid, "
515 + "a_end_rx_tail_roadm_port_rack_loc, "
516 + "a_end_optic_type, "
517 + "a_end_router_node_id, "
518 + "a_end_router_ip_address, "
519 + "a_end_router_url, "
520 + "a_end_user_label, "
521 + "z_end_service_format, "
522 + "z_end_service_rate, "
525 + "z_end_tx_port_device_name, "
526 + "z_end_tx_port_type, "
527 + "z_end_tx_port_name, "
528 + "z_end_tx_port_rack, "
529 + "z_end_tx_port_shelf, "
530 + "z_end_tx_port_slot, "
531 + "z_end_tx_port_sub_slot, "
532 + "z_end_tx_lgx_device_name, "
533 + "z_end_tx_lgx_port_name, "
534 + "z_end_tx_lgx_port_rack, "
535 + "z_end_tx_lgx_port_shelf, "
536 + "z_end_tx_tail_rnode_id, "
537 + "z_end_tx_xport_cp_name, "
538 + "z_end_tx_xport_port_name, "
539 + "z_end_tx_tail_roadm_port_aid, "
540 + "z_end_tx_tail_roadm_port_rack_loc, "
541 + "z_end_rx_port_device_name, "
542 + "z_end_rx_port_type, "
543 + "z_end_rx_port_name, "
544 + "z_end_rx_port_rack, "
545 + "z_end_rx_port_shelf, "
546 + "z_end_rx_port_slot, "
547 + "z_end_rx_port_sub_slot, "
548 + "z_end_rx_lgx_device_name, "
549 + "z_end_rx_lgx_port_name, "
550 + "z_end_rx_lgx_port_rack, "
551 + "z_end_rx_lgx_port_shelf, "
552 + "z_end_rx_tail_rnode_id, "
553 + "z_end_rx_xport_cp_name, "
554 + "z_end_rx_xport_port_name, "
555 + "z_end_rx_tail_roadm_port_aid, "
556 + "z_end_rx_tail_roadm_port_rack_loc, "
557 + "z_end_optic_type, "
558 + "z_end_router_node_id, "
559 + "z_end_router_ip_address, "
560 + "z_end_router_url, "
561 + "z_end_user_label, "
562 /*+ "hcon_cust_code, "
563 + "hcon_gen_div_existing_serv, "
564 + "hcon_gen_div_app_site, "
565 + "hcon_gen_div_app_node, "
566 + "hcon_gen_div_app_srlg, "
567 + "hcon_gen_excl_fiber_bundle, "
568 + "hcon_gen_excl_site, "
569 + "hcon_gen_excl_node_id, "
570 + "hcon_gen_excl_supp_serv_name, "
571 + "hcon_gen_incl_fiber_bundle, "
572 + "hcon_gen_incl_site, "
573 + "hcon_gen_incl_node_id, "
574 + "hcon_gen_incl_supp_serv_name, "
575 + "hcon_gen_max_latency, "
576 + "hcon_corout_existing_serv, "
578 + "scon_gen_div_existing_serv, "
579 + "scon_gen_div_app_site, "
580 + "scon_gen_div_app_node, "
581 + "scon_gen_div_app_srlg, "
582 + "scon_gen_excl_fiber_bundle, "
583 + "scon_gen_excl_site, "
584 + "scon_gen_excl_node_id, "
585 + "scon_gen_excl_supp_serv_name, "
586 + "scon_gen_incl_fiber_bundle, "
587 + "scon_gen_incl_site, "
588 + "scon_gen_incl_node_id, "
589 + "scon_gen_incl_supp_serv_name, "
590 + "scon_gen_max_latency, "
591 + "scon_corout_existing_serv, " */
596 + "secondary_nci_code, "
598 + "customer_contact, "
599 + "operator_contact, "
601 + "fiber_span_srlgs, "
743 SERVICE_HCON_CREATE =
744 "insert into @inv_ser_hcon (service_name, customer_code, create_date, update_date)"
745 + "values (?, ?, ?, ?) ";
747 SERVICE_HCON_DIVERSITY_CREATE =
748 "insert into @inv_ser_hcon_diversity_service (service_name, existing_service, create_date, update_date)"
749 + "values (?, ?, ?, ?) ";
751 SERVICE_HCON_DIVERSITY_CAPABILITY_CREATE =
752 "insert into @inv_ser_hcon_diversity_service_capability (service_name, site, node, srlg, create_date, "
754 + "values (?, ?, ?, ?, ?) ";
756 SERVICE_HCON_COMPONENT_CREATE =
757 "insert into @inv_ser_hcon_components (service_name, application, component, value, create_date, "
759 + "values (?, ?, ?, ?, ?, ?) ";
761 SERVICE_HCON_COROUTING_CREATE =
762 "insert into @inv_ser_hcon_corouting (service_name, existing_service, create_date, update_date)"
763 + "values (?, ?, ?, ?) ";
765 SERVICE_SCON_CREATE =
766 "insert into @inv_ser_scon (service_name, customer_code, create_date, update_date)"
767 + "values (?, ?, ?, ?) ";
769 SERVICE_SCON_DIVERSITY_CREATE =
770 "insert into @inv_ser_scon_diversity_service (service_name, existing_service, create_date, update_date)"
771 + "values (?, ?, ?, ?) ";
773 SERVICE_SCON_DIVERSITY_CAPABILITY_CREATE =
774 "insert into @inv_ser_scon_diversity_service_capability (service_name, site, node, srlg, create_date, "
776 + "values (?, ?, ?, ?, ?) ";
778 SERVICE_SCON_COMPONENT_CREATE =
779 "insert into @inv_ser_scon_components (service_name, application, component, value, create_date, "
781 + "values (?, ?, ?, ?, ?, ?) ";
783 SERVICE_SCON_COROUTING_CREATE =
784 "insert into @inv_ser_scon_corouting (service_name, existing_service, create_date, update_date)"
785 + "values (?, ?, ?, ?) ";
787 SERVICE_FIBERSPAN_SRLG_CREATE =
788 "insert into inv_ser_fiber_span_srlgs values (service_name, fiber_span_srlg, create_date, update_date) "
789 + "values(?, ?, ?, ?)";
791 SERVICE_EQUIPMENT_SRG_CREATE =
792 "insert into inv_ser_equipment_srgs values (service_name, srg_number, create_date, update_date) "
793 + "values(?, ?, ?, ?)";
795 SERVICE_SUPPORTING_SVC_CREATE =
796 "insert into inv_ser_supporting_service values (service_name, supporting_service_name, create_date, "
798 + "values(?, ?, ?, ?)";
801 "DELETE FROM %sinv_ser_main WHERE service_name = ?";
809 public static Query getQuery() {
813 public static final class Query {
815 private String schema;
821 public Query withSchema(String schema0) {
822 this.schema = schema0;
826 public Query deviceInfoInsert() {
827 this.sql = DEVICE_INFO_INSERT;
831 public Query deviceShelfInsert() {
832 this.sql = DEVICE_SHELF_INSERT;
836 public Query deviceShelfSlotInsert() {
837 this.sql = DEVICE_SHELF_SLOT_INSERT;
841 public Query deviceCircuitPackInsert() {
842 this.sql = DEVICE_CP_INSERT;
846 public Query deviceCPSlotInsert() {
847 this.sql = DEVICE_CP_SLOT_INSERT;
851 public Query deviceCPPortInsert() {
852 this.sql = DEVICE_CP_PORT_INSERT;
856 public Query deviceInterfacesInsert() {
857 this.sql = DEVICE_INTERFACES_INSERT;
861 public Query deviceInterfaceTcmInsert() {
862 this.sql = DEVICE_INTERFACE_TCM_INSERT;
866 public Query deviceInterfaceOtnOduTxMsiInsert() {
867 this.sql = DEVICE_INTERFACE_ODU_OPU_MIS_TX_INSERT;
871 public Query deviceInterfaceOtnOduRxMsiInsert() {
872 this.sql = DEVICE_INTERFACE_ODU_OPU_MIS_RX_INSERT;
876 public Query deviceInterfaceOtnOduExpMsiInsert() {
877 this.sql = DEVICE_INTERFACE_ODU_OPU_MIS_EXP_INSERT;
881 public Query deviceProtocolInsert() {
882 this.sql = DEVICE_PROTOCOL_INSERT;
886 public Query deviceProtocolPortConfigInsert() {
887 this.sql = DEVICE_PROTOCOL_PORT_CONFIG_INSERT;
891 public Query deviceProtocolLldpNbrlistInsert() {
892 this.sql = DEVICE_PROTOCOL_LLDP_NBR_LIST_INSERT;
896 public Query deviceProtocolRstpInsert() {
897 this.sql = DEVICE_PROTOCOL_RSTP_INSERT;
901 public Query deviceProtocolRstpBridgePortInsert() {
902 this.sql = DEVICE_PROTOCOL_RSTP_BRIDGEPORT_INSERT;
906 public Query deviceProtocolRstpBridgePortAttrInsert() {
907 this.sql = DEVICE_PROTOCOL_RSTP_BRIDGEPORT_ATTR_INSERT;
911 public Query deviceInternalLinkInsert() {
912 this.sql = DEVICE_INTERNAL_LINK_INSERT;
916 public Query deviceExternalLinkInsert() {
917 this.sql = DEVICE_EXTERNAL_LINK_INSERT;
921 public Query devicePhysicalLinkInsert() {
922 this.sql = DEVICE_PHYSICAL_LINK_INSERT;
927 public Query deviceDegreeInsert() {
928 this.sql = DEVICE_DEGREE_INSERT;
932 public Query deviceDegreeCircuitPackInsert() {
933 this.sql = DEVICE_DEGREE_CIRCUITPACK_INSERT;
937 public Query deviceDegreeConnectionPortInsert() {
938 this.sql = DEVICE_CONNECTION_PORT_INSERT;
943 public Query deviceSharedRiskGroupInsert() {
944 this.sql = DEVICE_SHARED_RISK_GROUP_INSERT;
949 public Query deviceSrgCircuitPackInsert() {
950 this.sql = DEVICE_SRG_CIRCUITPACK_INSERT;
955 public Query deviceRoadmConnectionsInsert() {
956 this.sql = DEVICE_ROADM_CONNECTIONS_INSERT;
961 public Query deviceConnectionMapInsert() {
962 this.sql = DEVICE_CONNECTION_MAP_INSERT;
967 public Query deviceWavelengthInsert() {
968 this.sql = DEVICE_WAVELENGTH_INSERT;
972 public Query serviceCreate() {
973 this.sql = SERVICE_INSERT;
977 public Query serviceEventCreate() {
978 this.sql = SERVICE_EVENT_INSERT;
982 public Query serviceUpdate() {
983 this.sql = SERVICE_UPDATE;
987 public Query serviceDelete() {
988 this.sql = SERVICE_DELETE;
992 public Query servicePathListCreate() {
993 this.sql = SERVICE_PATH_LIST;
997 public Query serviceHConCreate() {
998 this.sql = SERVICE_HCON_CREATE;
1002 public Query serviceHConDiversityCreate() {
1003 this.sql = SERVICE_HCON_DIVERSITY_CREATE;
1007 public Query serviceHConDiversityCapabilityCreate() {
1008 this.sql = SERVICE_HCON_DIVERSITY_CAPABILITY_CREATE;
1012 public Query serviceHConComponentCreate() {
1013 this.sql = SERVICE_HCON_COMPONENT_CREATE;
1017 public Query serviceHConCoroutingCreate() {
1018 this.sql = SERVICE_HCON_COROUTING_CREATE;
1022 public Query serviceSConDiversityCreate() {
1023 this.sql = SERVICE_SCON_DIVERSITY_CREATE;
1027 public Query serviceSConDiversityCapabilityCreate() {
1028 this.sql = SERVICE_SCON_DIVERSITY_CAPABILITY_CREATE;
1032 public Query serviceSConComponentCreate() {
1033 this.sql = SERVICE_SCON_COMPONENT_CREATE;
1037 public Query serviceSConCoroutingCreate() {
1038 this.sql = SERVICE_SCON_COROUTING_CREATE;
1042 public Query serviceFiberspanSrlgCreate() {
1043 this.sql = SERVICE_FIBERSPAN_SRLG_CREATE;
1047 public Query serviceEquipmentSrgCreate() {
1048 this.sql = SERVICE_EQUIPMENT_SRG_CREATE;
1052 public Query serviceSupportingSvcCreate() {
1053 this.sql = SERVICE_SUPPORTING_SVC_CREATE;
1057 public String get() {
1058 Preconditions.checkArgument(!Strings.isNullOrEmpty(this.sql), "No query selected");
1059 return String.format(this.sql, this.schema.concat("."));