Friday, January 8, 2021

How to fetch ITReosurce Key based on applicationInstance?

 private String getITResourceKey(String applicationInstanceName) {

System.out.println(CLASS_NAME + " Start of getITResourceKey()");

                Connection connection = null;

PreparedStatement pstmt = null;

ResultSet rs = null;

String itResourceKey = null;

try {

String query = "select itresource_key from app_instance where app_instance_display_name=?";

pstmt = connection.prepareStatement(query);

pstmt.setString(1, applicationInstanceName);

rs = pstmt.executeQuery();

if (rs.next()) {

itResourceKey = rs.getString("itresource_key");

}

                      } catch (Exception e) {

e.printStackTrace();

}finallly{

                       connection.close();

pstmt.close();

rs.close();

                }

return itResourceKey;

}


No comments:

Post a Comment

Fetch Members from Workgroup

  import java.util.ArrayList;   import java.util.Iterator;   import java.util.List;   import sailpoint.api.ObjectUtil;   import sailpoint.ob...