modules/liferay-travel/liferay-travel-service/src/main/java/com/liferay/travel/service/persistence/impl/StagePersistenceImpl.java
/**
	 * Returns the stage where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	 *
	 * @param uuid the uuid
	 * @param groupId the group ID
	 * @param useFinderCache whether to use the finder cache
	 * @return the matching stage, or <code>null</code> if a matching stage could not be found
	 */
Returns the stage where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache.
@param uuid the uuid
@param groupId the group ID
@param useFinderCache whether to use the finder cache
@return the matching stage, or null if a matching stage could not be found
Returns the stage where uuid = ? and groupId = ? or returns null if it could not be found optionally using the finder cache . @param uuid the uuid @param groupId the group ID @param useFinderCache whether to use the finder cache @return the matching stage or null if a matching stage could not be found
@Override
	public Stage fetchByUUID_G(
		String uuid, long groupId, boolean useFinderCache) {
		uuid = Objects.toString(uuid, "");
		Object[] finderArgs = null;
		if (useFinderCache) {
			finderArgs = new Object[] {uuid, groupId};
		}
		Object result = null;
		if (useFinderCache) {
			result = finderCache.getResult(
				_finderPathFetchByUUID_G, finderArgs, this);
		}
		if (result instanceof Stage) {
			Stage stage = (Stage)result;
			if (!Objects.equals(uuid, stage.getUuid()) ||
				(groupId != stage.getGroupId())) {
				result = null;
			}
		}
		if (result == null) {
			StringBundler sb = new StringBundler(4);
			sb.append(_SQL_SELECT_STAGE_WHERE);
			boolean bindUuid = false;
			if (uuid.isEmpty()) {
				sb.append(_FINDER_COLUMN_UUID_G_UUID_3);
			}
			else {
				bindUuid = true;
				sb.append(_FINDER_COLUMN_UUID_G_UUID_2);
			}
			sb.append(_FINDER_COLUMN_UUID_G_GROUPID_2);
			String sql = sb.toString();
			Session session = null;
			try {
				session = openSession();
				Query query = session.createQuery(sql);
				QueryPos queryPos = QueryPos.getInstance(query);
				if (bindUuid) {
					queryPos.add(uuid);
				}
				queryPos.add(groupId);
				List<Stage> list = query.list();
				if (list.isEmpty()) {
					if (useFinderCache) {
						finderCache.putResult(
							_finderPathFetchByUUID_G, finderArgs, list);
					}
				}
				else {
					Stage stage = list.get(0);
					result = stage;
					cacheResult(stage);
				}
			}
			catch (Exception exception) {
				throw processException(exception);
			}
			finally {
				closeSession(session);
			}
		}
		if (result instanceof List<?>) {
			return null;
		}
		else {
			return (Stage)result;
		}
	}
@ Override public Stage fetchByUUID_G ( String uuid , long groupId , boolean useFinderCache ) { uuid = Objects . toString ( uuid , "" ) ; Object [ ] finderArgs = null ; if ( useFinderCache ) { finderArgs = new Object [ ] { uuid , groupId } ; } Object result = null ; if ( useFinderCache ) { result = finderCache . getResult ( _finderPathFetchByUUID_G , finderArgs , this ) ; } if ( result instanceof Stage ) { Stage stage = ( Stage ) result ; if ( ! Objects . equals ( uuid , stage . getUuid ( ) ) || ( groupId != stage . getGroupId ( ) ) ) { result = null ; } } if ( result == null ) { StringBundler sb = new StringBundler ( 4 ) ; sb . append ( _SQL_SELECT_STAGE_WHERE ) ; boolean bindUuid = false ; if ( uuid . isEmpty ( ) ) { sb . append ( _FINDER_COLUMN_UUID_G_UUID_3 ) ; } else { bindUuid = true ; sb . append ( _FINDER_COLUMN_UUID_G_UUID_2 ) ; } sb . append ( _FINDER_COLUMN_UUID_G_GROUPID_2 ) ; String sql = sb . toString ( ) ; Session session = null ; try { session = openSession ( ) ; Query query = session . createQuery ( sql ) ; QueryPos queryPos = QueryPos . getInstance ( query ) ; if ( bindUuid ) { queryPos . add ( uuid ) ; } queryPos . add ( groupId ) ; List < Stage > list = query . list ( ) ; if ( list . isEmpty ( ) ) { if ( useFinderCache ) { finderCache . putResult ( _finderPathFetchByUUID_G , finderArgs , list ) ; } } else { Stage stage = list . get ( 0 ) ; result = stage ; cacheResult ( stage ) ; } } catch ( Exception exception ) { throw processException ( exception ) ; } finally { closeSession ( session ) ; } } if ( result instanceof List < ? > ) { return null ; } else { return ( Stage ) result ; } }
Returns the stage where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
Returns the stage where uuid = &#63 ; and groupId = &#63 ; or returns <code > null< / code > if it could not be found optionally using the finder cache .