public AvailableServiceBindingVO getAvailableServiceBindingVO(String availableServiceBindingName, Database db) throws SystemException, Exception
{
String key = "" + availableServiceBindingName;
logger.info("key:" + key);
AvailableServiceBindingVO availableServiceBindingVO = (AvailableServiceBindingVO)CacheController.getCachedObject("availableServiceBindingCache", key);
if(availableServiceBindingVO != null)
{
logger.info("There was an cached availableServiceBindingVO:" + availableServiceBindingVO);
}
else
{
logger.info("Going to look for availableServiceBindingName " + availableServiceBindingName);
//OQLQuery oql = db.getOQLQuery( "SELECT asb FROM org.infoglue.cms.entities.management.impl.simple.AvailableServiceBindingImpl asb WHERE asb.name = $1");
OQLQuery oql = db.getOQLQuery( "SELECT asb FROM org.infoglue.cms.entities.management.impl.simple.SmallAvailableServiceBindingImpl asb WHERE asb.name = $1");
//OQLQuery oql = db.getOQLQuery( "CALL SQL SELECT availableServiceBindingId, name, description, visualizationAction, isMandatory, isUserEditable, isInheritable FROM cmAvailableServiceBinding WHERE (name = $1) AS org.infoglue.cms.entities.management.impl.simple.AvailableServiceBindingImpl");
oql.bind(availableServiceBindingName);
QueryResults results = oql.execute(Database.READONLY);
if (results.hasMore())
{
AvailableServiceBinding availableServiceBinding = (AvailableServiceBinding)results.next();
availableServiceBindingVO = availableServiceBinding.getValueObject();
logger.info("Found availableServiceBinding:" + availableServiceBindingVO.getName());
}
else
{
logger.info("Found no AvailableServiceBindingVO with name " + availableServiceBindingName);
}