/* */ }
/* */ }
/* */
/* */ public void load(EntityEnterpriseContext ctx, JDBCCMRFieldBridge2.FieldState state)
/* */ {
/* 1248 */ EntityTable relatedTable = JDBCCMRFieldBridge2.this.relatedEntity.getTable();
/* */
/* 1250 */ Connection con = null;
/* 1251 */ PreparedStatement ps = null;
/* 1252 */ ResultSet rs = null;
/* */ try
/* */ {
/* 1255 */ if (JDBCCMRFieldBridge2.this.log.isDebugEnabled())
/* */ {
/* 1257 */ JDBCCMRFieldBridge2.this.log.debug("executing: " + this.loadSql);
/* */ }
/* */
/* 1260 */ con = relatedTable.getDataSource().getConnection();
/* 1261 */ ps = con.prepareStatement(this.loadSql);
/* */
/* 1263 */ JDBCCMPFieldBridge2[] pkFields = (JDBCCMPFieldBridge2[])(JDBCCMPFieldBridge2[])JDBCCMRFieldBridge2.this.entity.getPrimaryKeyFields();
/* */
/* 1265 */ Object myPk = ctx.getId();
/* 1266 */ int paramInd = 1;
/* 1267 */ for (int i = 0; i < pkFields.length; i++)
/* */ {
/* 1269 */ JDBCCMPFieldBridge2 pkField = pkFields[i];
/* 1270 */ Object fieldValue = pkField.getPrimaryKeyValue(myPk);
/* */
/* 1272 */ JDBCCMPFieldBridge2 relatedFkField = JDBCCMRFieldBridge2.this.tableKeyFields[i];
/* 1273 */ relatedFkField.setArgumentParameters(ps, paramInd++, fieldValue);
/* */ }
/* */
/* 1276 */ rs = ps.executeQuery();
/* */
/* 1278 */ while (rs.next())
/* */ {
/* 1280 */ Object value = relatedTable.loadRow(rs, false);
/* 1281 */ state.addLoadedPk(value);
/* */ }
/* */ }
/* */ catch (SQLException e)
/* */ {