use of com.liferay.opensocial.model.impl.GadgetImpl in project liferay-ide by liferay.
the class GadgetPersistenceImpl method findByCompanyId_PrevAndNext.
/**
* Returns the gadgets before and after the current gadget in the ordered set 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[] findByCompanyId_PrevAndNext(long gadgetId, long companyId, OrderByComparator orderByComparator) throws NoSuchGadgetException, SystemException {
Gadget gadget = findByPrimaryKey(gadgetId);
Session session = null;
try {
session = openSession();
Gadget[] array = new GadgetImpl[3];
array[0] = getByCompanyId_PrevAndNext(session, gadget, companyId, orderByComparator, true);
array[1] = gadget;
array[2] = getByCompanyId_PrevAndNext(session, gadget, companyId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.opensocial.model.impl.GadgetImpl in project liferay-ide by liferay.
the class GadgetPersistenceImpl method create.
/**
* Creates a new gadget with the primary key. Does not add the gadget to the database.
*
* @param gadgetId the primary key for the new gadget
* @return the new gadget
*/
@Override
public Gadget create(long gadgetId) {
Gadget gadget = new GadgetImpl();
gadget.setNew(true);
gadget.setPrimaryKey(gadgetId);
String uuid = PortalUUIDUtil.generate();
gadget.setUuid(uuid);
return gadget;
}
use of com.liferay.opensocial.model.impl.GadgetImpl in project liferay-ide by liferay.
the class GadgetPersistenceImpl method findByUuid_C_PrevAndNext.
/**
* Returns the gadgets before and after the current gadget in the ordered set where uuid = ? and companyId = ?.
*
* @param gadgetId the primary key of the current gadget
* @param uuid the uuid
* @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[] findByUuid_C_PrevAndNext(long gadgetId, String uuid, long companyId, OrderByComparator orderByComparator) throws NoSuchGadgetException, SystemException {
Gadget gadget = findByPrimaryKey(gadgetId);
Session session = null;
try {
session = openSession();
Gadget[] array = new GadgetImpl[3];
array[0] = getByUuid_C_PrevAndNext(session, gadget, uuid, companyId, orderByComparator, true);
array[1] = gadget;
array[2] = getByUuid_C_PrevAndNext(session, gadget, uuid, companyId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.opensocial.model.impl.GadgetImpl in project liferay-ide by liferay.
the class GadgetPersistenceImpl method filterFindByUuid_PrevAndNext.
/**
* Returns the gadgets before and after the current gadget in the ordered set of gadgets that the user has permission to view where uuid = ?.
*
* @param gadgetId the primary key of the current gadget
* @param uuid the uuid
* @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[] filterFindByUuid_PrevAndNext(long gadgetId, String uuid, OrderByComparator orderByComparator) throws NoSuchGadgetException, SystemException {
if (!InlineSQLHelperUtil.isEnabled()) {
return findByUuid_PrevAndNext(gadgetId, uuid, orderByComparator);
}
Gadget gadget = findByPrimaryKey(gadgetId);
Session session = null;
try {
session = openSession();
Gadget[] array = new GadgetImpl[3];
array[0] = filterGetByUuid_PrevAndNext(session, gadget, uuid, orderByComparator, true);
array[1] = gadget;
array[2] = filterGetByUuid_PrevAndNext(session, gadget, uuid, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.opensocial.model.impl.GadgetImpl in project liferay-ide by liferay.
the class GadgetPersistenceImpl method filterFindByUuid_C_PrevAndNext.
/**
* Returns the gadgets before and after the current gadget in the ordered set of gadgets that the user has permission to view where uuid = ? and companyId = ?.
*
* @param gadgetId the primary key of the current gadget
* @param uuid the uuid
* @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[] filterFindByUuid_C_PrevAndNext(long gadgetId, String uuid, long companyId, OrderByComparator orderByComparator) throws NoSuchGadgetException, SystemException {
if (!InlineSQLHelperUtil.isEnabled()) {
return findByUuid_C_PrevAndNext(gadgetId, uuid, companyId, orderByComparator);
}
Gadget gadget = findByPrimaryKey(gadgetId);
Session session = null;
try {
session = openSession();
Gadget[] array = new GadgetImpl[3];
array[0] = filterGetByUuid_C_PrevAndNext(session, gadget, uuid, companyId, orderByComparator, true);
array[1] = gadget;
array[2] = filterGetByUuid_C_PrevAndNext(session, gadget, uuid, companyId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
Aggregations