*
*/
public BindingTemplate fetchBinding(String bindingKey)
throws org.apache.juddi.error.RegistryException
{
BindingTemplate binding = null;
try
{
if ((bindingKey != null) && (connection != null))
{
// fetch the BindingTempate and it's Description Vector
binding = BindingTemplateTable.select(bindingKey,connection);
binding.setDescriptionVector(BindingDescTable.select(bindingKey,connection));
// fetch the BindingTemplate's CategoryBag (UDDI v3.0)
CategoryBag bag = new CategoryBag();
bag.setKeyedReferenceVector(BindingCategoryTable.select(bindingKey,connection));
binding.setCategoryBag(bag);
// fetch the BindingTemplate's TModelInstanceInfos
Vector infoVector = TModelInstanceInfoTable.select(bindingKey,connection);
if (infoVector != null)
{
int vectorSize = infoVector.size();
for (int infoID=0; infoID<vectorSize; infoID++)
{
TModelInstanceInfo info = (TModelInstanceInfo)infoVector.elementAt(infoID);
// fetch the TModelInstanceInfo Descriptions
info.setDescriptionVector(TModelInstanceInfoDescTable.select(bindingKey,infoID,connection));
InstanceDetails instDetails = info.getInstanceDetails();
if (instDetails != null)
{
// fetch the InstanceDetail Descriptions
instDetails.setDescriptionVector(InstanceDetailsDescTable.select(bindingKey,infoID,connection));
// fetch the InstanceDetail OverviewDoc Descrptions
OverviewDoc overDoc = instDetails.getOverviewDoc();
if (overDoc != null)
{
overDoc.setDescriptionVector(InstanceDetailsDocDescTable.select(bindingKey,infoID,connection));
instDetails.setOverviewDoc(overDoc);
}
}
}
TModelInstanceDetails details = new TModelInstanceDetails();
details.setTModelInstanceInfoVector(infoVector);
binding.setTModelInstanceDetails(details);
}
}
}
catch(java.sql.SQLException sqlex)
{