* @param publicKeyId key id
* @return script object
*/
public static PublicKey getPublicKey(Connection con, Long publicKeyId) {
PublicKey publicKey = null;
try {
PreparedStatement stmt = con.prepareStatement("select * from public_keys where id=?");
stmt.setLong(1, publicKeyId);
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
publicKey = new PublicKey();
publicKey.setId(rs.getLong("id"));
publicKey.setKeyNm(rs.getString("key_nm"));
publicKey.setPublicKey(rs.getString("public_key"));
publicKey.setProfile(ProfileDB.getProfile(con, rs.getLong("profile_id")));
}
DBUtils.closeRs(rs);
DBUtils.closeStmt(stmt);
} catch (Exception e) {