List of usage examples for com.liferay.portal.kernel.dao.orm ObjectNotFoundException ObjectNotFoundException
public ObjectNotFoundException(Throwable cause)
From source file:com.liferay.salesforce.service.impl.SalesforceLocalServiceImpl.java
License:Open Source License
public Message executeQuery(long companyId, String objectId, String objectType, List<String> fieldNames, long ownerId) throws ObjectNotFoundException, SystemException { SalesforceConnection salesforceConnection = getSalesforceConnection(companyId, ownerId); SObject[] sObjects = salesforceConnection.retrieve(StringUtil.merge(fieldNames), objectType, new String[] { objectId }); if ((sObjects == null) || (sObjects.length == 0)) { throw new ObjectNotFoundException(objectId); }/*ww w . ja v a 2 s . c o m*/ return SObjectConverter.convert(sObjects[0]); }