* @throws java.sql.SQLException
*/
public static BindingTemplate select(String bindingKey,Connection connection)
throws java.sql.SQLException
{
BindingTemplate binding = null;
PreparedStatement statement = null;
ResultSet resultSet = null;
try
{
statement = connection.prepareStatement(selectSQL);
statement.setString(1,bindingKey.toString());
log.debug("select from BINDING_TEMPLATE table:\n\n\t" + selectSQL +
"\n\t BINDING_KEY=" + bindingKey.toString() + "\n");
resultSet = statement.executeQuery();
if (resultSet.next())
{
binding = new BindingTemplate();
binding.setServiceKey(resultSet.getString(1));//("SERVICE_KEY"));
binding.setBindingKey(bindingKey);
String urlType = resultSet.getString(2);//("ACCESS_POINT_TYPE");
String url = resultSet.getString(3);//("ACCESS_POINT_URL");
if ((urlType != null) && (url != null))
binding.setAccessPoint(new AccessPoint(urlType,url));
String redirectorKey = resultSet.getString(4);//("HOSTING_REDIRECTOR");
if (redirectorKey != null)
binding.setHostingRedirector(new HostingRedirector(redirectorKey));
}
return binding;
}
finally