Esempio n. 1
0
int DatabaseManager::getRecordTotalCount(const StringPimpl &key)
{
	StringPimpl sizeAsString = getRecord(m_reserved + key + "_@size_@", true);
	if(sizeAsString.empty())
	{
		return 0;
	}
	else
	{
		return sizeAsString.getInteger();
	}
}
Esempio n. 2
0
void TopicStar::setAttribute(const StringPimpl &name, const StringPimpl &value) throw(InternalProgrammerErrorException &)
{
	try
	{
		if(name == "index" && (!value.empty()))
		{
			m_pimpl->m_index = value.getInteger();
		}
	}
	catch(NumberFormatException &)
	{
		//Error, the cast to a numeric value failed
		FrameworkFactory *factory = FrameworkFactory::getInstance();
		IdentificationManager *ident = IdentificationManager::getInstance();
		GraphBuilderFramework *builder = factory->getGraphBuilderFramework();
		builder->getCallBacks().topicStarTagNumericConversionError("Index string is not numeric, " + value, ident->getUserId(), ident->getBotId(), ident->getEndUserId()); 
	}
}