List<MeetupsRegistration> list = (List<MeetupsRegistration>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_ME_S,
finderArgs, this);
if (list == null) {
Session session = null;
try {
session = openSession();
StringBundler query = null;
if (orderByComparator != null) {
query = new StringBundler(4 +
(orderByComparator.getOrderByFields().length * 3));
}
else {
query = new StringBundler(4);
}
query.append(_SQL_SELECT_MEETUPSREGISTRATION_WHERE);
query.append(_FINDER_COLUMN_ME_S_MEETUPSENTRYID_2);
query.append(_FINDER_COLUMN_ME_S_STATUS_2);
if (orderByComparator != null) {
appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
orderByComparator);
}
else {
query.append(MeetupsRegistrationModelImpl.ORDER_BY_JPQL);
}
String sql = query.toString();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
qPos.add(meetupsEntryId);