use of com.liferay.opensocial.NoSuchGadgetException in project liferay-ide by liferay.
the class GadgetPersistenceImpl method findByUuid_First.
/**
* Returns the first gadget in the ordered set where uuid = ?.
*
* @param uuid the uuid
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching gadget
* @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Gadget findByUuid_First(String uuid, OrderByComparator orderByComparator) throws NoSuchGadgetException, SystemException {
Gadget gadget = fetchByUuid_First(uuid, orderByComparator);
if (gadget != null) {
return gadget;
}
StringBundler msg = new StringBundler(4);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("uuid=");
msg.append(uuid);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchGadgetException(msg.toString());
}
use of com.liferay.opensocial.NoSuchGadgetException in project liferay-ide by liferay.
the class GadgetPersistenceImpl method findByCompanyId_First.
/**
* Returns the first gadget in the ordered set where companyId = ?.
*
* @param companyId the company ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching gadget
* @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Gadget findByCompanyId_First(long companyId, OrderByComparator orderByComparator) throws NoSuchGadgetException, SystemException {
Gadget gadget = fetchByCompanyId_First(companyId, orderByComparator);
if (gadget != null) {
return gadget;
}
StringBundler msg = new StringBundler(4);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("companyId=");
msg.append(companyId);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchGadgetException(msg.toString());
}
use of com.liferay.opensocial.NoSuchGadgetException in project liferay-ide by liferay.
the class GadgetPersistenceImpl method findByUuid_C_Last.
/**
* Returns the last gadget in the ordered set where uuid = ? and companyId = ?.
*
* @param uuid the uuid
* @param companyId the company ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching gadget
* @throws com.liferay.opensocial.NoSuchGadgetException if a matching gadget could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Gadget findByUuid_C_Last(String uuid, long companyId, OrderByComparator orderByComparator) throws NoSuchGadgetException, SystemException {
Gadget gadget = fetchByUuid_C_Last(uuid, companyId, orderByComparator);
if (gadget != null) {
return gadget;
}
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("uuid=");
msg.append(uuid);
msg.append(", companyId=");
msg.append(companyId);
msg.append(StringPool.CLOSE_CURLY_BRACE);
throw new NoSuchGadgetException(msg.toString());
}
use of com.liferay.opensocial.NoSuchGadgetException in project liferay-ide by liferay.
the class GadgetPersistenceImpl method filterFindByCompanyId_PrevAndNext.
/**
* Returns the gadgets before and after the current gadget in the ordered set of gadgets that the user has permission to view where companyId = ?.
*
* @param gadgetId the primary key of the current gadget
* @param companyId the company ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next gadget
* @throws com.liferay.opensocial.NoSuchGadgetException if a gadget with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public Gadget[] filterFindByCompanyId_PrevAndNext(long gadgetId, long companyId, OrderByComparator orderByComparator) throws NoSuchGadgetException, SystemException {
if (!InlineSQLHelperUtil.isEnabled()) {
return findByCompanyId_PrevAndNext(gadgetId, companyId, orderByComparator);
}
Gadget gadget = findByPrimaryKey(gadgetId);
Session session = null;
try {
session = openSession();
Gadget[] array = new GadgetImpl[3];
array[0] = filterGetByCompanyId_PrevAndNext(session, gadget, companyId, orderByComparator, true);
array[1] = gadget;
array[2] = filterGetByCompanyId_PrevAndNext(session, gadget, companyId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
Aggregations