public static PublisherAssertion select(
PublisherAssertion assertionIn,
Connection connection)
throws java.sql.SQLException
{
PublisherAssertion assertionOut = null;
PreparedStatement statement = null;
ResultSet resultSet = null;
try
{
KeyedReference keyedRefIn = assertionIn.getKeyedReference();
statement = connection.prepareStatement(selectSQL);
statement.setString(1, assertionIn.getFromKey());
statement.setString(2, assertionIn.getToKey());
statement.setString(3, keyedRefIn.getTModelKey());
statement.setString(4, keyedRefIn.getKeyName());
statement.setString(5, keyedRefIn.getKeyValue());
log.debug(
"select from PUBLISHER_ASSERTION table:\n\n\t"
+ selectSQL
+ "\n\t FROM_KEY="
+ assertionIn.getFromKey()
+ "\n\t TO_KEY="
+ assertionIn.getToKey()
+ "\n\t TMODEL_KEY="
+ keyedRefIn.getTModelKey()
+ "\n\t KEY_NAME="
+ keyedRefIn.getKeyName()
+ "\n\t KEY_VALUE="
+ keyedRefIn.getKeyValue()
+ "\n");
resultSet = statement.executeQuery();
if (resultSet.next())
{
KeyedReference keyedRefOut = new KeyedReference();
keyedRefOut.setKeyName(resultSet.getString(4)); //("KEY_NAME"));
keyedRefOut.setKeyValue(resultSet.getString(5)); //("KEY_VALUE"));
keyedRefOut.setTModelKey(resultSet.getString(3)); //("TMODEL_KEY"));
assertionOut = new PublisherAssertion();
assertionOut.setFromKey(resultSet.getString(1)); //("FROM_KEY"));
assertionOut.setToKey(resultSet.getString(2)); //("TO_KEY"));
assertionOut.setKeyedReference(keyedRefOut);
}
return assertionOut;
}
catch (java.sql.SQLException sqlex)