Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Component Sharing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gagandeep Singh Bhatia
Component Sharing
Commits
3d7b5e2d
Commit
3d7b5e2d
authored
Apr 27, 2026
by
Ajit Deshmukh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace ManageSqlReleaseFromQC.java
parent
eaa90bb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
32 deletions
+89
-32
Ajit/Manage SQL Changes APR-26/Java Components/ManageSqlReleaseFromQC.java
...hanges APR-26/Java Components/ManageSqlReleaseFromQC.java
+89
-32
No files found.
Ajit/Manage SQL Changes APR-26/Java Components/ManageSqlReleaseFromQC.java
View file @
3d7b5e2d
...
@@ -325,23 +325,42 @@ public class ManageSqlReleaseFromQC extends ActionHandlerEJB {
...
@@ -325,23 +325,42 @@ public class ManageSqlReleaseFromQC extends ActionHandlerEJB {
Connection
pilotEntConn
=
null
;
Connection
pilotEntConn
=
null
;
PreparedStatement
pilotPstmt
=
null
;
PreparedStatement
pilotPstmt
=
null
;
ResultSet
pilotRs
=
null
;
ResultSet
pilotRs
=
null
;
StringBuilder
dbPilotBuilder
=
new
StringBuilder
();
try
{
try
{
ConnDriver
pilotConnDriver
=
new
ConnDriver
();
ConnDriver
pilotConnDriver
=
new
ConnDriver
();
pilotEntConn
=
pilotConnDriver
.
getConnectDB
(
"Driver"
);
pilotEntConn
=
pilotConnDriver
.
getConnectDB
(
"Driver"
);
// Use the first enterprise from the original transaction to look up DB_PILOT
String
[]
entArray
=
enterprises
.
split
(
","
);
String
entForLookup
=
enterprises
;
if
(
entForLookup
.
contains
(
","
))
{
entForLookup
=
entForLookup
.
split
(
","
)[
0
].
trim
();
}
String
pilotSql
=
"SELECT DB_PILOT FROM ENTERPRISE WHERE ENTERPRISE = ?"
;
String
pilotSql
=
"SELECT DB_PILOT FROM ENTERPRISE WHERE ENTERPRISE = ?"
;
pilotPstmt
=
pilotEntConn
.
prepareStatement
(
pilotSql
);
pilotPstmt
=
pilotEntConn
.
prepareStatement
(
pilotSql
);
pilotPstmt
.
setString
(
1
,
entForLookup
);
pilotRs
=
pilotPstmt
.
executeQuery
();
for
(
String
ent
:
entArray
)
{
if
(
pilotRs
.
next
())
{
ent
=
ent
.
trim
();
dbPilotEnterprise
=
checkNull
(
pilotRs
.
getString
(
"DB_PILOT"
));
pilotPstmt
.
setString
(
1
,
ent
);
pilotRs
=
pilotPstmt
.
executeQuery
();
if
(
pilotRs
.
next
())
{
String
dbPilot
=
checkNull
(
pilotRs
.
getString
(
"DB_PILOT"
));
if
(
dbPilot
!=
null
&&
!
dbPilot
.
isEmpty
())
{
if
(
dbPilotBuilder
.
length
()
>
0
)
{
dbPilotBuilder
.
append
(
","
);
}
dbPilotBuilder
.
append
(
dbPilot
);
}
}
if
(
pilotRs
!=
null
)
pilotRs
.
close
();
// important inside loop
}
}
dbPilotEnterprise
=
dbPilotBuilder
.
toString
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
}
finally
{
if
(
pilotRs
!=
null
)
{
if
(
pilotRs
!=
null
)
{
...
@@ -461,23 +480,42 @@ public class ManageSqlReleaseFromQC extends ActionHandlerEJB {
...
@@ -461,23 +480,42 @@ public class ManageSqlReleaseFromQC extends ActionHandlerEJB {
Connection
clientDevEntConn
=
null
;
Connection
clientDevEntConn
=
null
;
PreparedStatement
clientDevPstmt
=
null
;
PreparedStatement
clientDevPstmt
=
null
;
ResultSet
clientDevRs
=
null
;
ResultSet
clientDevRs
=
null
;
StringBuilder
dbClientDevBuilder
=
new
StringBuilder
();
try
{
try
{
ConnDriver
clientDevConnDriver
=
new
ConnDriver
();
ConnDriver
clientDevConnDriver
=
new
ConnDriver
();
clientDevEntConn
=
clientDevConnDriver
.
getConnectDB
(
"Driver"
);
clientDevEntConn
=
clientDevConnDriver
.
getConnectDB
(
"Driver"
);
// Use the first enterprise from the original transaction to look up DB_PILOT
String
[]
entArray
=
enterprises
.
split
(
","
);
String
entForLookup
=
enterprises
;
if
(
entForLookup
.
contains
(
","
))
{
entForLookup
=
entForLookup
.
split
(
","
)[
0
].
trim
();
}
String
clientDevSql
=
"SELECT DB_DEV FROM ENTERPRISE WHERE ENTERPRISE = ?"
;
String
clientDevSql
=
"SELECT DB_DEV FROM ENTERPRISE WHERE ENTERPRISE = ?"
;
clientDevPstmt
=
clientDevEntConn
.
prepareStatement
(
clientDevSql
);
clientDevPstmt
=
clientDevEntConn
.
prepareStatement
(
clientDevSql
);
clientDevPstmt
.
setString
(
1
,
entForLookup
);
clientDevRs
=
clientDevPstmt
.
executeQuery
();
for
(
String
ent
:
entArray
)
{
if
(
clientDevRs
.
next
())
{
ent
=
ent
.
trim
();
dbClientDevEnterprise
=
checkNull
(
clientDevRs
.
getString
(
"DB_DEV"
));
clientDevPstmt
.
setString
(
1
,
ent
);
clientDevRs
=
clientDevPstmt
.
executeQuery
();
if
(
clientDevRs
.
next
())
{
String
dbDev
=
checkNull
(
clientDevRs
.
getString
(
"DB_DEV"
));
if
(
dbDev
!=
null
&&
!
dbDev
.
isEmpty
())
{
if
(
dbClientDevBuilder
.
length
()
>
0
)
{
dbClientDevBuilder
.
append
(
","
);
}
dbClientDevBuilder
.
append
(
dbDev
);
}
}
if
(
clientDevRs
!=
null
)
clientDevRs
.
close
();
// close inside loop
}
}
dbClientDevEnterprise
=
dbClientDevBuilder
.
toString
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
}
finally
{
if
(
clientDevRs
!=
null
)
{
if
(
clientDevRs
!=
null
)
{
clientDevRs
.
close
();
clientDevRs
.
close
();
...
@@ -614,23 +652,42 @@ public class ManageSqlReleaseFromQC extends ActionHandlerEJB {
...
@@ -614,23 +652,42 @@ public class ManageSqlReleaseFromQC extends ActionHandlerEJB {
Connection
liveEntConn
=
null
;
Connection
liveEntConn
=
null
;
PreparedStatement
livePstmt
=
null
;
PreparedStatement
livePstmt
=
null
;
ResultSet
liveRs
=
null
;
ResultSet
liveRs
=
null
;
StringBuilder
dbLiveBuilder
=
new
StringBuilder
();
try
{
try
{
ConnDriver
liveEntConnConnDriver
=
new
ConnDriver
();
ConnDriver
liveEntConnConnDriver
=
new
ConnDriver
();
liveEntConn
=
liveEntConnConnDriver
.
getConnectDB
(
"Driver"
);
liveEntConn
=
liveEntConnConnDriver
.
getConnectDB
(
"Driver"
);
// Use the first enterprise from the original transaction to look up DB_PILOT
String
[]
entArray
=
enterprises
.
split
(
","
);
String
entForLookup
=
enterprises
;
if
(
entForLookup
.
contains
(
","
))
{
String
liveSql
=
"SELECT DB_MAIN FROM ENTERPRISE WHERE ENTERPRISE = ?"
;
entForLookup
=
entForLookup
.
split
(
","
)[
0
].
trim
();
livePstmt
=
liveEntConn
.
prepareStatement
(
liveSql
);
}
for
(
String
ent
:
entArray
)
{
ent
=
ent
.
trim
();
String
clientDevSql
=
"SELECT DB_MAIN FROM ENTERPRISE WHERE ENTERPRISE = ?"
;
livePstmt
.
setString
(
1
,
ent
);
livePstmt
=
liveEntConn
.
prepareStatement
(
clientDevSql
);
liveRs
=
livePstmt
.
executeQuery
();
livePstmt
.
setString
(
1
,
entForLookup
);
liveRs
=
livePstmt
.
executeQuery
();
if
(
liveRs
.
next
())
{
if
(
liveRs
.
next
())
{
String
dbMain
=
checkNull
(
liveRs
.
getString
(
"DB_MAIN"
));
dbLiveEnterprise
=
checkNull
(
liveRs
.
getString
(
"DB_MAIN"
));
if
(
dbMain
!=
null
&&
!
dbMain
.
isEmpty
())
{
if
(
dbLiveBuilder
.
length
()
>
0
)
{
dbLiveBuilder
.
append
(
","
);
}
dbLiveBuilder
.
append
(
dbMain
);
}
}
if
(
liveRs
!=
null
)
liveRs
.
close
();
// close inside loop
}
}
dbLiveEnterprise
=
dbLiveBuilder
.
toString
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
}
finally
{
if
(
liveRs
!=
null
)
{
if
(
liveRs
!=
null
)
{
liveRs
.
close
();
liveRs
.
close
();
...
@@ -701,9 +758,9 @@ public class ManageSqlReleaseFromQC extends ActionHandlerEJB {
...
@@ -701,9 +758,9 @@ public class ManageSqlReleaseFromQC extends ActionHandlerEJB {
}
finally
{
}
finally
{
try
{
try
{
if
(
conn
!=
null
)
{
if
(
conn
!=
null
)
{
conn
.
close
();
conn
.
close
();
conn
=
null
;
conn
=
null
;
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment