Skip to content

Instantly share code, notes, and snippets.

@joshitagaki
Created September 18, 2019 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshitagaki/eeca3835365f5a015688854e0dfc98f0 to your computer and use it in GitHub Desktop.
Save joshitagaki/eeca3835365f5a015688854e0dfc98f0 to your computer and use it in GitHub Desktop.
[echo] +++ b/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentCollectionPersistence.java
[echo] @@ -518,62 +518,6 @@ public interface FragmentCollectionPersistence
[echo] throws NoSuchCollectionException;
[echo]
[echo] /**
[echo] - * Returns all the fragment collections that the user has permission to view where groupId = ?.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @return the matching fragment collections that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentCollection> filterFindByGroupId(long groupId);
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment collections that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentCollectionModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param start the lower bound of the range of fragment collections
[echo] - * @param end the upper bound of the range of fragment collections (not inclusive)
[echo] - * @return the range of matching fragment collections that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentCollection> filterFindByGroupId(
[echo] - long groupId, int start, int end);
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment collections that the user has permissions to view where groupId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentCollectionModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param start the lower bound of the range of fragment collections
[echo] - * @param end the upper bound of the range of fragment collections (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment collections that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentCollection> filterFindByGroupId(
[echo] - long groupId, int start, int end,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentCollection>
[echo] - orderByComparator);
[echo] -
[echo] - /**
[echo] - * Returns the fragment collections before and after the current fragment collection in the ordered set of fragment collections that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param fragmentCollectionId the primary key of the current fragment collection
[echo] - * @param groupId the group ID
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment collection
[echo] - * @throws NoSuchCollectionException if a fragment collection with the primary key could not be found
[echo] - */
[echo] - public FragmentCollection[] filterFindByGroupId_PrevAndNext(
[echo] - long fragmentCollectionId, long groupId,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentCollection>
[echo] - orderByComparator)
[echo] - throws NoSuchCollectionException;
[echo] -
[echo] - /**
[echo] * Removes all the fragment collections where groupId = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -589,14 +533,6 @@ public interface FragmentCollectionPersistence
[echo] public int countByGroupId(long groupId);
[echo]
[echo] /**
[echo] - * Returns the number of fragment collections that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @return the number of matching fragment collections that the user has permission to view
[echo] - */
[echo] - public int filterCountByGroupId(long groupId);
[echo] -
[echo] - /**
[echo] * Returns the fragment collection where groupId = &#63; and fragmentCollectionKey = &#63; or throws a <code>NoSuchCollectionException</code> if it could not be found.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -788,67 +724,6 @@ public interface FragmentCollectionPersistence
[echo] throws NoSuchCollectionException;
[echo]
[echo] /**
[echo] - * Returns all the fragment collections that the user has permission to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @return the matching fragment collections that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentCollection> filterFindByG_LikeN(
[echo] - long groupId, String name);
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment collections that the user has permission to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentCollectionModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment collections
[echo] - * @param end the upper bound of the range of fragment collections (not inclusive)
[echo] - * @return the range of matching fragment collections that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentCollection> filterFindByG_LikeN(
[echo] - long groupId, String name, int start, int end);
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment collections that the user has permissions to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentCollectionModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment collections
[echo] - * @param end the upper bound of the range of fragment collections (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment collections that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentCollection> filterFindByG_LikeN(
[echo] - long groupId, String name, int start, int end,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentCollection>
[echo] - orderByComparator);
[echo] -
[echo] - /**
[echo] - * Returns the fragment collections before and after the current fragment collection in the ordered set of fragment collections that the user has permission to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param fragmentCollectionId the primary key of the current fragment collection
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment collection
[echo] - * @throws NoSuchCollectionException if a fragment collection with the primary key could not be found
[echo] - */
[echo] - public FragmentCollection[] filterFindByG_LikeN_PrevAndNext(
[echo] - long fragmentCollectionId, long groupId, String name,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentCollection>
[echo] - orderByComparator)
[echo] - throws NoSuchCollectionException;
[echo] -
[echo] - /**
[echo] * Removes all the fragment collections where groupId = &#63; and name LIKE &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -866,15 +741,6 @@ public interface FragmentCollectionPersistence
[echo] public int countByG_LikeN(long groupId, String name);
[echo]
[echo] /**
[echo] - * Returns the number of fragment collections that the user has permission to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @return the number of matching fragment collections that the user has permission to view
[echo] - */
[echo] - public int filterCountByG_LikeN(long groupId, String name);
[echo] -
[echo] - /**
[echo] * Caches the fragment collection in the entity cache if it is enabled.
[echo] *
[echo] * @param fragmentCollection the fragment collection
[echo] diff --git a/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentCollectionUtil.java b/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentCollectionUtil.java
[echo] index 0aa3765..45f817f 100644
[echo] --- a/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentCollectionUtil.java
[echo] +++ b/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentCollectionUtil.java
[echo] @@ -690,73 +690,6 @@ public class FragmentCollectionUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment collections that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @return the matching fragment collections that the user has permission to view
[echo] - */
[echo] - public static List<FragmentCollection> filterFindByGroupId(long groupId) {
[echo] - return getPersistence().filterFindByGroupId(groupId);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment collections that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentCollectionModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param start the lower bound of the range of fragment collections
[echo] - * @param end the upper bound of the range of fragment collections (not inclusive)
[echo] - * @return the range of matching fragment collections that the user has permission to view
[echo] - */
[echo] - public static List<FragmentCollection> filterFindByGroupId(
[echo] - long groupId, int start, int end) {
[echo] -
[echo] - return getPersistence().filterFindByGroupId(groupId, start, end);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment collections that the user has permissions to view where groupId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentCollectionModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param start the lower bound of the range of fragment collections
[echo] - * @param end the upper bound of the range of fragment collections (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment collections that the user has permission to view
[echo] - */
[echo] - public static List<FragmentCollection> filterFindByGroupId(
[echo] - long groupId, int start, int end,
[echo] - OrderByComparator<FragmentCollection> orderByComparator) {
[echo] -
[echo] - return getPersistence().filterFindByGroupId(
[echo] - groupId, start, end, orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment collections before and after the current fragment collection in the ordered set of fragment collections that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param fragmentCollectionId the primary key of the current fragment collection
[echo] - * @param groupId the group ID
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment collection
[echo] - * @throws NoSuchCollectionException if a fragment collection with the primary key could not be found
[echo] - */
[echo] - public static FragmentCollection[] filterFindByGroupId_PrevAndNext(
[echo] - long fragmentCollectionId, long groupId,
[echo] - OrderByComparator<FragmentCollection> orderByComparator)
[echo] - throws com.liferay.fragment.exception.NoSuchCollectionException {
[echo] -
[echo] - return getPersistence().filterFindByGroupId_PrevAndNext(
[echo] - fragmentCollectionId, groupId, orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] * Removes all the fragment collections where groupId = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -776,16 +709,6 @@ public class FragmentCollectionUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns the number of fragment collections that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @return the number of matching fragment collections that the user has permission to view
[echo] - */
[echo] - public static int filterCountByGroupId(long groupId) {
[echo] - return getPersistence().filterCountByGroupId(groupId);
[echo] - }
[echo] -
[echo] - /**
[echo] * Returns the fragment collection where groupId = &#63; and fragmentCollectionKey = &#63; or throws a <code>NoSuchCollectionException</code> if it could not be found.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1019,79 +942,6 @@ public class FragmentCollectionUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment collections that the user has permission to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @return the matching fragment collections that the user has permission to view
[echo] - */
[echo] - public static List<FragmentCollection> filterFindByG_LikeN(
[echo] - long groupId, String name) {
[echo] -
[echo] - return getPersistence().filterFindByG_LikeN(groupId, name);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment collections that the user has permission to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentCollectionModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment collections
[echo] - * @param end the upper bound of the range of fragment collections (not inclusive)
[echo] - * @return the range of matching fragment collections that the user has permission to view
[echo] - */
[echo] - public static List<FragmentCollection> filterFindByG_LikeN(
[echo] - long groupId, String name, int start, int end) {
[echo] -
[echo] - return getPersistence().filterFindByG_LikeN(groupId, name, start, end);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment collections that the user has permissions to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentCollectionModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment collections
[echo] - * @param end the upper bound of the range of fragment collections (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment collections that the user has permission to view
[echo] - */
[echo] - public static List<FragmentCollection> filterFindByG_LikeN(
[echo] - long groupId, String name, int start, int end,
[echo] - OrderByComparator<FragmentCollection> orderByComparator) {
[echo] -
[echo] - return getPersistence().filterFindByG_LikeN(
[echo] - groupId, name, start, end, orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment collections before and after the current fragment collection in the ordered set of fragment collections that the user has permission to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param fragmentCollectionId the primary key of the current fragment collection
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment collection
[echo] - * @throws NoSuchCollectionException if a fragment collection with the primary key could not be found
[echo] - */
[echo] - public static FragmentCollection[] filterFindByG_LikeN_PrevAndNext(
[echo] - long fragmentCollectionId, long groupId, String name,
[echo] - OrderByComparator<FragmentCollection> orderByComparator)
[echo] - throws com.liferay.fragment.exception.NoSuchCollectionException {
[echo] -
[echo] - return getPersistence().filterFindByG_LikeN_PrevAndNext(
[echo] - fragmentCollectionId, groupId, name, orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] * Removes all the fragment collections where groupId = &#63; and name LIKE &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1113,17 +963,6 @@ public class FragmentCollectionUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns the number of fragment collections that the user has permission to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @return the number of matching fragment collections that the user has permission to view
[echo] - */
[echo] - public static int filterCountByG_LikeN(long groupId, String name) {
[echo] - return getPersistence().filterCountByG_LikeN(groupId, name);
[echo] - }
[echo] -
[echo] - /**
[echo] * Caches the fragment collection in the entity cache if it is enabled.
[echo] *
[echo] * @param fragmentCollection the fragment collection
[echo] diff --git a/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentEntryPersistence.java b/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentEntryPersistence.java
[echo] index 7947592..2bd257b 100644
[echo] --- a/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentEntryPersistence.java
[echo] +++ b/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentEntryPersistence.java
[echo] @@ -518,62 +518,6 @@ public interface FragmentEntryPersistence
[echo] throws NoSuchEntryException;
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByGroupId(long groupId);
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByGroupId(
[echo] - long groupId, int start, int end);
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByGroupId(
[echo] - long groupId, int start, int end,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator);
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public FragmentEntry[] filterFindByGroupId_PrevAndNext(
[echo] - long fragmentEntryId, long groupId,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator)
[echo] - throws NoSuchEntryException;
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -589,14 +533,6 @@ public interface FragmentEntryPersistence
[echo] public int countByGroupId(long groupId);
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public int filterCountByGroupId(long groupId);
[echo] -
[echo] - /**
[echo] * Returns all the fragment entries where fragmentCollectionId = &#63;.
[echo] *
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] @@ -879,67 +815,6 @@ public interface FragmentEntryPersistence
[echo] throws NoSuchEntryException;
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI(
[echo] - long groupId, long fragmentCollectionId);
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI(
[echo] - long groupId, long fragmentCollectionId, int start, int end);
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI(
[echo] - long groupId, long fragmentCollectionId, int start, int end,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator);
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public FragmentEntry[] filterFindByG_FCI_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator)
[echo] - throws NoSuchEntryException;
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -957,15 +832,6 @@ public interface FragmentEntryPersistence
[echo] public int countByG_FCI(long groupId, long fragmentCollectionId);
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public int filterCountByG_FCI(long groupId, long fragmentCollectionId);
[echo] -
[echo] - /**
[echo] * Returns the fragment entry where groupId = &#63; and fragmentEntryKey = &#63; or throws a <code>NoSuchEntryException</code> if it could not be found.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1167,74 +1033,6 @@ public interface FragmentEntryPersistence
[echo] throws NoSuchEntryException;
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name);
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name, int start,
[echo] - int end);
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name, int start,
[echo] - int end,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator);
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public FragmentEntry[] filterFindByG_FCI_LikeN_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - String name,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator)
[echo] - throws NoSuchEntryException;
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1256,17 +1054,6 @@ public interface FragmentEntryPersistence
[echo] long groupId, long fragmentCollectionId, String name);
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public int filterCountByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name);
[echo] -
[echo] - /**
[echo] * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1415,72 +1202,6 @@ public interface FragmentEntryPersistence
[echo] throws NoSuchEntryException;
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type);
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type, int start, int end);
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type, int start, int end,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator);
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public FragmentEntry[] filterFindByG_FCI_T_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - int type,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator)
[echo] - throws NoSuchEntryException;
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1502,17 +1223,6 @@ public interface FragmentEntryPersistence
[echo] long groupId, long fragmentCollectionId, int type);
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public int filterCountByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type);
[echo] -
[echo] - /**
[echo] * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1662,73 +1372,6 @@ public interface FragmentEntryPersistence
[echo] throws NoSuchEntryException;
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status);
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status, int start,
[echo] - int end);
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status, int start, int end,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator);
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public FragmentEntry[] filterFindByG_FCI_S_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - int status,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator)
[echo] - throws NoSuchEntryException;
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1750,17 +1393,6 @@ public interface FragmentEntryPersistence
[echo] long groupId, long fragmentCollectionId, int status);
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public int filterCountByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status);
[echo] -
[echo] - /**
[echo] * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1921,78 +1553,6 @@ public interface FragmentEntryPersistence
[echo] throws NoSuchEntryException;
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status);
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status,
[echo] - int start, int end);
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status,
[echo] - int start, int end,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator);
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public FragmentEntry[] filterFindByG_FCI_LikeN_S_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - String name, int status,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator)
[echo] - throws NoSuchEntryException;
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -2016,18 +1576,6 @@ public interface FragmentEntryPersistence
[echo] long groupId, long fragmentCollectionId, String name, int status);
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public int filterCountByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status);
[echo] -
[echo] - /**
[echo] * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -2188,78 +1736,6 @@ public interface FragmentEntryPersistence
[echo] throws NoSuchEntryException;
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status);
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status,
[echo] - int start, int end);
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public java.util.List<FragmentEntry> filterFindByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status,
[echo] - int start, int end,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator);
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public FragmentEntry[] filterFindByG_FCI_T_S_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - int type, int status,
[echo] - com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry>
[echo] - orderByComparator)
[echo] - throws NoSuchEntryException;
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -2283,18 +1759,6 @@ public interface FragmentEntryPersistence
[echo] long groupId, long fragmentCollectionId, int type, int status);
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public int filterCountByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status);
[echo] -
[echo] - /**
[echo] * Caches the fragment entry in the entity cache if it is enabled.
[echo] *
[echo] * @param fragmentEntry the fragment entry
[echo] diff --git a/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentEntryUtil.java b/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentEntryUtil.java
[echo] index 4103f3e..61ac518 100644
[echo] --- a/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentEntryUtil.java
[echo] +++ b/modules/apps/fragment/fragment-api/src/main/java/com/liferay/fragment/service/persistence/FragmentEntryUtil.java
[echo] @@ -684,73 +684,6 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByGroupId(long groupId) {
[echo] - return getPersistence().filterFindByGroupId(groupId);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByGroupId(
[echo] - long groupId, int start, int end) {
[echo] -
[echo] - return getPersistence().filterFindByGroupId(groupId, start, end);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByGroupId(
[echo] - long groupId, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - return getPersistence().filterFindByGroupId(
[echo] - groupId, start, end, orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public static FragmentEntry[] filterFindByGroupId_PrevAndNext(
[echo] - long fragmentEntryId, long groupId,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws com.liferay.fragment.exception.NoSuchEntryException {
[echo] -
[echo] - return getPersistence().filterFindByGroupId_PrevAndNext(
[echo] - fragmentEntryId, groupId, orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -770,16 +703,6 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static int filterCountByGroupId(long groupId) {
[echo] - return getPersistence().filterCountByGroupId(groupId);
[echo] - }
[echo] -
[echo] - /**
[echo] * Returns all the fragment entries where fragmentCollectionId = &#63;.
[echo] *
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] @@ -1126,81 +1049,6 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI(
[echo] - long groupId, long fragmentCollectionId) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI(
[echo] - groupId, fragmentCollectionId);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI(
[echo] - long groupId, long fragmentCollectionId, int start, int end) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI(
[echo] - groupId, fragmentCollectionId, start, end);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI(
[echo] - long groupId, long fragmentCollectionId, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI(
[echo] - groupId, fragmentCollectionId, start, end, orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public static FragmentEntry[] filterFindByG_FCI_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws com.liferay.fragment.exception.NoSuchEntryException {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_PrevAndNext(
[echo] - fragmentEntryId, groupId, fragmentCollectionId, orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1222,20 +1070,6 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static int filterCountByG_FCI(
[echo] - long groupId, long fragmentCollectionId) {
[echo] -
[echo] - return getPersistence().filterCountByG_FCI(
[echo] - groupId, fragmentCollectionId);
[echo] - }
[echo] -
[echo] - /**
[echo] * Returns the fragment entry where groupId = &#63; and fragmentEntryKey = &#63; or throws a <code>NoSuchEntryException</code> if it could not be found.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1483,87 +1317,6 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name, int start,
[echo] - int end) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name, start, end);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name, int start,
[echo] - int end, OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name, start, end, orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public static FragmentEntry[] filterFindByG_FCI_LikeN_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - String name, OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws com.liferay.fragment.exception.NoSuchEntryException {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_LikeN_PrevAndNext(
[echo] - fragmentEntryId, groupId, fragmentCollectionId, name,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1593,21 +1346,6 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static int filterCountByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name) {
[echo] -
[echo] - return getPersistence().filterCountByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name);
[echo] - }
[echo] -
[echo] - /**
[echo] * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -1786,22 +1524,50 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] + * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; from the database.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param type the type
[echo] + */
[echo] + public static void removeByG_FCI_T(
[echo] + long groupId, long fragmentCollectionId, int type) {
[echo] +
[echo] + getPersistence().removeByG_FCI_T(groupId, fragmentCollectionId, type);
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the number of fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param type the type
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] + * @return the number of matching fragment entries
[echo] */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_T(
[echo] + public static int countByG_FCI_T(
[echo] long groupId, long fragmentCollectionId, int type) {
[echo]
[echo] - return getPersistence().filterFindByG_FCI_T(
[echo] + return getPersistence().countByG_FCI_T(
[echo] groupId, fragmentCollectionId, type);
[echo] }
[echo]
[echo] /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] + * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param status the status
[echo] + * @return the matching fragment entries
[echo] + */
[echo] + public static List<FragmentEntry> findByG_FCI_S(
[echo] + long groupId, long fragmentCollectionId, int status) {
[echo] +
[echo] + return getPersistence().findByG_FCI_S(
[echo] + groupId, fragmentCollectionId, status);
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] *
[echo] * <p>
[echo] * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] @@ -1809,20 +1575,21 @@ public class FragmentEntryUtil {
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] + * @param status the status
[echo] * @param start the lower bound of the range of fragment entries
[echo] * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] + * @return the range of matching fragment entries
[echo] */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type, int start, int end) {
[echo] + public static List<FragmentEntry> findByG_FCI_S(
[echo] + long groupId, long fragmentCollectionId, int status, int start,
[echo] + int end) {
[echo]
[echo] - return getPersistence().filterFindByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type, start, end);
[echo] + return getPersistence().findByG_FCI_S(
[echo] + groupId, fragmentCollectionId, status, start, end);
[echo] }
[echo]
[echo] /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] *
[echo] * <p>
[echo] * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] @@ -1830,138 +1597,14 @@ public class FragmentEntryUtil {
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] + * @param status the status
[echo] * @param start the lower bound of the range of fragment entries
[echo] * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] + * @return the ordered range of matching fragment entries
[echo] */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type, start, end, orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public static FragmentEntry[] filterFindByG_FCI_T_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - int type, OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws com.liferay.fragment.exception.NoSuchEntryException {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_T_PrevAndNext(
[echo] - fragmentEntryId, groupId, fragmentCollectionId, type,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; from the database.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - */
[echo] - public static void removeByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type) {
[echo] -
[echo] - getPersistence().removeByG_FCI_T(groupId, fragmentCollectionId, type);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the number of fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @return the number of matching fragment entries
[echo] - */
[echo] - public static int countByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type) {
[echo] -
[echo] - return getPersistence().countByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static int filterCountByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type) {
[echo] -
[echo] - return getPersistence().filterCountByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @return the matching fragment entries
[echo] - */
[echo] - public static List<FragmentEntry> findByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status) {
[echo] -
[echo] - return getPersistence().findByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries
[echo] - */
[echo] - public static List<FragmentEntry> findByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status, int start,
[echo] - int end) {
[echo] -
[echo] - return getPersistence().findByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status, start, end);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries
[echo] - */
[echo] - public static List<FragmentEntry> findByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status, int start, int end,
[echo] + public static List<FragmentEntry> findByG_FCI_S(
[echo] + long groupId, long fragmentCollectionId, int status, int start, int end,
[echo] OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] return getPersistence().findByG_FCI_S(
[echo] @@ -2089,88 +1732,6 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status, int start,
[echo] - int end) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status, start, end);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status, start, end,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public static FragmentEntry[] filterFindByG_FCI_S_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - int status, OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws com.liferay.fragment.exception.NoSuchEntryException {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_S_PrevAndNext(
[echo] - fragmentEntryId, groupId, fragmentCollectionId, status,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -2199,21 +1760,6 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static int filterCountByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status) {
[echo] -
[echo] - return getPersistence().filterCountByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status);
[echo] - }
[echo] -
[echo] - /**
[echo] * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -2405,94 +1951,6 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status,
[echo] - int start, int end) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status, start, end);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status,
[echo] - int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status, start, end,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public static FragmentEntry[] filterFindByG_FCI_LikeN_S_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - String name, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws com.liferay.fragment.exception.NoSuchEntryException {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_LikeN_S_PrevAndNext(
[echo] - fragmentEntryId, groupId, fragmentCollectionId, name, status,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -2524,22 +1982,6 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static int filterCountByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status) {
[echo] -
[echo] - return getPersistence().filterCountByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status);
[echo] - }
[echo] -
[echo] - /**
[echo] * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -2731,94 +2173,6 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status,
[echo] - int start, int end) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status, start, end);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static List<FragmentEntry> filterFindByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status,
[echo] - int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status, start, end,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - public static FragmentEntry[] filterFindByG_FCI_T_S_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - int type, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws com.liferay.fragment.exception.NoSuchEntryException {
[echo] -
[echo] - return getPersistence().filterFindByG_FCI_T_S_PrevAndNext(
[echo] - fragmentEntryId, groupId, fragmentCollectionId, type, status,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - /**
[echo] * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -2850,22 +2204,6 @@ public class FragmentEntryUtil {
[echo] }
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - public static int filterCountByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status) {
[echo] -
[echo] - return getPersistence().filterCountByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status);
[echo] - }
[echo] -
[echo] - /**
[echo] * Caches the fragment entry in the entity cache if it is enabled.
[echo] *
[echo] * @param fragmentEntry the fragment entry
[echo] diff --git a/modules/apps/fragment/fragment-service/src/main/java/com/liferay/fragment/service/persistence/impl/FragmentCollectionPersistenceImpl.java b/modules/apps/fragment/fragment-service/src/main/java/com/liferay/fragment/service/persistence/impl/FragmentCollectionPersistenceImpl.java
[echo] index f0724ab..98c1e12 100644
[echo] --- a/modules/apps/fragment/fragment-service/src/main/java/com/liferay/fragment/service/persistence/impl/FragmentCollectionPersistenceImpl.java
[echo] +++ b/modules/apps/fragment/fragment-service/src/main/java/com/liferay/fragment/service/persistence/impl/FragmentCollectionPersistenceImpl.java
[echo] @@ -28,13 +28,11 @@ import com.liferay.portal.kernel.dao.orm.FinderPath;
[echo] import com.liferay.portal.kernel.dao.orm.Query;
[echo] import com.liferay.portal.kernel.dao.orm.QueryPos;
[echo] import com.liferay.portal.kernel.dao.orm.QueryUtil;
[echo] -import com.liferay.portal.kernel.dao.orm.SQLQuery;
[echo] import com.liferay.portal.kernel.dao.orm.Session;
[echo] import com.liferay.portal.kernel.dao.orm.SessionFactory;
[echo] import com.liferay.portal.kernel.log.Log;
[echo] import com.liferay.portal.kernel.log.LogFactoryUtil;
[echo] import com.liferay.portal.kernel.security.auth.CompanyThreadLocal;
[echo] -import com.liferay.portal.kernel.security.permission.InlineSQLHelperUtil;
[echo] import com.liferay.portal.kernel.service.ServiceContext;
[echo] import com.liferay.portal.kernel.service.ServiceContextThreadLocal;
[echo] import com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl;
[echo] @@ -1962,337 +1960,6 @@ public class FragmentCollectionPersistenceImpl
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment collections that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @return the matching fragment collections that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public List<FragmentCollection> filterFindByGroupId(long groupId) {
[echo] - return filterFindByGroupId(
[echo] - groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment collections that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentCollectionModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param start the lower bound of the range of fragment collections
[echo] - * @param end the upper bound of the range of fragment collections (not inclusive)
[echo] - * @return the range of matching fragment collections that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public List<FragmentCollection> filterFindByGroupId(
[echo] - long groupId, int start, int end) {
[echo] -
[echo] - return filterFindByGroupId(groupId, start, end, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment collections that the user has permissions to view where groupId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentCollectionModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param start the lower bound of the range of fragment collections
[echo] - * @param end the upper bound of the range of fragment collections (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment collections that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public List<FragmentCollection> filterFindByGroupId(
[echo] - long groupId, int start, int end,
[echo] - OrderByComparator<FragmentCollection> orderByComparator) {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByGroupId(groupId, start, end, orderByComparator);
[echo] - }
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 3 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(4);
[echo] - }
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTCOLLECTION_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTCOLLECTION_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] -
[echo] - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
[echo] -
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTCOLLECTION_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true);
[echo] - }
[echo] - else {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_TABLE, orderByComparator, true);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentCollectionModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentCollectionModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] - }
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentCollection.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentCollectionImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentCollectionImpl.class);
[echo] - }
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - return (List<FragmentCollection>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment collections before and after the current fragment collection in the ordered set of fragment collections that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param fragmentCollectionId the primary key of the current fragment collection
[echo] - * @param groupId the group ID
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment collection
[echo] - * @throws NoSuchCollectionException if a fragment collection with the primary key could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentCollection[] filterFindByGroupId_PrevAndNext(
[echo] - long fragmentCollectionId, long groupId,
[echo] - OrderByComparator<FragmentCollection> orderByComparator)
[echo] - throws NoSuchCollectionException {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByGroupId_PrevAndNext(
[echo] - fragmentCollectionId, groupId, orderByComparator);
[echo] - }
[echo] -
[echo] - FragmentCollection fragmentCollection = findByPrimaryKey(
[echo] - fragmentCollectionId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - FragmentCollection[] array = new FragmentCollectionImpl[3];
[echo] -
[echo] - array[0] = filterGetByGroupId_PrevAndNext(
[echo] - session, fragmentCollection, groupId, orderByComparator, true);
[echo] -
[echo] - array[1] = fragmentCollection;
[echo] -
[echo] - array[2] = filterGetByGroupId_PrevAndNext(
[echo] - session, fragmentCollection, groupId, orderByComparator, false);
[echo] -
[echo] - return array;
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - protected FragmentCollection filterGetByGroupId_PrevAndNext(
[echo] - Session session, FragmentCollection fragmentCollection, long groupId,
[echo] - OrderByComparator<FragmentCollection> orderByComparator,
[echo] - boolean previous) {
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 5 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] - (orderByComparator.getOrderByFields().length * 3));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(4);
[echo] - }
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTCOLLECTION_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTCOLLECTION_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] -
[echo] - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
[echo] -
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTCOLLECTION_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - String[] orderByConditionFields =
[echo] - orderByComparator.getOrderByConditionFields();
[echo] -
[echo] - if (orderByConditionFields.length > 0) {
[echo] - query.append(WHERE_AND);
[echo] - }
[echo] -
[echo] - for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] -
[echo] - if ((i + 1) < orderByConditionFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN);
[echo] - }
[echo] - }
[echo] - }
[echo] -
[echo] - query.append(ORDER_BY_CLAUSE);
[echo] -
[echo] - String[] orderByFields = orderByComparator.getOrderByFields();
[echo] -
[echo] - for (int i = 0; i < orderByFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByFields[i], true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByFields[i], true));
[echo] - }
[echo] -
[echo] - if ((i + 1) < orderByFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC);
[echo] - }
[echo] - }
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentCollectionModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentCollectionModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] - }
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentCollection.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - q.setFirstResult(0);
[echo] - q.setMaxResults(2);
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentCollectionImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentCollectionImpl.class);
[echo] - }
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - for (Object orderByConditionValue :
[echo] - orderByComparator.getOrderByConditionValues(
[echo] - fragmentCollection)) {
[echo] -
[echo] - qPos.add(orderByConditionValue);
[echo] - }
[echo] - }
[echo] -
[echo] - List<FragmentCollection> list = q.list();
[echo] -
[echo] - if (list.size() == 2) {
[echo] - return list.get(1);
[echo] - }
[echo] - else {
[echo] - return null;
[echo] - }
[echo] - }
[echo] -
[echo] - /**
[echo] * Removes all the fragment collections where groupId = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] @@ -2358,54 +2025,6 @@ public class FragmentCollectionPersistenceImpl
[echo] return count.intValue();
[echo] }
[echo]
[echo] - /**
[echo] - * Returns the number of fragment collections that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @return the number of matching fragment collections that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public int filterCountByGroupId(long groupId) {
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return countByGroupId(groupId);
[echo] - }
[echo] -
[echo] - StringBundler query = new StringBundler(2);
[echo] -
[echo] - query.append(_FILTER_SQL_COUNT_FRAGMENTCOLLECTION_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentCollection.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - q.addScalar(
[echo] - COUNT_COLUMN_NAME, com.liferay.portal.kernel.dao.orm.Type.LONG);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - Long count = (Long)q.uniqueResult();
[echo] -
[echo] - return count.intValue();
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] private static final String _FINDER_COLUMN_GROUPID_GROUPID_2 =
[echo] "fragmentCollection.groupId = ?";
[echo]
[echo] @@ -2862,466 +2481,141 @@ public class FragmentCollectionPersistenceImpl
[echo] throw processException(e);
[echo] }
[echo] finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - return list;
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the first fragment collection in the ordered set where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment collection
[echo] - * @throws NoSuchCollectionException if a matching fragment collection could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentCollection findByG_LikeN_First(
[echo] - long groupId, String name,
[echo] - OrderByComparator<FragmentCollection> orderByComparator)
[echo] - throws NoSuchCollectionException {
[echo] -
[echo] - FragmentCollection fragmentCollection = fetchByG_LikeN_First(
[echo] - groupId, name, orderByComparator);
[echo] -
[echo] - if (fragmentCollection != null) {
[echo] - return fragmentCollection;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(6);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", nameLIKE");
[echo] - msg.append(name);
[echo] -
[echo] - msg.append("}");
[echo] -
[echo] - throw new NoSuchCollectionException(msg.toString());
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the first fragment collection in the ordered set where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment collection, or <code>null</code> if a matching fragment collection could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentCollection fetchByG_LikeN_First(
[echo] - long groupId, String name,
[echo] - OrderByComparator<FragmentCollection> orderByComparator) {
[echo] -
[echo] - List<FragmentCollection> list = findByG_LikeN(
[echo] - groupId, name, 0, 1, orderByComparator);
[echo] -
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] -
[echo] - return null;
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the last fragment collection in the ordered set where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment collection
[echo] - * @throws NoSuchCollectionException if a matching fragment collection could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentCollection findByG_LikeN_Last(
[echo] - long groupId, String name,
[echo] - OrderByComparator<FragmentCollection> orderByComparator)
[echo] - throws NoSuchCollectionException {
[echo] -
[echo] - FragmentCollection fragmentCollection = fetchByG_LikeN_Last(
[echo] - groupId, name, orderByComparator);
[echo] -
[echo] - if (fragmentCollection != null) {
[echo] - return fragmentCollection;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(6);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", nameLIKE");
[echo] - msg.append(name);
[echo] -
[echo] - msg.append("}");
[echo] -
[echo] - throw new NoSuchCollectionException(msg.toString());
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the last fragment collection in the ordered set where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment collection, or <code>null</code> if a matching fragment collection could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentCollection fetchByG_LikeN_Last(
[echo] - long groupId, String name,
[echo] - OrderByComparator<FragmentCollection> orderByComparator) {
[echo] -
[echo] - int count = countByG_LikeN(groupId, name);
[echo] -
[echo] - if (count == 0) {
[echo] - return null;
[echo] - }
[echo] -
[echo] - List<FragmentCollection> list = findByG_LikeN(
[echo] - groupId, name, count - 1, count, orderByComparator);
[echo] -
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] -
[echo] - return null;
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment collections before and after the current fragment collection in the ordered set where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param fragmentCollectionId the primary key of the current fragment collection
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment collection
[echo] - * @throws NoSuchCollectionException if a fragment collection with the primary key could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentCollection[] findByG_LikeN_PrevAndNext(
[echo] - long fragmentCollectionId, long groupId, String name,
[echo] - OrderByComparator<FragmentCollection> orderByComparator)
[echo] - throws NoSuchCollectionException {
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] -
[echo] - FragmentCollection fragmentCollection = findByPrimaryKey(
[echo] - fragmentCollectionId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - FragmentCollection[] array = new FragmentCollectionImpl[3];
[echo] -
[echo] - array[0] = getByG_LikeN_PrevAndNext(
[echo] - session, fragmentCollection, groupId, name, orderByComparator,
[echo] - true);
[echo] -
[echo] - array[1] = fragmentCollection;
[echo] -
[echo] - array[2] = getByG_LikeN_PrevAndNext(
[echo] - session, fragmentCollection, groupId, name, orderByComparator,
[echo] - false);
[echo] -
[echo] - return array;
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - protected FragmentCollection getByG_LikeN_PrevAndNext(
[echo] - Session session, FragmentCollection fragmentCollection, long groupId,
[echo] - String name, OrderByComparator<FragmentCollection> orderByComparator,
[echo] - boolean previous) {
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 5 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] - (orderByComparator.getOrderByFields().length * 3));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(4);
[echo] - }
[echo] -
[echo] - query.append(_SQL_SELECT_FRAGMENTCOLLECTION_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_LIKEN_GROUPID_2);
[echo] -
[echo] - boolean bindName = false;
[echo] -
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_LIKEN_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_LIKEN_NAME_2);
[echo] - }
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - String[] orderByConditionFields =
[echo] - orderByComparator.getOrderByConditionFields();
[echo] -
[echo] - if (orderByConditionFields.length > 0) {
[echo] - query.append(WHERE_AND);
[echo] - }
[echo] -
[echo] - for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] - query.append(orderByConditionFields[i]);
[echo] -
[echo] - if ((i + 1) < orderByConditionFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN);
[echo] - }
[echo] - }
[echo] - }
[echo] -
[echo] - query.append(ORDER_BY_CLAUSE);
[echo] -
[echo] - String[] orderByFields = orderByComparator.getOrderByFields();
[echo] -
[echo] - for (int i = 0; i < orderByFields.length; i++) {
[echo] - query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] - query.append(orderByFields[i]);
[echo] -
[echo] - if ((i + 1) < orderByFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC);
[echo] - }
[echo] - }
[echo] - }
[echo] - }
[echo] - else {
[echo] - query.append(FragmentCollectionModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] -
[echo] - String sql = query.toString();
[echo] -
[echo] - Query q = session.createQuery(sql);
[echo] -
[echo] - q.setFirstResult(0);
[echo] - q.setMaxResults(2);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - for (Object orderByConditionValue :
[echo] - orderByComparator.getOrderByConditionValues(
[echo] - fragmentCollection)) {
[echo] -
[echo] - qPos.add(orderByConditionValue);
[echo] + closeSession(session);
[echo] }
[echo] }
[echo]
[echo] - List<FragmentCollection> list = q.list();
[echo] -
[echo] - if (list.size() == 2) {
[echo] - return list.get(1);
[echo] - }
[echo] - else {
[echo] - return null;
[echo] - }
[echo] + return list;
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment collections that the user has permission to view where groupId = &#63; and name LIKE &#63;.
[echo] + * Returns the first fragment collection in the ordered set where groupId = &#63; and name LIKE &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param name the name
[echo] - * @return the matching fragment collections that the user has permission to view
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment collection
[echo] + * @throws NoSuchCollectionException if a matching fragment collection could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentCollection> filterFindByG_LikeN(
[echo] - long groupId, String name) {
[echo] + public FragmentCollection findByG_LikeN_First(
[echo] + long groupId, String name,
[echo] + OrderByComparator<FragmentCollection> orderByComparator)
[echo] + throws NoSuchCollectionException {
[echo]
[echo] - return filterFindByG_LikeN(
[echo] - groupId, name, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
[echo] + FragmentCollection fragmentCollection = fetchByG_LikeN_First(
[echo] + groupId, name, orderByComparator);
[echo] +
[echo] + if (fragmentCollection != null) {
[echo] + return fragmentCollection;
[echo] + }
[echo] +
[echo] + StringBundler msg = new StringBundler(6);
[echo] +
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] +
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo] +
[echo] + msg.append(", nameLIKE");
[echo] + msg.append(name);
[echo] +
[echo] + msg.append("}");
[echo] +
[echo] + throw new NoSuchCollectionException(msg.toString());
[echo] }
[echo]
[echo] /**
[echo] - * Returns a range of all the fragment collections that the user has permission to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentCollectionModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] + * Returns the first fragment collection in the ordered set where groupId = &#63; and name LIKE &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param name the name
[echo] - * @param start the lower bound of the range of fragment collections
[echo] - * @param end the upper bound of the range of fragment collections (not inclusive)
[echo] - * @return the range of matching fragment collections that the user has permission to view
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment collection, or <code>null</code> if a matching fragment collection could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentCollection> filterFindByG_LikeN(
[echo] - long groupId, String name, int start, int end) {
[echo] + public FragmentCollection fetchByG_LikeN_First(
[echo] + long groupId, String name,
[echo] + OrderByComparator<FragmentCollection> orderByComparator) {
[echo] +
[echo] + List<FragmentCollection> list = findByG_LikeN(
[echo] + groupId, name, 0, 1, orderByComparator);
[echo] +
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] + }
[echo]
[echo] - return filterFindByG_LikeN(groupId, name, start, end, null);
[echo] + return null;
[echo] }
[echo]
[echo] /**
[echo] - * Returns an ordered range of all the fragment collections that the user has permissions to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentCollectionModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] + * Returns the last fragment collection in the ordered set where groupId = &#63; and name LIKE &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param name the name
[echo] - * @param start the lower bound of the range of fragment collections
[echo] - * @param end the upper bound of the range of fragment collections (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment collections that the user has permission to view
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment collection
[echo] + * @throws NoSuchCollectionException if a matching fragment collection could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentCollection> filterFindByG_LikeN(
[echo] - long groupId, String name, int start, int end,
[echo] - OrderByComparator<FragmentCollection> orderByComparator) {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_LikeN(groupId, name, start, end, orderByComparator);
[echo] - }
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 4 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(5);
[echo] - }
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTCOLLECTION_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTCOLLECTION_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_LIKEN_GROUPID_2);
[echo] -
[echo] - boolean bindName = false;
[echo] + public FragmentCollection findByG_LikeN_Last(
[echo] + long groupId, String name,
[echo] + OrderByComparator<FragmentCollection> orderByComparator)
[echo] + throws NoSuchCollectionException {
[echo]
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_LIKEN_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] + FragmentCollection fragmentCollection = fetchByG_LikeN_Last(
[echo] + groupId, name, orderByComparator);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_LIKEN_NAME_2);
[echo] + if (fragmentCollection != null) {
[echo] + return fragmentCollection;
[echo] }
[echo]
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTCOLLECTION_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] + StringBundler msg = new StringBundler(6);
[echo]
[echo] - if (orderByComparator != null) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true);
[echo] - }
[echo] - else {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_TABLE, orderByComparator, true);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentCollectionModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentCollectionModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] - }
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo]
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentCollection.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo]
[echo] - Session session = null;
[echo] + msg.append(", nameLIKE");
[echo] + msg.append(name);
[echo]
[echo] - try {
[echo] - session = openSession();
[echo] + msg.append("}");
[echo]
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] + throw new NoSuchCollectionException(msg.toString());
[echo] + }
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentCollectionImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentCollectionImpl.class);
[echo] - }
[echo] + /**
[echo] + * Returns the last fragment collection in the ordered set where groupId = &#63; and name LIKE &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param name the name
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment collection, or <code>null</code> if a matching fragment collection could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentCollection fetchByG_LikeN_Last(
[echo] + long groupId, String name,
[echo] + OrderByComparator<FragmentCollection> orderByComparator) {
[echo]
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] + int count = countByG_LikeN(groupId, name);
[echo]
[echo] - qPos.add(groupId);
[echo] + if (count == 0) {
[echo] + return null;
[echo] + }
[echo]
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] + List<FragmentCollection> list = findByG_LikeN(
[echo] + groupId, name, count - 1, count, orderByComparator);
[echo]
[echo] - return (List<FragmentCollection>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] }
[echo] +
[echo] + return null;
[echo] }
[echo]
[echo] /**
[echo] - * Returns the fragment collections before and after the current fragment collection in the ordered set of fragment collections that the user has permission to view where groupId = &#63; and name LIKE &#63;.
[echo] + * Returns the fragment collections before and after the current fragment collection in the ordered set where groupId = &#63; and name LIKE &#63;.
[echo] *
[echo] * @param fragmentCollectionId the primary key of the current fragment collection
[echo] * @param groupId the group ID
[echo] @@ -3331,16 +2625,11 @@ public class FragmentCollectionPersistenceImpl
[echo] * @throws NoSuchCollectionException if a fragment collection with the primary key could not be found
[echo] */
[echo] @Override
[echo] - public FragmentCollection[] filterFindByG_LikeN_PrevAndNext(
[echo] + public FragmentCollection[] findByG_LikeN_PrevAndNext(
[echo] long fragmentCollectionId, long groupId, String name,
[echo] OrderByComparator<FragmentCollection> orderByComparator)
[echo] throws NoSuchCollectionException {
[echo]
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_LikeN_PrevAndNext(
[echo] - fragmentCollectionId, groupId, name, orderByComparator);
[echo] - }
[echo] -
[echo] name = Objects.toString(name, "");
[echo]
[echo] FragmentCollection fragmentCollection = findByPrimaryKey(
[echo] @@ -3353,13 +2642,13 @@ public class FragmentCollectionPersistenceImpl
[echo]
[echo] FragmentCollection[] array = new FragmentCollectionImpl[3];
[echo]
[echo] - array[0] = filterGetByG_LikeN_PrevAndNext(
[echo] + array[0] = getByG_LikeN_PrevAndNext(
[echo] session, fragmentCollection, groupId, name, orderByComparator,
[echo] true);
[echo]
[echo] array[1] = fragmentCollection;
[echo]
[echo] - array[2] = filterGetByG_LikeN_PrevAndNext(
[echo] + array[2] = getByG_LikeN_PrevAndNext(
[echo] session, fragmentCollection, groupId, name, orderByComparator,
[echo] false);
[echo]
[echo] @@ -3373,7 +2662,7 @@ public class FragmentCollectionPersistenceImpl
[echo] }
[echo] }
[echo]
[echo] - protected FragmentCollection filterGetByG_LikeN_PrevAndNext(
[echo] + protected FragmentCollection getByG_LikeN_PrevAndNext(
[echo] Session session, FragmentCollection fragmentCollection, long groupId,
[echo] String name, OrderByComparator<FragmentCollection> orderByComparator,
[echo] boolean previous) {
[echo] @@ -3382,20 +2671,14 @@ public class FragmentCollectionPersistenceImpl
[echo]
[echo] if (orderByComparator != null) {
[echo] query = new StringBundler(
[echo] - 6 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] + 5 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] (orderByComparator.getOrderByFields().length * 3));
[echo] }
[echo] else {
[echo] - query = new StringBundler(5);
[echo] + query = new StringBundler(4);
[echo] }
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTCOLLECTION_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTCOLLECTION_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] + query.append(_SQL_SELECT_FRAGMENTCOLLECTION_WHERE);
[echo]
[echo] query.append(_FINDER_COLUMN_G_LIKEN_GROUPID_2);
[echo]
[echo] @@ -3410,11 +2693,6 @@ public class FragmentCollectionPersistenceImpl
[echo] query.append(_FINDER_COLUMN_G_LIKEN_NAME_2);
[echo] }
[echo]
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTCOLLECTION_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] -
[echo] if (orderByComparator != null) {
[echo] String[] orderByConditionFields =
[echo] orderByComparator.getOrderByConditionFields();
[echo] @@ -3424,18 +2702,8 @@ public class FragmentCollectionPersistenceImpl
[echo] }
[echo]
[echo] for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] + query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] + query.append(orderByConditionFields[i]);
[echo]
[echo] if ((i + 1) < orderByConditionFields.length) {
[echo] if (orderByComparator.isAscending() ^ previous) {
[echo] @@ -3460,16 +2728,8 @@ public class FragmentCollectionPersistenceImpl
[echo] String[] orderByFields = orderByComparator.getOrderByFields();
[echo]
[echo] for (int i = 0; i < orderByFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByFields[i], true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByFields[i], true));
[echo] - }
[echo] + query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] + query.append(orderByFields[i]);
[echo]
[echo] if ((i + 1) < orderByFields.length) {
[echo] if (orderByComparator.isAscending() ^ previous) {
[echo] @@ -3490,30 +2750,16 @@ public class FragmentCollectionPersistenceImpl
[echo] }
[echo] }
[echo] else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentCollectionModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentCollectionModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] + query.append(FragmentCollectionModelImpl.ORDER_BY_JPQL);
[echo] }
[echo]
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentCollection.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] + String sql = query.toString();
[echo]
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] + Query q = session.createQuery(sql);
[echo]
[echo] q.setFirstResult(0);
[echo] q.setMaxResults(2);
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentCollectionImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentCollectionImpl.class);
[echo] - }
[echo] -
[echo] QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] qPos.add(groupId);
[echo] @@ -3627,72 +2873,6 @@ public class FragmentCollectionPersistenceImpl
[echo] return count.intValue();
[echo] }
[echo]
[echo] - /**
[echo] - * Returns the number of fragment collections that the user has permission to view where groupId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param name the name
[echo] - * @return the number of matching fragment collections that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public int filterCountByG_LikeN(long groupId, String name) {
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return countByG_LikeN(groupId, name);
[echo] - }
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] -
[echo] - StringBundler query = new StringBundler(3);
[echo] -
[echo] - query.append(_FILTER_SQL_COUNT_FRAGMENTCOLLECTION_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_LIKEN_GROUPID_2);
[echo] -
[echo] - boolean bindName = false;
[echo] -
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_LIKEN_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_LIKEN_NAME_2);
[echo] - }
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentCollection.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - q.addScalar(
[echo] - COUNT_COLUMN_NAME, com.liferay.portal.kernel.dao.orm.Type.LONG);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] -
[echo] - Long count = (Long)q.uniqueResult();
[echo] -
[echo] - return count.intValue();
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] private static final String _FINDER_COLUMN_G_LIKEN_GROUPID_2 =
[echo] "fragmentCollection.groupId = ? AND ";
[echo]
[echo] @@ -4658,31 +3838,8 @@ public class FragmentCollectionPersistenceImpl
[echo] private static final String _SQL_COUNT_FRAGMENTCOLLECTION_WHERE =
[echo] "SELECT COUNT(fragmentCollection) FROM FragmentCollection fragmentCollection WHERE ";
[echo]
[echo] - private static final String _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN =
[echo] - "fragmentCollection.fragmentCollectionId";
[echo] -
[echo] - private static final String _FILTER_SQL_SELECT_FRAGMENTCOLLECTION_WHERE =
[echo] - "SELECT DISTINCT {fragmentCollection.*} FROM FragmentCollection fragmentCollection WHERE ";
[echo] -
[echo] - private static final String
[echo] - _FILTER_SQL_SELECT_FRAGMENTCOLLECTION_NO_INLINE_DISTINCT_WHERE_1 =
[echo] - "SELECT {FragmentCollection.*} FROM (SELECT DISTINCT fragmentCollection.fragmentCollectionId FROM FragmentCollection fragmentCollection WHERE ";
[echo] -
[echo] - private static final String
[echo] - _FILTER_SQL_SELECT_FRAGMENTCOLLECTION_NO_INLINE_DISTINCT_WHERE_2 =
[echo] - ") TEMP_TABLE INNER JOIN FragmentCollection ON TEMP_TABLE.fragmentCollectionId = FragmentCollection.fragmentCollectionId";
[echo] -
[echo] - private static final String _FILTER_SQL_COUNT_FRAGMENTCOLLECTION_WHERE =
[echo] - "SELECT COUNT(DISTINCT fragmentCollection.fragmentCollectionId) AS COUNT_VALUE FROM FragmentCollection fragmentCollection WHERE ";
[echo] -
[echo] - private static final String _FILTER_ENTITY_ALIAS = "fragmentCollection";
[echo] -
[echo] - private static final String _FILTER_ENTITY_TABLE = "FragmentCollection";
[echo] -
[echo] private static final String _ORDER_BY_ENTITY_ALIAS = "fragmentCollection.";
[echo]
[echo] - private static final String _ORDER_BY_ENTITY_TABLE = "FragmentCollection.";
[echo] -
[echo] private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY =
[echo] "No FragmentCollection exists with the primary key ";
[echo]
[echo] diff --git a/modules/apps/fragment/fragment-service/src/main/java/com/liferay/fragment/service/persistence/impl/FragmentEntryPersistenceImpl.java b/modules/apps/fragment/fragment-service/src/main/java/com/liferay/fragment/service/persistence/impl/FragmentEntryPersistenceImpl.java
[echo] index 7c19a0a..73e0a39 100644
[echo] --- a/modules/apps/fragment/fragment-service/src/main/java/com/liferay/fragment/service/persistence/impl/FragmentEntryPersistenceImpl.java
[echo] +++ b/modules/apps/fragment/fragment-service/src/main/java/com/liferay/fragment/service/persistence/impl/FragmentEntryPersistenceImpl.java
[echo] @@ -28,13 +28,11 @@ import com.liferay.portal.kernel.dao.orm.FinderPath;
[echo] import com.liferay.portal.kernel.dao.orm.Query;
[echo] import com.liferay.portal.kernel.dao.orm.QueryPos;
[echo] import com.liferay.portal.kernel.dao.orm.QueryUtil;
[echo] -import com.liferay.portal.kernel.dao.orm.SQLQuery;
[echo] import com.liferay.portal.kernel.dao.orm.Session;
[echo] import com.liferay.portal.kernel.dao.orm.SessionFactory;
[echo] import com.liferay.portal.kernel.log.Log;
[echo] import com.liferay.portal.kernel.log.LogFactoryUtil;
[echo] import com.liferay.portal.kernel.security.auth.CompanyThreadLocal;
[echo] -import com.liferay.portal.kernel.security.permission.InlineSQLHelperUtil;
[echo] import com.liferay.portal.kernel.service.ServiceContext;
[echo] import com.liferay.portal.kernel.service.ServiceContextThreadLocal;
[echo] import com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl;
[echo] @@ -1947,171 +1945,415 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63;.
[echo] + * Removes all the fragment entries where groupId = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByGroupId(long groupId) {
[echo] - return filterFindByGroupId(
[echo] - groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
[echo] + public void removeByGroupId(long groupId) {
[echo] + for (FragmentEntry fragmentEntry :
[echo] + findByGroupId(
[echo] + groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
[echo] +
[echo] + remove(fragmentEntry);
[echo] + }
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the number of fragment entries where groupId = &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @return the number of matching fragment entries
[echo] + */
[echo] + @Override
[echo] + public int countByGroupId(long groupId) {
[echo] + FinderPath finderPath = _finderPathCountByGroupId;
[echo] +
[echo] + Object[] finderArgs = new Object[] {groupId};
[echo] +
[echo] + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo] +
[echo] + if (count == null) {
[echo] + StringBundler query = new StringBundler(2);
[echo] +
[echo] + query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] +
[echo] + query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
[echo] +
[echo] + String sql = query.toString();
[echo] +
[echo] + Session session = null;
[echo] +
[echo] + try {
[echo] + session = openSession();
[echo] +
[echo] + Query q = session.createQuery(sql);
[echo] +
[echo] + QueryPos qPos = QueryPos.getInstance(q);
[echo] +
[echo] + qPos.add(groupId);
[echo] +
[echo] + count = (Long)q.uniqueResult();
[echo] +
[echo] + finderCache.putResult(finderPath, finderArgs, count);
[echo] + }
[echo] + catch (Exception e) {
[echo] + finderCache.removeResult(finderPath, finderArgs);
[echo] +
[echo] + throw processException(e);
[echo] + }
[echo] + finally {
[echo] + closeSession(session);
[echo] + }
[echo] + }
[echo] +
[echo] + return count.intValue();
[echo] + }
[echo] +
[echo] + private static final String _FINDER_COLUMN_GROUPID_GROUPID_2 =
[echo] + "fragmentEntry.groupId = ?";
[echo] +
[echo] + private FinderPath _finderPathWithPaginationFindByFragmentCollectionId;
[echo] + private FinderPath _finderPathWithoutPaginationFindByFragmentCollectionId;
[echo] + private FinderPath _finderPathCountByFragmentCollectionId;
[echo] +
[echo] + /**
[echo] + * Returns all the fragment entries where fragmentCollectionId = &#63;.
[echo] + *
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @return the matching fragment entries
[echo] + */
[echo] + @Override
[echo] + public List<FragmentEntry> findByFragmentCollectionId(
[echo] + long fragmentCollectionId) {
[echo] +
[echo] + return findByFragmentCollectionId(
[echo] + fragmentCollectionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63;.
[echo] + * Returns a range of all the fragment entries where fragmentCollectionId = &#63;.
[echo] *
[echo] * <p>
[echo] * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] * </p>
[echo] *
[echo] - * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] * @param start the lower bound of the range of fragment entries
[echo] * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] + * @return the range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByGroupId(
[echo] - long groupId, int start, int end) {
[echo] + public List<FragmentEntry> findByFragmentCollectionId(
[echo] + long fragmentCollectionId, int start, int end) {
[echo]
[echo] - return filterFindByGroupId(groupId, start, end, null);
[echo] + return findByFragmentCollectionId(
[echo] + fragmentCollectionId, start, end, null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63;.
[echo] + * Returns an ordered range of all the fragment entries where fragmentCollectionId = &#63;.
[echo] *
[echo] * <p>
[echo] * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] * </p>
[echo] *
[echo] - * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] * @param start the lower bound of the range of fragment entries
[echo] * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] + * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByGroupId(
[echo] - long groupId, int start, int end,
[echo] + public List<FragmentEntry> findByFragmentCollectionId(
[echo] + long fragmentCollectionId, int start, int end,
[echo] OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByGroupId(groupId, start, end, orderByComparator);
[echo] - }
[echo] + return findByFragmentCollectionId(
[echo] + fragmentCollectionId, start, end, orderByComparator, true);
[echo] + }
[echo]
[echo] - StringBundler query = null;
[echo] + /**
[echo] + * Returns an ordered range of all the fragment entries where fragmentCollectionId = &#63;.
[echo] + *
[echo] + * <p>
[echo] + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] + * </p>
[echo] + *
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param start the lower bound of the range of fragment entries
[echo] + * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] + * @param useFinderCache whether to use the finder cache
[echo] + * @return the ordered range of matching fragment entries
[echo] + */
[echo] + @Override
[echo] + public List<FragmentEntry> findByFragmentCollectionId(
[echo] + long fragmentCollectionId, int start, int end,
[echo] + OrderByComparator<FragmentEntry> orderByComparator,
[echo] + boolean useFinderCache) {
[echo]
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 3 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(4);
[echo] - }
[echo] + boolean pagination = true;
[echo] + FinderPath finderPath = null;
[echo] + Object[] finderArgs = null;
[echo] +
[echo] + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
[echo] + (orderByComparator == null)) {
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] + pagination = false;
[echo] +
[echo] + if (useFinderCache) {
[echo] + finderPath =
[echo] + _finderPathWithoutPaginationFindByFragmentCollectionId;
[echo] + finderArgs = new Object[] {fragmentCollectionId};
[echo] + }
[echo] }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] + else if (useFinderCache) {
[echo] + finderPath = _finderPathWithPaginationFindByFragmentCollectionId;
[echo] + finderArgs = new Object[] {
[echo] + fragmentCollectionId, start, end, orderByComparator
[echo] + };
[echo] }
[echo]
[echo] - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
[echo] + List<FragmentEntry> list = null;
[echo]
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] + if (useFinderCache) {
[echo] + list = (List<FragmentEntry>)finderCache.getResult(
[echo] + finderPath, finderArgs, this);
[echo] +
[echo] + if ((list != null) && !list.isEmpty()) {
[echo] + for (FragmentEntry fragmentEntry : list) {
[echo] + if ((fragmentCollectionId !=
[echo] + fragmentEntry.getFragmentCollectionId())) {
[echo] +
[echo] + list = null;
[echo] +
[echo] + break;
[echo] + }
[echo] + }
[echo] + }
[echo] }
[echo]
[echo] - if (orderByComparator != null) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true);
[echo] + if (list == null) {
[echo] + StringBundler query = null;
[echo] +
[echo] + if (orderByComparator != null) {
[echo] + query = new StringBundler(
[echo] + 3 + (orderByComparator.getOrderByFields().length * 2));
[echo] }
[echo] else {
[echo] + query = new StringBundler(3);
[echo] + }
[echo] +
[echo] + query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] +
[echo] + query.append(
[echo] + _FINDER_COLUMN_FRAGMENTCOLLECTIONID_FRAGMENTCOLLECTIONID_2);
[echo] +
[echo] + if (orderByComparator != null) {
[echo] appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_TABLE, orderByComparator, true);
[echo] + query, _ORDER_BY_ENTITY_ALIAS, orderByComparator);
[echo] }
[echo] - }
[echo] - else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] + else if (pagination) {
[echo] query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] - }
[echo]
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] + String sql = query.toString();
[echo]
[echo] - Session session = null;
[echo] + Session session = null;
[echo]
[echo] - try {
[echo] - session = openSession();
[echo] + try {
[echo] + session = openSession();
[echo]
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] + Query q = session.createQuery(sql);
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] + QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] + qPos.add(fragmentCollectionId);
[echo]
[echo] - qPos.add(groupId);
[echo] + if (!pagination) {
[echo] + list = (List<FragmentEntry>)QueryUtil.list(
[echo] + q, getDialect(), start, end, false);
[echo]
[echo] - return (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] + Collections.sort(list);
[echo] +
[echo] + list = Collections.unmodifiableList(list);
[echo] + }
[echo] + else {
[echo] + list = (List<FragmentEntry>)QueryUtil.list(
[echo] + q, getDialect(), start, end);
[echo] + }
[echo] +
[echo] + cacheResult(list);
[echo] +
[echo] + if (useFinderCache) {
[echo] + finderCache.putResult(finderPath, finderArgs, list);
[echo] + }
[echo] + }
[echo] + catch (Exception e) {
[echo] + if (useFinderCache) {
[echo] + finderCache.removeResult(finderPath, finderArgs);
[echo] + }
[echo] +
[echo] + throw processException(e);
[echo] + }
[echo] + finally {
[echo] + closeSession(session);
[echo] + }
[echo] }
[echo] +
[echo] + return list;
[echo] }
[echo]
[echo] /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63;.
[echo] + * Returns the first fragment entry in the ordered set where fragmentCollectionId = &#63;.
[echo] *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] + * @return the first matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public FragmentEntry[] filterFindByGroupId_PrevAndNext(
[echo] - long fragmentEntryId, long groupId,
[echo] + public FragmentEntry findByFragmentCollectionId_First(
[echo] + long fragmentCollectionId,
[echo] OrderByComparator<FragmentEntry> orderByComparator)
[echo] throws NoSuchEntryException {
[echo]
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByGroupId_PrevAndNext(
[echo] - fragmentEntryId, groupId, orderByComparator);
[echo] + FragmentEntry fragmentEntry = fetchByFragmentCollectionId_First(
[echo] + fragmentCollectionId, orderByComparator);
[echo] +
[echo] + if (fragmentEntry != null) {
[echo] + return fragmentEntry;
[echo] }
[echo]
[echo] - FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo] + StringBundler msg = new StringBundler(4);
[echo]
[echo] - Session session = null;
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] +
[echo] + msg.append("fragmentCollectionId=");
[echo] + msg.append(fragmentCollectionId);
[echo] +
[echo] + msg.append("}");
[echo] +
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the first fragment entry in the ordered set where fragmentCollectionId = &#63;.
[echo] + *
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry fetchByFragmentCollectionId_First(
[echo] + long fragmentCollectionId,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo] +
[echo] + List<FragmentEntry> list = findByFragmentCollectionId(
[echo] + fragmentCollectionId, 0, 1, orderByComparator);
[echo] +
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] + }
[echo] +
[echo] + return null;
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the last fragment entry in the ordered set where fragmentCollectionId = &#63;.
[echo] + *
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry findByFragmentCollectionId_Last(
[echo] + long fragmentCollectionId,
[echo] + OrderByComparator<FragmentEntry> orderByComparator)
[echo] + throws NoSuchEntryException {
[echo] +
[echo] + FragmentEntry fragmentEntry = fetchByFragmentCollectionId_Last(
[echo] + fragmentCollectionId, orderByComparator);
[echo] +
[echo] + if (fragmentEntry != null) {
[echo] + return fragmentEntry;
[echo] + }
[echo] +
[echo] + StringBundler msg = new StringBundler(4);
[echo] +
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] +
[echo] + msg.append("fragmentCollectionId=");
[echo] + msg.append(fragmentCollectionId);
[echo] +
[echo] + msg.append("}");
[echo] +
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the last fragment entry in the ordered set where fragmentCollectionId = &#63;.
[echo] + *
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry fetchByFragmentCollectionId_Last(
[echo] + long fragmentCollectionId,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo] +
[echo] + int count = countByFragmentCollectionId(fragmentCollectionId);
[echo] +
[echo] + if (count == 0) {
[echo] + return null;
[echo] + }
[echo] +
[echo] + List<FragmentEntry> list = findByFragmentCollectionId(
[echo] + fragmentCollectionId, count - 1, count, orderByComparator);
[echo] +
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] + }
[echo] +
[echo] + return null;
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the fragment entries before and after the current fragment entry in the ordered set where fragmentCollectionId = &#63;.
[echo] + *
[echo] + * @param fragmentEntryId the primary key of the current fragment entry
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the previous, current, and next fragment entry
[echo] + * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry[] findByFragmentCollectionId_PrevAndNext(
[echo] + long fragmentEntryId, long fragmentCollectionId,
[echo] + OrderByComparator<FragmentEntry> orderByComparator)
[echo] + throws NoSuchEntryException {
[echo] +
[echo] + FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo] +
[echo] + Session session = null;
[echo]
[echo] try {
[echo] session = openSession();
[echo]
[echo] FragmentEntry[] array = new FragmentEntryImpl[3];
[echo]
[echo] - array[0] = filterGetByGroupId_PrevAndNext(
[echo] - session, fragmentEntry, groupId, orderByComparator, true);
[echo] + array[0] = getByFragmentCollectionId_PrevAndNext(
[echo] + session, fragmentEntry, fragmentCollectionId, orderByComparator,
[echo] + true);
[echo]
[echo] array[1] = fragmentEntry;
[echo]
[echo] - array[2] = filterGetByGroupId_PrevAndNext(
[echo] - session, fragmentEntry, groupId, orderByComparator, false);
[echo] + array[2] = getByFragmentCollectionId_PrevAndNext(
[echo] + session, fragmentEntry, fragmentCollectionId, orderByComparator,
[echo] + false);
[echo]
[echo] return array;
[echo] }
[echo] @@ -2123,35 +2365,25 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo]
[echo] - protected FragmentEntry filterGetByGroupId_PrevAndNext(
[echo] - Session session, FragmentEntry fragmentEntry, long groupId,
[echo] + protected FragmentEntry getByFragmentCollectionId_PrevAndNext(
[echo] + Session session, FragmentEntry fragmentEntry, long fragmentCollectionId,
[echo] OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo]
[echo] StringBundler query = null;
[echo]
[echo] if (orderByComparator != null) {
[echo] query = new StringBundler(
[echo] - 5 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] + 4 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] (orderByComparator.getOrderByFields().length * 3));
[echo] }
[echo] else {
[echo] - query = new StringBundler(4);
[echo] - }
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] + query = new StringBundler(3);
[echo] }
[echo]
[echo] - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
[echo] + query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] + query.append(
[echo] + _FINDER_COLUMN_FRAGMENTCOLLECTIONID_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] if (orderByComparator != null) {
[echo] String[] orderByConditionFields =
[echo] @@ -2162,18 +2394,8 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] + query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] + query.append(orderByConditionFields[i]);
[echo]
[echo] if ((i + 1) < orderByConditionFields.length) {
[echo] if (orderByComparator.isAscending() ^ previous) {
[echo] @@ -2198,16 +2420,8 @@ public class FragmentEntryPersistenceImpl
[echo] String[] orderByFields = orderByComparator.getOrderByFields();
[echo]
[echo] for (int i = 0; i < orderByFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByFields[i], true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByFields[i], true));
[echo] - }
[echo] + query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] + query.append(orderByFields[i]);
[echo]
[echo] if ((i + 1) < orderByFields.length) {
[echo] if (orderByComparator.isAscending() ^ previous) {
[echo] @@ -2228,33 +2442,19 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo] else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] + query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] }
[echo]
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] + String sql = query.toString();
[echo]
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] + Query q = session.createQuery(sql);
[echo]
[echo] q.setFirstResult(0);
[echo] q.setMaxResults(2);
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] -
[echo] QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] - qPos.add(groupId);
[echo] + qPos.add(fragmentCollectionId);
[echo]
[echo] if (orderByComparator != null) {
[echo] for (Object orderByConditionValue :
[echo] @@ -2276,31 +2476,32 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] /**
[echo] - * Removes all the fragment entries where groupId = &#63; from the database.
[echo] + * Removes all the fragment entries where fragmentCollectionId = &#63; from the database.
[echo] *
[echo] - * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] */
[echo] @Override
[echo] - public void removeByGroupId(long groupId) {
[echo] + public void removeByFragmentCollectionId(long fragmentCollectionId) {
[echo] for (FragmentEntry fragmentEntry :
[echo] - findByGroupId(
[echo] - groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
[echo] + findByFragmentCollectionId(
[echo] + fragmentCollectionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
[echo] + null)) {
[echo]
[echo] remove(fragmentEntry);
[echo] }
[echo] }
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries where groupId = &#63;.
[echo] + * Returns the number of fragment entries where fragmentCollectionId = &#63;.
[echo] *
[echo] - * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] * @return the number of matching fragment entries
[echo] */
[echo] @Override
[echo] - public int countByGroupId(long groupId) {
[echo] - FinderPath finderPath = _finderPathCountByGroupId;
[echo] + public int countByFragmentCollectionId(long fragmentCollectionId) {
[echo] + FinderPath finderPath = _finderPathCountByFragmentCollectionId;
[echo]
[echo] - Object[] finderArgs = new Object[] {groupId};
[echo] + Object[] finderArgs = new Object[] {fragmentCollectionId};
[echo]
[echo] Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo]
[echo] @@ -2309,7 +2510,8 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
[echo] + query.append(
[echo] + _FINDER_COLUMN_FRAGMENTCOLLECTIONID_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] String sql = query.toString();
[echo]
[echo] @@ -2322,7 +2524,7 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] - qPos.add(groupId);
[echo] + qPos.add(fragmentCollectionId);
[echo]
[echo] count = (Long)q.uniqueResult();
[echo]
[echo] @@ -2341,102 +2543,58 @@ public class FragmentEntryPersistenceImpl
[echo] return count.intValue();
[echo] }
[echo]
[echo] - /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public int filterCountByGroupId(long groupId) {
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return countByGroupId(groupId);
[echo] - }
[echo] -
[echo] - StringBundler query = new StringBundler(2);
[echo] -
[echo] - query.append(_FILTER_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - q.addScalar(
[echo] - COUNT_COLUMN_NAME, com.liferay.portal.kernel.dao.orm.Type.LONG);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - Long count = (Long)q.uniqueResult();
[echo] -
[echo] - return count.intValue();
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - private static final String _FINDER_COLUMN_GROUPID_GROUPID_2 =
[echo] - "fragmentEntry.groupId = ?";
[echo] + private static final String
[echo] + _FINDER_COLUMN_FRAGMENTCOLLECTIONID_FRAGMENTCOLLECTIONID_2 =
[echo] + "fragmentEntry.fragmentCollectionId = ?";
[echo]
[echo] - private FinderPath _finderPathWithPaginationFindByFragmentCollectionId;
[echo] - private FinderPath _finderPathWithoutPaginationFindByFragmentCollectionId;
[echo] - private FinderPath _finderPathCountByFragmentCollectionId;
[echo] + private FinderPath _finderPathWithPaginationFindByG_FCI;
[echo] + private FinderPath _finderPathWithoutPaginationFindByG_FCI;
[echo] + private FinderPath _finderPathCountByG_FCI;
[echo]
[echo] /**
[echo] - * Returns all the fragment entries where fragmentCollectionId = &#63;.
[echo] + * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] *
[echo] + * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @return the matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> findByFragmentCollectionId(
[echo] - long fragmentCollectionId) {
[echo] + public List<FragmentEntry> findByG_FCI(
[echo] + long groupId, long fragmentCollectionId) {
[echo]
[echo] - return findByFragmentCollectionId(
[echo] - fragmentCollectionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
[echo] + return findByG_FCI(
[echo] + groupId, fragmentCollectionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
[echo] + null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns a range of all the fragment entries where fragmentCollectionId = &#63;.
[echo] + * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] *
[echo] * <p>
[echo] * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] * </p>
[echo] *
[echo] + * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param start the lower bound of the range of fragment entries
[echo] * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] * @return the range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> findByFragmentCollectionId(
[echo] - long fragmentCollectionId, int start, int end) {
[echo] + public List<FragmentEntry> findByG_FCI(
[echo] + long groupId, long fragmentCollectionId, int start, int end) {
[echo]
[echo] - return findByFragmentCollectionId(
[echo] - fragmentCollectionId, start, end, null);
[echo] + return findByG_FCI(groupId, fragmentCollectionId, start, end, null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns an ordered range of all the fragment entries where fragmentCollectionId = &#63;.
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] *
[echo] * <p>
[echo] * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] * </p>
[echo] *
[echo] + * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param start the lower bound of the range of fragment entries
[echo] * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] @@ -2444,21 +2602,22 @@ public class FragmentEntryPersistenceImpl
[echo] * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> findByFragmentCollectionId(
[echo] - long fragmentCollectionId, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] + public List<FragmentEntry> findByG_FCI(
[echo] + long groupId, long fragmentCollectionId, int start, int end,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - return findByFragmentCollectionId(
[echo] - fragmentCollectionId, start, end, orderByComparator, true);
[echo] + return findByG_FCI(
[echo] + groupId, fragmentCollectionId, start, end, orderByComparator, true);
[echo] }
[echo]
[echo] /**
[echo] - * Returns an ordered range of all the fragment entries where fragmentCollectionId = &#63;.
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] *
[echo] * <p>
[echo] * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] * </p>
[echo] *
[echo] + * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param start the lower bound of the range of fragment entries
[echo] * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] @@ -2467,8 +2626,8 @@ public class FragmentEntryPersistenceImpl
[echo] * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> findByFragmentCollectionId(
[echo] - long fragmentCollectionId, int start, int end,
[echo] + public List<FragmentEntry> findByG_FCI(
[echo] + long groupId, long fragmentCollectionId, int start, int end,
[echo] OrderByComparator<FragmentEntry> orderByComparator,
[echo] boolean useFinderCache) {
[echo]
[echo] @@ -2482,15 +2641,14 @@ public class FragmentEntryPersistenceImpl
[echo] pagination = false;
[echo]
[echo] if (useFinderCache) {
[echo] - finderPath =
[echo] - _finderPathWithoutPaginationFindByFragmentCollectionId;
[echo] - finderArgs = new Object[] {fragmentCollectionId};
[echo] + finderPath = _finderPathWithoutPaginationFindByG_FCI;
[echo] + finderArgs = new Object[] {groupId, fragmentCollectionId};
[echo] }
[echo] }
[echo] else if (useFinderCache) {
[echo] - finderPath = _finderPathWithPaginationFindByFragmentCollectionId;
[echo] + finderPath = _finderPathWithPaginationFindByG_FCI;
[echo] finderArgs = new Object[] {
[echo] - fragmentCollectionId, start, end, orderByComparator
[echo] + groupId, fragmentCollectionId, start, end, orderByComparator
[echo] };
[echo] }
[echo]
[echo] @@ -2502,7 +2660,8 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] if ((list != null) && !list.isEmpty()) {
[echo] for (FragmentEntry fragmentEntry : list) {
[echo] - if ((fragmentCollectionId !=
[echo] + if ((groupId != fragmentEntry.getGroupId()) ||
[echo] + (fragmentCollectionId !=
[echo] fragmentEntry.getFragmentCollectionId())) {
[echo]
[echo] list = null;
[echo] @@ -2518,16 +2677,17 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] if (orderByComparator != null) {
[echo] query = new StringBundler(
[echo] - 3 + (orderByComparator.getOrderByFields().length * 2));
[echo] + 4 + (orderByComparator.getOrderByFields().length * 2));
[echo] }
[echo] else {
[echo] - query = new StringBundler(3);
[echo] + query = new StringBundler(4);
[echo] }
[echo]
[echo] query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - query.append(
[echo] - _FINDER_COLUMN_FRAGMENTCOLLECTIONID_FRAGMENTCOLLECTIONID_2);
[echo] + query.append(_FINDER_COLUMN_G_FCI_GROUPID_2);
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] if (orderByComparator != null) {
[echo] appendOrderByComparator(
[echo] @@ -2548,6 +2708,8 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] + qPos.add(groupId);
[echo] +
[echo] qPos.add(fragmentCollectionId);
[echo]
[echo] if (!pagination) {
[echo] @@ -2585,31 +2747,35 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] /**
[echo] - * Returns the first fragment entry in the ordered set where fragmentCollectionId = &#63;.
[echo] + * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] *
[echo] + * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] * @return the first matching fragment entry
[echo] * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public FragmentEntry findByFragmentCollectionId_First(
[echo] - long fragmentCollectionId,
[echo] + public FragmentEntry findByG_FCI_First(
[echo] + long groupId, long fragmentCollectionId,
[echo] OrderByComparator<FragmentEntry> orderByComparator)
[echo] throws NoSuchEntryException {
[echo]
[echo] - FragmentEntry fragmentEntry = fetchByFragmentCollectionId_First(
[echo] - fragmentCollectionId, orderByComparator);
[echo] + FragmentEntry fragmentEntry = fetchByG_FCI_First(
[echo] + groupId, fragmentCollectionId, orderByComparator);
[echo]
[echo] if (fragmentEntry != null) {
[echo] return fragmentEntry;
[echo] }
[echo]
[echo] - StringBundler msg = new StringBundler(4);
[echo] + StringBundler msg = new StringBundler(6);
[echo]
[echo] msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo]
[echo] - msg.append("fragmentCollectionId=");
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo] +
[echo] + msg.append(", fragmentCollectionId=");
[echo] msg.append(fragmentCollectionId);
[echo]
[echo] msg.append("}");
[echo] @@ -2618,19 +2784,20 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] /**
[echo] - * Returns the first fragment entry in the ordered set where fragmentCollectionId = &#63;.
[echo] + * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] *
[echo] + * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public FragmentEntry fetchByFragmentCollectionId_First(
[echo] - long fragmentCollectionId,
[echo] + public FragmentEntry fetchByG_FCI_First(
[echo] + long groupId, long fragmentCollectionId,
[echo] OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - List<FragmentEntry> list = findByFragmentCollectionId(
[echo] - fragmentCollectionId, 0, 1, orderByComparator);
[echo] + List<FragmentEntry> list = findByG_FCI(
[echo] + groupId, fragmentCollectionId, 0, 1, orderByComparator);
[echo]
[echo] if (!list.isEmpty()) {
[echo] return list.get(0);
[echo] @@ -2640,31 +2807,35 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] /**
[echo] - * Returns the last fragment entry in the ordered set where fragmentCollectionId = &#63;.
[echo] + * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] *
[echo] + * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] * @return the last matching fragment entry
[echo] * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public FragmentEntry findByFragmentCollectionId_Last(
[echo] - long fragmentCollectionId,
[echo] + public FragmentEntry findByG_FCI_Last(
[echo] + long groupId, long fragmentCollectionId,
[echo] OrderByComparator<FragmentEntry> orderByComparator)
[echo] throws NoSuchEntryException {
[echo]
[echo] - FragmentEntry fragmentEntry = fetchByFragmentCollectionId_Last(
[echo] - fragmentCollectionId, orderByComparator);
[echo] + FragmentEntry fragmentEntry = fetchByG_FCI_Last(
[echo] + groupId, fragmentCollectionId, orderByComparator);
[echo]
[echo] if (fragmentEntry != null) {
[echo] return fragmentEntry;
[echo] }
[echo]
[echo] - StringBundler msg = new StringBundler(4);
[echo] + StringBundler msg = new StringBundler(6);
[echo]
[echo] msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo]
[echo] - msg.append("fragmentCollectionId=");
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo] +
[echo] + msg.append(", fragmentCollectionId=");
[echo] msg.append(fragmentCollectionId);
[echo]
[echo] msg.append("}");
[echo] @@ -2673,25 +2844,26 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] /**
[echo] - * Returns the last fragment entry in the ordered set where fragmentCollectionId = &#63;.
[echo] + * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] *
[echo] + * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public FragmentEntry fetchByFragmentCollectionId_Last(
[echo] - long fragmentCollectionId,
[echo] + public FragmentEntry fetchByG_FCI_Last(
[echo] + long groupId, long fragmentCollectionId,
[echo] OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - int count = countByFragmentCollectionId(fragmentCollectionId);
[echo] + int count = countByG_FCI(groupId, fragmentCollectionId);
[echo]
[echo] if (count == 0) {
[echo] return null;
[echo] }
[echo]
[echo] - List<FragmentEntry> list = findByFragmentCollectionId(
[echo] - fragmentCollectionId, count - 1, count, orderByComparator);
[echo] + List<FragmentEntry> list = findByG_FCI(
[echo] + groupId, fragmentCollectionId, count - 1, count, orderByComparator);
[echo]
[echo] if (!list.isEmpty()) {
[echo] return list.get(0);
[echo] @@ -2701,17 +2873,18 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set where fragmentCollectionId = &#63;.
[echo] + * Returns the fragment entries before and after the current fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] *
[echo] * @param fragmentEntryId the primary key of the current fragment entry
[echo] + * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] * @return the previous, current, and next fragment entry
[echo] * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] */
[echo] @Override
[echo] - public FragmentEntry[] findByFragmentCollectionId_PrevAndNext(
[echo] - long fragmentEntryId, long fragmentCollectionId,
[echo] + public FragmentEntry[] findByG_FCI_PrevAndNext(
[echo] + long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] OrderByComparator<FragmentEntry> orderByComparator)
[echo] throws NoSuchEntryException {
[echo]
[echo] @@ -2724,15 +2897,15 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] FragmentEntry[] array = new FragmentEntryImpl[3];
[echo]
[echo] - array[0] = getByFragmentCollectionId_PrevAndNext(
[echo] - session, fragmentEntry, fragmentCollectionId, orderByComparator,
[echo] - true);
[echo] + array[0] = getByG_FCI_PrevAndNext(
[echo] + session, fragmentEntry, groupId, fragmentCollectionId,
[echo] + orderByComparator, true);
[echo]
[echo] array[1] = fragmentEntry;
[echo]
[echo] - array[2] = getByFragmentCollectionId_PrevAndNext(
[echo] - session, fragmentEntry, fragmentCollectionId, orderByComparator,
[echo] - false);
[echo] + array[2] = getByG_FCI_PrevAndNext(
[echo] + session, fragmentEntry, groupId, fragmentCollectionId,
[echo] + orderByComparator, false);
[echo]
[echo] return array;
[echo] }
[echo] @@ -2744,25 +2917,27 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo]
[echo] - protected FragmentEntry getByFragmentCollectionId_PrevAndNext(
[echo] - Session session, FragmentEntry fragmentEntry, long fragmentCollectionId,
[echo] + protected FragmentEntry getByG_FCI_PrevAndNext(
[echo] + Session session, FragmentEntry fragmentEntry, long groupId,
[echo] + long fragmentCollectionId,
[echo] OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo]
[echo] StringBundler query = null;
[echo]
[echo] if (orderByComparator != null) {
[echo] query = new StringBundler(
[echo] - 4 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] + 5 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] (orderByComparator.getOrderByFields().length * 3));
[echo] }
[echo] else {
[echo] - query = new StringBundler(3);
[echo] + query = new StringBundler(4);
[echo] }
[echo]
[echo] query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - query.append(
[echo] - _FINDER_COLUMN_FRAGMENTCOLLECTIONID_FRAGMENTCOLLECTIONID_2);
[echo] + query.append(_FINDER_COLUMN_G_FCI_GROUPID_2);
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] if (orderByComparator != null) {
[echo] String[] orderByConditionFields =
[echo] @@ -2833,6 +3008,8 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] + qPos.add(groupId);
[echo] +
[echo] qPos.add(fragmentCollectionId);
[echo]
[echo] if (orderByComparator != null) {
[echo] @@ -2855,42 +3032,45 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] /**
[echo] - * Removes all the fragment entries where fragmentCollectionId = &#63; from the database.
[echo] + * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; from the database.
[echo] *
[echo] + * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] */
[echo] @Override
[echo] - public void removeByFragmentCollectionId(long fragmentCollectionId) {
[echo] + public void removeByG_FCI(long groupId, long fragmentCollectionId) {
[echo] for (FragmentEntry fragmentEntry :
[echo] - findByFragmentCollectionId(
[echo] - fragmentCollectionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
[echo] - null)) {
[echo] + findByG_FCI(
[echo] + groupId, fragmentCollectionId, QueryUtil.ALL_POS,
[echo] + QueryUtil.ALL_POS, null)) {
[echo]
[echo] remove(fragmentEntry);
[echo] }
[echo] }
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries where fragmentCollectionId = &#63;.
[echo] + * Returns the number of fragment entries where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] *
[echo] + * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @return the number of matching fragment entries
[echo] */
[echo] @Override
[echo] - public int countByFragmentCollectionId(long fragmentCollectionId) {
[echo] - FinderPath finderPath = _finderPathCountByFragmentCollectionId;
[echo] + public int countByG_FCI(long groupId, long fragmentCollectionId) {
[echo] + FinderPath finderPath = _finderPathCountByG_FCI;
[echo]
[echo] - Object[] finderArgs = new Object[] {fragmentCollectionId};
[echo] + Object[] finderArgs = new Object[] {groupId, fragmentCollectionId};
[echo]
[echo] Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo]
[echo] if (count == null) {
[echo] - StringBundler query = new StringBundler(2);
[echo] + StringBundler query = new StringBundler(3);
[echo]
[echo] query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - query.append(
[echo] - _FINDER_COLUMN_FRAGMENTCOLLECTIONID_FRAGMENTCOLLECTIONID_2);
[echo] + query.append(_FINDER_COLUMN_G_FCI_GROUPID_2);
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] String sql = query.toString();
[echo]
[echo] @@ -2903,6 +3083,8 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] + qPos.add(groupId);
[echo] +
[echo] qPos.add(fragmentCollectionId);
[echo]
[echo] count = (Long)q.uniqueResult();
[echo] @@ -2922,158 +3104,118 @@ public class FragmentEntryPersistenceImpl
[echo] return count.intValue();
[echo] }
[echo]
[echo] - private static final String
[echo] - _FINDER_COLUMN_FRAGMENTCOLLECTIONID_FRAGMENTCOLLECTIONID_2 =
[echo] - "fragmentEntry.fragmentCollectionId = ?";
[echo] + private static final String _FINDER_COLUMN_G_FCI_GROUPID_2 =
[echo] + "fragmentEntry.groupId = ? AND ";
[echo]
[echo] - private FinderPath _finderPathWithPaginationFindByG_FCI;
[echo] - private FinderPath _finderPathWithoutPaginationFindByG_FCI;
[echo] - private FinderPath _finderPathCountByG_FCI;
[echo] + private static final String _FINDER_COLUMN_G_FCI_FRAGMENTCOLLECTIONID_2 =
[echo] + "fragmentEntry.fragmentCollectionId = ?";
[echo] +
[echo] + private FinderPath _finderPathFetchByG_FEK;
[echo] + private FinderPath _finderPathCountByG_FEK;
[echo]
[echo] /**
[echo] - * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] + * Returns the fragment entry where groupId = &#63; and fragmentEntryKey = &#63; or throws a <code>NoSuchEntryException</code> if it could not be found.
[echo] *
[echo] * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @return the matching fragment entries
[echo] + * @param fragmentEntryKey the fragment entry key
[echo] + * @return the matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> findByG_FCI(
[echo] - long groupId, long fragmentCollectionId) {
[echo] + public FragmentEntry findByG_FEK(long groupId, String fragmentEntryKey)
[echo] + throws NoSuchEntryException {
[echo]
[echo] - return findByG_FCI(
[echo] - groupId, fragmentCollectionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
[echo] - null);
[echo] + FragmentEntry fragmentEntry = fetchByG_FEK(groupId, fragmentEntryKey);
[echo] +
[echo] + if (fragmentEntry == null) {
[echo] + StringBundler msg = new StringBundler(6);
[echo] +
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] +
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo] +
[echo] + msg.append(", fragmentEntryKey=");
[echo] + msg.append(fragmentEntryKey);
[echo] +
[echo] + msg.append("}");
[echo] +
[echo] + if (_log.isDebugEnabled()) {
[echo] + _log.debug(msg.toString());
[echo] + }
[echo] +
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] + }
[echo] +
[echo] + return fragmentEntry;
[echo] }
[echo]
[echo] /**
[echo] - * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] + * Returns the fragment entry where groupId = &#63; and fragmentEntryKey = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
[echo] *
[echo] * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries
[echo] + * @param fragmentEntryKey the fragment entry key
[echo] + * @return the matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> findByG_FCI(
[echo] - long groupId, long fragmentCollectionId, int start, int end) {
[echo] -
[echo] - return findByG_FCI(groupId, fragmentCollectionId, start, end, null);
[echo] + public FragmentEntry fetchByG_FEK(long groupId, String fragmentEntryKey) {
[echo] + return fetchByG_FEK(groupId, fragmentEntryKey, true);
[echo] }
[echo]
[echo] /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] + * Returns the fragment entry where groupId = &#63; and fragmentEntryKey = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
[echo] *
[echo] * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries
[echo] + * @param fragmentEntryKey the fragment entry key
[echo] + * @param useFinderCache whether to use the finder cache
[echo] + * @return the matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> findByG_FCI(
[echo] - long groupId, long fragmentCollectionId, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] + public FragmentEntry fetchByG_FEK(
[echo] + long groupId, String fragmentEntryKey, boolean useFinderCache) {
[echo]
[echo] - return findByG_FCI(
[echo] - groupId, fragmentCollectionId, start, end, orderByComparator, true);
[echo] - }
[echo] + fragmentEntryKey = Objects.toString(fragmentEntryKey, "");
[echo]
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @param useFinderCache whether to use the finder cache
[echo] - * @return the ordered range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI(
[echo] - long groupId, long fragmentCollectionId, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator,
[echo] - boolean useFinderCache) {
[echo] -
[echo] - boolean pagination = true;
[echo] - FinderPath finderPath = null;
[echo] Object[] finderArgs = null;
[echo]
[echo] - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
[echo] - (orderByComparator == null)) {
[echo] -
[echo] - pagination = false;
[echo] -
[echo] - if (useFinderCache) {
[echo] - finderPath = _finderPathWithoutPaginationFindByG_FCI;
[echo] - finderArgs = new Object[] {groupId, fragmentCollectionId};
[echo] - }
[echo] - }
[echo] - else if (useFinderCache) {
[echo] - finderPath = _finderPathWithPaginationFindByG_FCI;
[echo] - finderArgs = new Object[] {
[echo] - groupId, fragmentCollectionId, start, end, orderByComparator
[echo] - };
[echo] + if (useFinderCache) {
[echo] + finderArgs = new Object[] {groupId, fragmentEntryKey};
[echo] }
[echo]
[echo] - List<FragmentEntry> list = null;
[echo] + Object result = null;
[echo]
[echo] if (useFinderCache) {
[echo] - list = (List<FragmentEntry>)finderCache.getResult(
[echo] - finderPath, finderArgs, this);
[echo] + result = finderCache.getResult(
[echo] + _finderPathFetchByG_FEK, finderArgs, this);
[echo] + }
[echo]
[echo] - if ((list != null) && !list.isEmpty()) {
[echo] - for (FragmentEntry fragmentEntry : list) {
[echo] - if ((groupId != fragmentEntry.getGroupId()) ||
[echo] - (fragmentCollectionId !=
[echo] - fragmentEntry.getFragmentCollectionId())) {
[echo] + if (result instanceof FragmentEntry) {
[echo] + FragmentEntry fragmentEntry = (FragmentEntry)result;
[echo]
[echo] - list = null;
[echo] + if ((groupId != fragmentEntry.getGroupId()) ||
[echo] + !Objects.equals(
[echo] + fragmentEntryKey, fragmentEntry.getFragmentEntryKey())) {
[echo]
[echo] - break;
[echo] - }
[echo] - }
[echo] + result = null;
[echo] }
[echo] }
[echo]
[echo] - if (list == null) {
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 4 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(4);
[echo] - }
[echo] + if (result == null) {
[echo] + StringBundler query = new StringBundler(4);
[echo]
[echo] query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_GROUPID_2);
[echo] + query.append(_FINDER_COLUMN_G_FEK_GROUPID_2);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_FRAGMENTCOLLECTIONID_2);
[echo] + boolean bindFragmentEntryKey = false;
[echo]
[echo] - if (orderByComparator != null) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator);
[echo] + if (fragmentEntryKey.isEmpty()) {
[echo] + query.append(_FINDER_COLUMN_G_FEK_FRAGMENTENTRYKEY_3);
[echo] }
[echo] - else if (pagination) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] + else {
[echo] + bindFragmentEntryKey = true;
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FEK_FRAGMENTENTRYKEY_2);
[echo] }
[echo]
[echo] String sql = query.toString();
[echo] @@ -3089,30 +3231,30 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] qPos.add(groupId);
[echo]
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - if (!pagination) {
[echo] - list = (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end, false);
[echo] + if (bindFragmentEntryKey) {
[echo] + qPos.add(fragmentEntryKey);
[echo] + }
[echo]
[echo] - Collections.sort(list);
[echo] + List<FragmentEntry> list = q.list();
[echo]
[echo] - list = Collections.unmodifiableList(list);
[echo] + if (list.isEmpty()) {
[echo] + if (useFinderCache) {
[echo] + finderCache.putResult(
[echo] + _finderPathFetchByG_FEK, finderArgs, list);
[echo] + }
[echo] }
[echo] else {
[echo] - list = (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] + FragmentEntry fragmentEntry = list.get(0);
[echo]
[echo] - cacheResult(list);
[echo] + result = fragmentEntry;
[echo]
[echo] - if (useFinderCache) {
[echo] - finderCache.putResult(finderPath, finderArgs, list);
[echo] + cacheResult(fragmentEntry);
[echo] }
[echo] }
[echo] catch (Exception e) {
[echo] if (useFinderCache) {
[echo] - finderCache.removeResult(finderPath, finderArgs);
[echo] + finderCache.removeResult(
[echo] + _finderPathFetchByG_FEK, finderArgs);
[echo] }
[echo]
[echo] throw processException(e);
[echo] @@ -3122,312 +3264,153 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo]
[echo] - return list;
[echo] + if (result instanceof List<?>) {
[echo] + return null;
[echo] + }
[echo] + else {
[echo] + return (FragmentEntry)result;
[echo] + }
[echo] }
[echo]
[echo] /**
[echo] - * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] + * Removes the fragment entry where groupId = &#63; and fragmentEntryKey = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] + * @param fragmentEntryKey the fragment entry key
[echo] + * @return the fragment entry that was removed
[echo] */
[echo] @Override
[echo] - public FragmentEntry findByG_FCI_First(
[echo] - long groupId, long fragmentCollectionId,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] + public FragmentEntry removeByG_FEK(long groupId, String fragmentEntryKey)
[echo] throws NoSuchEntryException {
[echo]
[echo] - FragmentEntry fragmentEntry = fetchByG_FCI_First(
[echo] - groupId, fragmentCollectionId, orderByComparator);
[echo] -
[echo] - if (fragmentEntry != null) {
[echo] - return fragmentEntry;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(6);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", fragmentCollectionId=");
[echo] - msg.append(fragmentCollectionId);
[echo] -
[echo] - msg.append("}");
[echo] + FragmentEntry fragmentEntry = findByG_FEK(groupId, fragmentEntryKey);
[echo]
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] + return remove(fragmentEntry);
[echo] }
[echo]
[echo] /**
[echo] - * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] + * Returns the number of fragment entries where groupId = &#63; and fragmentEntryKey = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + * @param fragmentEntryKey the fragment entry key
[echo] + * @return the number of matching fragment entries
[echo] */
[echo] @Override
[echo] - public FragmentEntry fetchByG_FCI_First(
[echo] - long groupId, long fragmentCollectionId,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] + public int countByG_FEK(long groupId, String fragmentEntryKey) {
[echo] + fragmentEntryKey = Objects.toString(fragmentEntryKey, "");
[echo]
[echo] - List<FragmentEntry> list = findByG_FCI(
[echo] - groupId, fragmentCollectionId, 0, 1, orderByComparator);
[echo] + FinderPath finderPath = _finderPathCountByG_FEK;
[echo]
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] + Object[] finderArgs = new Object[] {groupId, fragmentEntryKey};
[echo]
[echo] - return null;
[echo] - }
[echo] + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo]
[echo] - /**
[echo] - * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry findByG_FCI_Last(
[echo] - long groupId, long fragmentCollectionId,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] + if (count == null) {
[echo] + StringBundler query = new StringBundler(3);
[echo]
[echo] - FragmentEntry fragmentEntry = fetchByG_FCI_Last(
[echo] - groupId, fragmentCollectionId, orderByComparator);
[echo] + query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - if (fragmentEntry != null) {
[echo] - return fragmentEntry;
[echo] - }
[echo] + query.append(_FINDER_COLUMN_G_FEK_GROUPID_2);
[echo]
[echo] - StringBundler msg = new StringBundler(6);
[echo] + boolean bindFragmentEntryKey = false;
[echo]
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] + if (fragmentEntryKey.isEmpty()) {
[echo] + query.append(_FINDER_COLUMN_G_FEK_FRAGMENTENTRYKEY_3);
[echo] + }
[echo] + else {
[echo] + bindFragmentEntryKey = true;
[echo]
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] + query.append(_FINDER_COLUMN_G_FEK_FRAGMENTENTRYKEY_2);
[echo] + }
[echo]
[echo] - msg.append(", fragmentCollectionId=");
[echo] - msg.append(fragmentCollectionId);
[echo] + String sql = query.toString();
[echo]
[echo] - msg.append("}");
[echo] + Session session = null;
[echo]
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] - }
[echo] + try {
[echo] + session = openSession();
[echo]
[echo] - /**
[echo] - * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry fetchByG_FCI_Last(
[echo] - long groupId, long fragmentCollectionId,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] + Query q = session.createQuery(sql);
[echo]
[echo] - int count = countByG_FCI(groupId, fragmentCollectionId);
[echo] + QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] - if (count == 0) {
[echo] - return null;
[echo] - }
[echo] + qPos.add(groupId);
[echo]
[echo] - List<FragmentEntry> list = findByG_FCI(
[echo] - groupId, fragmentCollectionId, count - 1, count, orderByComparator);
[echo] + if (bindFragmentEntryKey) {
[echo] + qPos.add(fragmentEntryKey);
[echo] + }
[echo]
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] + count = (Long)q.uniqueResult();
[echo]
[echo] - return null;
[echo] - }
[echo] + finderCache.putResult(finderPath, finderArgs, count);
[echo] + }
[echo] + catch (Exception e) {
[echo] + finderCache.removeResult(finderPath, finderArgs);
[echo]
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry[] findByG_FCI_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - FragmentEntry[] array = new FragmentEntryImpl[3];
[echo] -
[echo] - array[0] = getByG_FCI_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId,
[echo] - orderByComparator, true);
[echo] -
[echo] - array[1] = fragmentEntry;
[echo] -
[echo] - array[2] = getByG_FCI_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId,
[echo] - orderByComparator, false);
[echo] -
[echo] - return array;
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - protected FragmentEntry getByG_FCI_PrevAndNext(
[echo] - Session session, FragmentEntry fragmentEntry, long groupId,
[echo] - long fragmentCollectionId,
[echo] - OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 5 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] - (orderByComparator.getOrderByFields().length * 3));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(4);
[echo] - }
[echo] -
[echo] - query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - String[] orderByConditionFields =
[echo] - orderByComparator.getOrderByConditionFields();
[echo] -
[echo] - if (orderByConditionFields.length > 0) {
[echo] - query.append(WHERE_AND);
[echo] - }
[echo] -
[echo] - for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] - query.append(orderByConditionFields[i]);
[echo] -
[echo] - if ((i + 1) < orderByConditionFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN);
[echo] - }
[echo] - }
[echo] + throw processException(e);
[echo] }
[echo] -
[echo] - query.append(ORDER_BY_CLAUSE);
[echo] -
[echo] - String[] orderByFields = orderByComparator.getOrderByFields();
[echo] -
[echo] - for (int i = 0; i < orderByFields.length; i++) {
[echo] - query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] - query.append(orderByFields[i]);
[echo] -
[echo] - if ((i + 1) < orderByFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC);
[echo] - }
[echo] - }
[echo] + finally {
[echo] + closeSession(session);
[echo] }
[echo] }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] -
[echo] - String sql = query.toString();
[echo] -
[echo] - Query q = session.createQuery(sql);
[echo] -
[echo] - q.setFirstResult(0);
[echo] - q.setMaxResults(2);
[echo]
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] + return count.intValue();
[echo] + }
[echo]
[echo] - qPos.add(groupId);
[echo] + private static final String _FINDER_COLUMN_G_FEK_GROUPID_2 =
[echo] + "fragmentEntry.groupId = ? AND ";
[echo]
[echo] - qPos.add(fragmentCollectionId);
[echo] + private static final String _FINDER_COLUMN_G_FEK_FRAGMENTENTRYKEY_2 =
[echo] + "fragmentEntry.fragmentEntryKey = ?";
[echo]
[echo] - if (orderByComparator != null) {
[echo] - for (Object orderByConditionValue :
[echo] - orderByComparator.getOrderByConditionValues(
[echo] - fragmentEntry)) {
[echo] + private static final String _FINDER_COLUMN_G_FEK_FRAGMENTENTRYKEY_3 =
[echo] + "(fragmentEntry.fragmentEntryKey IS NULL OR fragmentEntry.fragmentEntryKey = '')";
[echo]
[echo] - qPos.add(orderByConditionValue);
[echo] - }
[echo] - }
[echo] + private FinderPath _finderPathWithPaginationFindByG_FCI_LikeN;
[echo] + private FinderPath _finderPathWithPaginationCountByG_FCI_LikeN;
[echo]
[echo] - List<FragmentEntry> list = q.list();
[echo] + /**
[echo] + * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param name the name
[echo] + * @return the matching fragment entries
[echo] + */
[echo] + @Override
[echo] + public List<FragmentEntry> findByG_FCI_LikeN(
[echo] + long groupId, long fragmentCollectionId, String name) {
[echo]
[echo] - if (list.size() == 2) {
[echo] - return list.get(1);
[echo] - }
[echo] - else {
[echo] - return null;
[echo] - }
[echo] + return findByG_FCI_LikeN(
[echo] + groupId, fragmentCollectionId, name, QueryUtil.ALL_POS,
[echo] + QueryUtil.ALL_POS, null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] + * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] + *
[echo] + * <p>
[echo] + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] + * </p>
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] + * @param name the name
[echo] + * @param start the lower bound of the range of fragment entries
[echo] + * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] + * @return the range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI(
[echo] - long groupId, long fragmentCollectionId) {
[echo] + public List<FragmentEntry> findByG_FCI_LikeN(
[echo] + long groupId, long fragmentCollectionId, String name, int start,
[echo] + int end) {
[echo]
[echo] - return filterFindByG_FCI(
[echo] - groupId, fragmentCollectionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
[echo] - null);
[echo] + return findByG_FCI_LikeN(
[echo] + groupId, fragmentCollectionId, name, start, end, null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] *
[echo] * <p>
[echo] * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] @@ -3435,20 +3418,24 @@ public class FragmentEntryPersistenceImpl
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] + * @param name the name
[echo] * @param start the lower bound of the range of fragment entries
[echo] * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] + * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI(
[echo] - long groupId, long fragmentCollectionId, int start, int end) {
[echo] + public List<FragmentEntry> findByG_FCI_LikeN(
[echo] + long groupId, long fragmentCollectionId, String name, int start,
[echo] + int end, OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - return filterFindByG_FCI(
[echo] - groupId, fragmentCollectionId, start, end, null);
[echo] + return findByG_FCI_LikeN(
[echo] + groupId, fragmentCollectionId, name, start, end, orderByComparator,
[echo] + true);
[echo] }
[echo]
[echo] /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] *
[echo] * <p>
[echo] * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] @@ -3456,123 +3443,297 @@ public class FragmentEntryPersistenceImpl
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] + * @param name the name
[echo] * @param start the lower bound of the range of fragment entries
[echo] * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] + * @param useFinderCache whether to use the finder cache
[echo] + * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI(
[echo] - long groupId, long fragmentCollectionId, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] + public List<FragmentEntry> findByG_FCI_LikeN(
[echo] + long groupId, long fragmentCollectionId, String name, int start,
[echo] + int end, OrderByComparator<FragmentEntry> orderByComparator,
[echo] + boolean useFinderCache) {
[echo]
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_FCI(
[echo] - groupId, fragmentCollectionId, start, end, orderByComparator);
[echo] - }
[echo] + name = Objects.toString(name, "");
[echo]
[echo] - StringBundler query = null;
[echo] + boolean pagination = true;
[echo] + FinderPath finderPath = null;
[echo] + Object[] finderArgs = null;
[echo]
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 4 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(5);
[echo] - }
[echo] + finderPath = _finderPathWithPaginationFindByG_FCI_LikeN;
[echo] + finderArgs = new Object[] {
[echo] + groupId, fragmentCollectionId, name, start, end, orderByComparator
[echo] + };
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] + List<FragmentEntry> list = null;
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_GROUPID_2);
[echo] + if (useFinderCache) {
[echo] + list = (List<FragmentEntry>)finderCache.getResult(
[echo] + finderPath, finderArgs, this);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_FRAGMENTCOLLECTIONID_2);
[echo] + if ((list != null) && !list.isEmpty()) {
[echo] + for (FragmentEntry fragmentEntry : list) {
[echo] + if ((groupId != fragmentEntry.getGroupId()) ||
[echo] + (fragmentCollectionId !=
[echo] + fragmentEntry.getFragmentCollectionId()) ||
[echo] + !StringUtil.wildcardMatches(
[echo] + fragmentEntry.getName(), name, '_', '%', '\\',
[echo] + true)) {
[echo]
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] + list = null;
[echo]
[echo] - if (orderByComparator != null) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true);
[echo] - }
[echo] - else {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_TABLE, orderByComparator, true);
[echo] + break;
[echo] + }
[echo] + }
[echo] }
[echo] }
[echo] - else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] +
[echo] + if (list == null) {
[echo] + StringBundler query = null;
[echo] +
[echo] + if (orderByComparator != null) {
[echo] + query = new StringBundler(
[echo] + 5 + (orderByComparator.getOrderByFields().length * 2));
[echo] }
[echo] else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] + query = new StringBundler(5);
[echo] }
[echo] - }
[echo]
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] + query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - Session session = null;
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_GROUPID_2);
[echo]
[echo] - try {
[echo] - session = openSession();
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] + boolean bindName = false;
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] + if (name.isEmpty()) {
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_3);
[echo] }
[echo] else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] + bindName = true;
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_2);
[echo] + }
[echo] +
[echo] + if (orderByComparator != null) {
[echo] + appendOrderByComparator(
[echo] + query, _ORDER_BY_ENTITY_ALIAS, orderByComparator);
[echo] + }
[echo] + else if (pagination) {
[echo] + query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] }
[echo]
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] + String sql = query.toString();
[echo] +
[echo] + Session session = null;
[echo] +
[echo] + try {
[echo] + session = openSession();
[echo] +
[echo] + Query q = session.createQuery(sql);
[echo] +
[echo] + QueryPos qPos = QueryPos.getInstance(q);
[echo] +
[echo] + qPos.add(groupId);
[echo] +
[echo] + qPos.add(fragmentCollectionId);
[echo] +
[echo] + if (bindName) {
[echo] + qPos.add(name);
[echo] + }
[echo] +
[echo] + if (!pagination) {
[echo] + list = (List<FragmentEntry>)QueryUtil.list(
[echo] + q, getDialect(), start, end, false);
[echo] +
[echo] + Collections.sort(list);
[echo] +
[echo] + list = Collections.unmodifiableList(list);
[echo] + }
[echo] + else {
[echo] + list = (List<FragmentEntry>)QueryUtil.list(
[echo] + q, getDialect(), start, end);
[echo] + }
[echo]
[echo] - qPos.add(groupId);
[echo] + cacheResult(list);
[echo]
[echo] - qPos.add(fragmentCollectionId);
[echo] + if (useFinderCache) {
[echo] + finderCache.putResult(finderPath, finderArgs, list);
[echo] + }
[echo] + }
[echo] + catch (Exception e) {
[echo] + if (useFinderCache) {
[echo] + finderCache.removeResult(finderPath, finderArgs);
[echo] + }
[echo]
[echo] - return (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] + throw processException(e);
[echo] + }
[echo] + finally {
[echo] + closeSession(session);
[echo] + }
[echo] }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] +
[echo] + return list;
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param name the name
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry findByG_FCI_LikeN_First(
[echo] + long groupId, long fragmentCollectionId, String name,
[echo] + OrderByComparator<FragmentEntry> orderByComparator)
[echo] + throws NoSuchEntryException {
[echo] +
[echo] + FragmentEntry fragmentEntry = fetchByG_FCI_LikeN_First(
[echo] + groupId, fragmentCollectionId, name, orderByComparator);
[echo] +
[echo] + if (fragmentEntry != null) {
[echo] + return fragmentEntry;
[echo] }
[echo] - finally {
[echo] - closeSession(session);
[echo] +
[echo] + StringBundler msg = new StringBundler(8);
[echo] +
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] +
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo] +
[echo] + msg.append(", fragmentCollectionId=");
[echo] + msg.append(fragmentCollectionId);
[echo] +
[echo] + msg.append(", nameLIKE");
[echo] + msg.append(name);
[echo] +
[echo] + msg.append("}");
[echo] +
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param name the name
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry fetchByG_FCI_LikeN_First(
[echo] + long groupId, long fragmentCollectionId, String name,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo] +
[echo] + List<FragmentEntry> list = findByG_FCI_LikeN(
[echo] + groupId, fragmentCollectionId, name, 0, 1, orderByComparator);
[echo] +
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] + }
[echo] +
[echo] + return null;
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param name the name
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry findByG_FCI_LikeN_Last(
[echo] + long groupId, long fragmentCollectionId, String name,
[echo] + OrderByComparator<FragmentEntry> orderByComparator)
[echo] + throws NoSuchEntryException {
[echo] +
[echo] + FragmentEntry fragmentEntry = fetchByG_FCI_LikeN_Last(
[echo] + groupId, fragmentCollectionId, name, orderByComparator);
[echo] +
[echo] + if (fragmentEntry != null) {
[echo] + return fragmentEntry;
[echo] + }
[echo] +
[echo] + StringBundler msg = new StringBundler(8);
[echo] +
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] +
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo] +
[echo] + msg.append(", fragmentCollectionId=");
[echo] + msg.append(fragmentCollectionId);
[echo] +
[echo] + msg.append(", nameLIKE");
[echo] + msg.append(name);
[echo] +
[echo] + msg.append("}");
[echo] +
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param name the name
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry fetchByG_FCI_LikeN_Last(
[echo] + long groupId, long fragmentCollectionId, String name,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo] +
[echo] + int count = countByG_FCI_LikeN(groupId, fragmentCollectionId, name);
[echo] +
[echo] + if (count == 0) {
[echo] + return null;
[echo] + }
[echo] +
[echo] + List<FragmentEntry> list = findByG_FCI_LikeN(
[echo] + groupId, fragmentCollectionId, name, count - 1, count,
[echo] + orderByComparator);
[echo] +
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] }
[echo] +
[echo] + return null;
[echo] }
[echo]
[echo] /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] + * Returns the fragment entries before and after the current fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] *
[echo] * @param fragmentEntryId the primary key of the current fragment entry
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] + * @param name the name
[echo] * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] * @return the previous, current, and next fragment entry
[echo] * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] */
[echo] @Override
[echo] - public FragmentEntry[] filterFindByG_FCI_PrevAndNext(
[echo] + public FragmentEntry[] findByG_FCI_LikeN_PrevAndNext(
[echo] long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] + String name, OrderByComparator<FragmentEntry> orderByComparator)
[echo] throws NoSuchEntryException {
[echo]
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_FCI_PrevAndNext(
[echo] - fragmentEntryId, groupId, fragmentCollectionId,
[echo] - orderByComparator);
[echo] - }
[echo] + name = Objects.toString(name, "");
[echo]
[echo] FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo]
[echo] @@ -3583,14 +3744,14 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] FragmentEntry[] array = new FragmentEntryImpl[3];
[echo]
[echo] - array[0] = filterGetByG_FCI_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId,
[echo] + array[0] = getByG_FCI_LikeN_PrevAndNext(
[echo] + session, fragmentEntry, groupId, fragmentCollectionId, name,
[echo] orderByComparator, true);
[echo]
[echo] array[1] = fragmentEntry;
[echo]
[echo] - array[2] = filterGetByG_FCI_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId,
[echo] + array[2] = getByG_FCI_LikeN_PrevAndNext(
[echo] + session, fragmentEntry, groupId, fragmentCollectionId, name,
[echo] orderByComparator, false);
[echo]
[echo] return array;
[echo] @@ -3603,9 +3764,9 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo]
[echo] - protected FragmentEntry filterGetByG_FCI_PrevAndNext(
[echo] + protected FragmentEntry getByG_FCI_LikeN_PrevAndNext(
[echo] Session session, FragmentEntry fragmentEntry, long groupId,
[echo] - long fragmentCollectionId,
[echo] + long fragmentCollectionId, String name,
[echo] OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo]
[echo] StringBundler query = null;
[echo] @@ -3619,21 +3780,21 @@ public class FragmentEntryPersistenceImpl
[echo] query = new StringBundler(5);
[echo] }
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] + query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_GROUPID_2);
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_GROUPID_2);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_FRAGMENTCOLLECTIONID_2);
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] + boolean bindName = false;
[echo] +
[echo] + if (name.isEmpty()) {
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_3);
[echo] + }
[echo] + else {
[echo] + bindName = true;
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_2);
[echo] }
[echo]
[echo] if (orderByComparator != null) {
[echo] @@ -3645,18 +3806,8 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] + query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] + query.append(orderByConditionFields[i]);
[echo]
[echo] if ((i + 1) < orderByConditionFields.length) {
[echo] if (orderByComparator.isAscending() ^ previous) {
[echo] @@ -3681,16 +3832,8 @@ public class FragmentEntryPersistenceImpl
[echo] String[] orderByFields = orderByComparator.getOrderByFields();
[echo]
[echo] for (int i = 0; i < orderByFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByFields[i], true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByFields[i], true));
[echo] - }
[echo] + query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] + query.append(orderByFields[i]);
[echo]
[echo] if ((i + 1) < orderByFields.length) {
[echo] if (orderByComparator.isAscending() ^ previous) {
[echo] @@ -3711,36 +3854,26 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo] else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] + query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] }
[echo]
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] + String sql = query.toString();
[echo]
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] + Query q = session.createQuery(sql);
[echo]
[echo] q.setFirstResult(0);
[echo] q.setMaxResults(2);
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] -
[echo] QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] qPos.add(groupId);
[echo]
[echo] qPos.add(fragmentCollectionId);
[echo]
[echo] + if (bindName) {
[echo] + qPos.add(name);
[echo] + }
[echo] +
[echo] if (orderByComparator != null) {
[echo] for (Object orderByConditionValue :
[echo] orderByComparator.getOrderByConditionValues(
[echo] @@ -3761,16 +3894,19 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] /**
[echo] - * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; from the database.
[echo] + * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] + * @param name the name
[echo] */
[echo] @Override
[echo] - public void removeByG_FCI(long groupId, long fragmentCollectionId) {
[echo] + public void removeByG_FCI_LikeN(
[echo] + long groupId, long fragmentCollectionId, String name) {
[echo] +
[echo] for (FragmentEntry fragmentEntry :
[echo] - findByG_FCI(
[echo] - groupId, fragmentCollectionId, QueryUtil.ALL_POS,
[echo] + findByG_FCI_LikeN(
[echo] + groupId, fragmentCollectionId, name, QueryUtil.ALL_POS,
[echo] QueryUtil.ALL_POS, null)) {
[echo]
[echo] remove(fragmentEntry);
[echo] @@ -3778,28 +3914,46 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] /**
[echo] - * Returns the number of fragment entries where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] + * Returns the number of fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] + * @param name the name
[echo] * @return the number of matching fragment entries
[echo] */
[echo] @Override
[echo] - public int countByG_FCI(long groupId, long fragmentCollectionId) {
[echo] - FinderPath finderPath = _finderPathCountByG_FCI;
[echo] + public int countByG_FCI_LikeN(
[echo] + long groupId, long fragmentCollectionId, String name) {
[echo]
[echo] - Object[] finderArgs = new Object[] {groupId, fragmentCollectionId};
[echo] + name = Objects.toString(name, "");
[echo] +
[echo] + FinderPath finderPath = _finderPathWithPaginationCountByG_FCI_LikeN;
[echo] +
[echo] + Object[] finderArgs = new Object[] {
[echo] + groupId, fragmentCollectionId, name
[echo] + };
[echo]
[echo] Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo]
[echo] if (count == null) {
[echo] - StringBundler query = new StringBundler(3);
[echo] + StringBundler query = new StringBundler(4);
[echo]
[echo] query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_GROUPID_2);
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_GROUPID_2);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_FRAGMENTCOLLECTIONID_2);
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_FRAGMENTCOLLECTIONID_2);
[echo] +
[echo] + boolean bindName = false;
[echo] +
[echo] + if (name.isEmpty()) {
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_3);
[echo] + }
[echo] + else {
[echo] + bindName = true;
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_2);
[echo] + }
[echo]
[echo] String sql = query.toString();
[echo]
[echo] @@ -3816,6 +3970,10 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] qPos.add(fragmentCollectionId);
[echo]
[echo] + if (bindName) {
[echo] + qPos.add(name);
[echo] + }
[echo] +
[echo] count = (Long)q.uniqueResult();
[echo]
[echo] finderCache.putResult(finderPath, finderArgs, count);
[echo] @@ -3833,171 +3991,177 @@ public class FragmentEntryPersistenceImpl
[echo] return count.intValue();
[echo] }
[echo]
[echo] + private static final String _FINDER_COLUMN_G_FCI_LIKEN_GROUPID_2 =
[echo] + "fragmentEntry.groupId = ? AND ";
[echo] +
[echo] + private static final String
[echo] + _FINDER_COLUMN_G_FCI_LIKEN_FRAGMENTCOLLECTIONID_2 =
[echo] + "fragmentEntry.fragmentCollectionId = ? AND ";
[echo] +
[echo] + private static final String _FINDER_COLUMN_G_FCI_LIKEN_NAME_2 =
[echo] + "fragmentEntry.name LIKE ?";
[echo] +
[echo] + private static final String _FINDER_COLUMN_G_FCI_LIKEN_NAME_3 =
[echo] + "(fragmentEntry.name IS NULL OR fragmentEntry.name LIKE '')";
[echo] +
[echo] + private FinderPath _finderPathWithPaginationFindByG_FCI_T;
[echo] + private FinderPath _finderPathWithoutPaginationFindByG_FCI_T;
[echo] + private FinderPath _finderPathCountByG_FCI_T;
[echo] +
[echo] /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63;.
[echo] + * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] + * @param type the type
[echo] + * @return the matching fragment entries
[echo] */
[echo] @Override
[echo] - public int filterCountByG_FCI(long groupId, long fragmentCollectionId) {
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return countByG_FCI(groupId, fragmentCollectionId);
[echo] - }
[echo] -
[echo] - StringBundler query = new StringBundler(3);
[echo] -
[echo] - query.append(_FILTER_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - q.addScalar(
[echo] - COUNT_COLUMN_NAME, com.liferay.portal.kernel.dao.orm.Type.LONG);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - Long count = (Long)q.uniqueResult();
[echo] + public List<FragmentEntry> findByG_FCI_T(
[echo] + long groupId, long fragmentCollectionId, int type) {
[echo]
[echo] - return count.intValue();
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] + return findByG_FCI_T(
[echo] + groupId, fragmentCollectionId, type, QueryUtil.ALL_POS,
[echo] + QueryUtil.ALL_POS, null);
[echo] }
[echo]
[echo] - private static final String _FINDER_COLUMN_G_FCI_GROUPID_2 =
[echo] - "fragmentEntry.groupId = ? AND ";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_FRAGMENTCOLLECTIONID_2 =
[echo] - "fragmentEntry.fragmentCollectionId = ?";
[echo] -
[echo] - private FinderPath _finderPathFetchByG_FEK;
[echo] - private FinderPath _finderPathCountByG_FEK;
[echo] -
[echo] /**
[echo] - * Returns the fragment entry where groupId = &#63; and fragmentEntryKey = &#63; or throws a <code>NoSuchEntryException</code> if it could not be found.
[echo] + * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] + *
[echo] + * <p>
[echo] + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] + * </p>
[echo] *
[echo] * @param groupId the group ID
[echo] - * @param fragmentEntryKey the fragment entry key
[echo] - * @return the matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param type the type
[echo] + * @param start the lower bound of the range of fragment entries
[echo] + * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] + * @return the range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public FragmentEntry findByG_FEK(long groupId, String fragmentEntryKey)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = fetchByG_FEK(groupId, fragmentEntryKey);
[echo] -
[echo] - if (fragmentEntry == null) {
[echo] - StringBundler msg = new StringBundler(6);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", fragmentEntryKey=");
[echo] - msg.append(fragmentEntryKey);
[echo] -
[echo] - msg.append("}");
[echo] -
[echo] - if (_log.isDebugEnabled()) {
[echo] - _log.debug(msg.toString());
[echo] - }
[echo] -
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] - }
[echo] + public List<FragmentEntry> findByG_FCI_T(
[echo] + long groupId, long fragmentCollectionId, int type, int start, int end) {
[echo]
[echo] - return fragmentEntry;
[echo] + return findByG_FCI_T(
[echo] + groupId, fragmentCollectionId, type, start, end, null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns the fragment entry where groupId = &#63; and fragmentEntryKey = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] + *
[echo] + * <p>
[echo] + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] + * </p>
[echo] *
[echo] * @param groupId the group ID
[echo] - * @param fragmentEntryKey the fragment entry key
[echo] - * @return the matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param type the type
[echo] + * @param start the lower bound of the range of fragment entries
[echo] + * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] + * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public FragmentEntry fetchByG_FEK(long groupId, String fragmentEntryKey) {
[echo] - return fetchByG_FEK(groupId, fragmentEntryKey, true);
[echo] + public List<FragmentEntry> findByG_FCI_T(
[echo] + long groupId, long fragmentCollectionId, int type, int start, int end,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo] +
[echo] + return findByG_FCI_T(
[echo] + groupId, fragmentCollectionId, type, start, end, orderByComparator,
[echo] + true);
[echo] }
[echo]
[echo] /**
[echo] - * Returns the fragment entry where groupId = &#63; and fragmentEntryKey = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] + *
[echo] + * <p>
[echo] + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] + * </p>
[echo] *
[echo] * @param groupId the group ID
[echo] - * @param fragmentEntryKey the fragment entry key
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param type the type
[echo] + * @param start the lower bound of the range of fragment entries
[echo] + * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] * @param useFinderCache whether to use the finder cache
[echo] - * @return the matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public FragmentEntry fetchByG_FEK(
[echo] - long groupId, String fragmentEntryKey, boolean useFinderCache) {
[echo] -
[echo] - fragmentEntryKey = Objects.toString(fragmentEntryKey, "");
[echo] + public List<FragmentEntry> findByG_FCI_T(
[echo] + long groupId, long fragmentCollectionId, int type, int start, int end,
[echo] + OrderByComparator<FragmentEntry> orderByComparator,
[echo] + boolean useFinderCache) {
[echo]
[echo] + boolean pagination = true;
[echo] + FinderPath finderPath = null;
[echo] Object[] finderArgs = null;
[echo]
[echo] - if (useFinderCache) {
[echo] - finderArgs = new Object[] {groupId, fragmentEntryKey};
[echo] - }
[echo] -
[echo] - Object result = null;
[echo] -
[echo] - if (useFinderCache) {
[echo] - result = finderCache.getResult(
[echo] - _finderPathFetchByG_FEK, finderArgs, this);
[echo] - }
[echo] -
[echo] - if (result instanceof FragmentEntry) {
[echo] - FragmentEntry fragmentEntry = (FragmentEntry)result;
[echo] + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
[echo] + (orderByComparator == null)) {
[echo]
[echo] - if ((groupId != fragmentEntry.getGroupId()) ||
[echo] - !Objects.equals(
[echo] - fragmentEntryKey, fragmentEntry.getFragmentEntryKey())) {
[echo] + pagination = false;
[echo]
[echo] - result = null;
[echo] + if (useFinderCache) {
[echo] + finderPath = _finderPathWithoutPaginationFindByG_FCI_T;
[echo] + finderArgs = new Object[] {groupId, fragmentCollectionId, type};
[echo] }
[echo] }
[echo] + else if (useFinderCache) {
[echo] + finderPath = _finderPathWithPaginationFindByG_FCI_T;
[echo] + finderArgs = new Object[] {
[echo] + groupId, fragmentCollectionId, type, start, end,
[echo] + orderByComparator
[echo] + };
[echo] + }
[echo]
[echo] - if (result == null) {
[echo] - StringBundler query = new StringBundler(4);
[echo] -
[echo] - query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] + List<FragmentEntry> list = null;
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FEK_GROUPID_2);
[echo] + if (useFinderCache) {
[echo] + list = (List<FragmentEntry>)finderCache.getResult(
[echo] + finderPath, finderArgs, this);
[echo]
[echo] - boolean bindFragmentEntryKey = false;
[echo] + if ((list != null) && !list.isEmpty()) {
[echo] + for (FragmentEntry fragmentEntry : list) {
[echo] + if ((groupId != fragmentEntry.getGroupId()) ||
[echo] + (fragmentCollectionId !=
[echo] + fragmentEntry.getFragmentCollectionId()) ||
[echo] + (type != fragmentEntry.getType())) {
[echo]
[echo] - if (fragmentEntryKey.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FEK_FRAGMENTENTRYKEY_3);
[echo] + list = null;
[echo] +
[echo] + break;
[echo] + }
[echo] + }
[echo] + }
[echo] + }
[echo] +
[echo] + if (list == null) {
[echo] + StringBundler query = null;
[echo] +
[echo] + if (orderByComparator != null) {
[echo] + query = new StringBundler(
[echo] + 5 + (orderByComparator.getOrderByFields().length * 2));
[echo] }
[echo] else {
[echo] - bindFragmentEntryKey = true;
[echo] + query = new StringBundler(5);
[echo] + }
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FEK_FRAGMENTENTRYKEY_2);
[echo] + query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_GROUPID_2);
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_FRAGMENTCOLLECTIONID_2);
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_TYPE_2);
[echo] +
[echo] + if (orderByComparator != null) {
[echo] + appendOrderByComparator(
[echo] + query, _ORDER_BY_ENTITY_ALIAS, orderByComparator);
[echo] + }
[echo] + else if (pagination) {
[echo] + query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] }
[echo]
[echo] String sql = query.toString();
[echo] @@ -4013,30 +4177,32 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] qPos.add(groupId);
[echo]
[echo] - if (bindFragmentEntryKey) {
[echo] - qPos.add(fragmentEntryKey);
[echo] - }
[echo] + qPos.add(fragmentCollectionId);
[echo]
[echo] - List<FragmentEntry> list = q.list();
[echo] + qPos.add(type);
[echo]
[echo] - if (list.isEmpty()) {
[echo] - if (useFinderCache) {
[echo] - finderCache.putResult(
[echo] - _finderPathFetchByG_FEK, finderArgs, list);
[echo] - }
[echo] + if (!pagination) {
[echo] + list = (List<FragmentEntry>)QueryUtil.list(
[echo] + q, getDialect(), start, end, false);
[echo] +
[echo] + Collections.sort(list);
[echo] +
[echo] + list = Collections.unmodifiableList(list);
[echo] }
[echo] else {
[echo] - FragmentEntry fragmentEntry = list.get(0);
[echo] + list = (List<FragmentEntry>)QueryUtil.list(
[echo] + q, getDialect(), start, end);
[echo] + }
[echo]
[echo] - result = fragmentEntry;
[echo] + cacheResult(list);
[echo]
[echo] - cacheResult(fragmentEntry);
[echo] + if (useFinderCache) {
[echo] + finderCache.putResult(finderPath, finderArgs, list);
[echo] }
[echo] }
[echo] catch (Exception e) {
[echo] if (useFinderCache) {
[echo] - finderCache.removeResult(
[echo] - _finderPathFetchByG_FEK, finderArgs);
[echo] + finderCache.removeResult(finderPath, finderArgs);
[echo] }
[echo]
[echo] throw processException(e);
[echo] @@ -4046,2607 +4212,161 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo]
[echo] - if (result instanceof List<?>) {
[echo] - return null;
[echo] - }
[echo] - else {
[echo] - return (FragmentEntry)result;
[echo] - }
[echo] + return list;
[echo] }
[echo]
[echo] /**
[echo] - * Removes the fragment entry where groupId = &#63; and fragmentEntryKey = &#63; from the database.
[echo] + * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] - * @param fragmentEntryKey the fragment entry key
[echo] - * @return the fragment entry that was removed
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param type the type
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public FragmentEntry removeByG_FEK(long groupId, String fragmentEntryKey)
[echo] + public FragmentEntry findByG_FCI_T_First(
[echo] + long groupId, long fragmentCollectionId, int type,
[echo] + OrderByComparator<FragmentEntry> orderByComparator)
[echo] throws NoSuchEntryException {
[echo]
[echo] - FragmentEntry fragmentEntry = findByG_FEK(groupId, fragmentEntryKey);
[echo] + FragmentEntry fragmentEntry = fetchByG_FCI_T_First(
[echo] + groupId, fragmentCollectionId, type, orderByComparator);
[echo]
[echo] - return remove(fragmentEntry);
[echo] - }
[echo] + if (fragmentEntry != null) {
[echo] + return fragmentEntry;
[echo] + }
[echo]
[echo] - /**
[echo] - * Returns the number of fragment entries where groupId = &#63; and fragmentEntryKey = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentEntryKey the fragment entry key
[echo] - * @return the number of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public int countByG_FEK(long groupId, String fragmentEntryKey) {
[echo] - fragmentEntryKey = Objects.toString(fragmentEntryKey, "");
[echo] + StringBundler msg = new StringBundler(8);
[echo]
[echo] - FinderPath finderPath = _finderPathCountByG_FEK;
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo]
[echo] - Object[] finderArgs = new Object[] {groupId, fragmentEntryKey};
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo]
[echo] - Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo] + msg.append(", fragmentCollectionId=");
[echo] + msg.append(fragmentCollectionId);
[echo]
[echo] - if (count == null) {
[echo] - StringBundler query = new StringBundler(3);
[echo] + msg.append(", type=");
[echo] + msg.append(type);
[echo]
[echo] - query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] + msg.append("}");
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FEK_GROUPID_2);
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] + }
[echo]
[echo] - boolean bindFragmentEntryKey = false;
[echo] + /**
[echo] + * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param type the type
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry fetchByG_FCI_T_First(
[echo] + long groupId, long fragmentCollectionId, int type,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - if (fragmentEntryKey.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FEK_FRAGMENTENTRYKEY_3);
[echo] - }
[echo] - else {
[echo] - bindFragmentEntryKey = true;
[echo] + List<FragmentEntry> list = findByG_FCI_T(
[echo] + groupId, fragmentCollectionId, type, 0, 1, orderByComparator);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FEK_FRAGMENTENTRYKEY_2);
[echo] - }
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] + }
[echo]
[echo] - String sql = query.toString();
[echo] + return null;
[echo] + }
[echo]
[echo] - Session session = null;
[echo] + /**
[echo] + * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param type the type
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry findByG_FCI_T_Last(
[echo] + long groupId, long fragmentCollectionId, int type,
[echo] + OrderByComparator<FragmentEntry> orderByComparator)
[echo] + throws NoSuchEntryException {
[echo]
[echo] - try {
[echo] - session = openSession();
[echo] + FragmentEntry fragmentEntry = fetchByG_FCI_T_Last(
[echo] + groupId, fragmentCollectionId, type, orderByComparator);
[echo]
[echo] - Query q = session.createQuery(sql);
[echo] + if (fragmentEntry != null) {
[echo] + return fragmentEntry;
[echo] + }
[echo]
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] + StringBundler msg = new StringBundler(8);
[echo]
[echo] - qPos.add(groupId);
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo]
[echo] - if (bindFragmentEntryKey) {
[echo] - qPos.add(fragmentEntryKey);
[echo] - }
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo]
[echo] - count = (Long)q.uniqueResult();
[echo] + msg.append(", fragmentCollectionId=");
[echo] + msg.append(fragmentCollectionId);
[echo]
[echo] - finderCache.putResult(finderPath, finderArgs, count);
[echo] - }
[echo] - catch (Exception e) {
[echo] - finderCache.removeResult(finderPath, finderArgs);
[echo] + msg.append(", type=");
[echo] + msg.append(type);
[echo]
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] + msg.append("}");
[echo]
[echo] - return count.intValue();
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] }
[echo]
[echo] - private static final String _FINDER_COLUMN_G_FEK_GROUPID_2 =
[echo] - "fragmentEntry.groupId = ? AND ";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FEK_FRAGMENTENTRYKEY_2 =
[echo] - "fragmentEntry.fragmentEntryKey = ?";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FEK_FRAGMENTENTRYKEY_3 =
[echo] - "(fragmentEntry.fragmentEntryKey IS NULL OR fragmentEntry.fragmentEntryKey = '')";
[echo] -
[echo] - private FinderPath _finderPathWithPaginationFindByG_FCI_LikeN;
[echo] - private FinderPath _finderPathWithPaginationCountByG_FCI_LikeN;
[echo] -
[echo] /**
[echo] - * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] + * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @return the matching fragment entries
[echo] + * @param type the type
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> findByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name) {
[echo] + public FragmentEntry fetchByG_FCI_T_Last(
[echo] + long groupId, long fragmentCollectionId, int type,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - return findByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name, QueryUtil.ALL_POS,
[echo] - QueryUtil.ALL_POS, null);
[echo] + int count = countByG_FCI_T(groupId, fragmentCollectionId, type);
[echo] +
[echo] + if (count == 0) {
[echo] + return null;
[echo] + }
[echo] +
[echo] + List<FragmentEntry> list = findByG_FCI_T(
[echo] + groupId, fragmentCollectionId, type, count - 1, count,
[echo] + orderByComparator);
[echo] +
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] + }
[echo] +
[echo] + return null;
[echo] }
[echo]
[echo] /**
[echo] - * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] + * Returns the fragment entries before and after the current fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] *
[echo] + * @param fragmentEntryId the primary key of the current fragment entry
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name, int start,
[echo] - int end) {
[echo] -
[echo] - return findByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name, start, end, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name, int start,
[echo] - int end, OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - return findByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name, start, end, orderByComparator,
[echo] - true);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @param useFinderCache whether to use the finder cache
[echo] - * @return the ordered range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name, int start,
[echo] - int end, OrderByComparator<FragmentEntry> orderByComparator,
[echo] - boolean useFinderCache) {
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] -
[echo] - boolean pagination = true;
[echo] - FinderPath finderPath = null;
[echo] - Object[] finderArgs = null;
[echo] -
[echo] - finderPath = _finderPathWithPaginationFindByG_FCI_LikeN;
[echo] - finderArgs = new Object[] {
[echo] - groupId, fragmentCollectionId, name, start, end, orderByComparator
[echo] - };
[echo] -
[echo] - List<FragmentEntry> list = null;
[echo] -
[echo] - if (useFinderCache) {
[echo] - list = (List<FragmentEntry>)finderCache.getResult(
[echo] - finderPath, finderArgs, this);
[echo] -
[echo] - if ((list != null) && !list.isEmpty()) {
[echo] - for (FragmentEntry fragmentEntry : list) {
[echo] - if ((groupId != fragmentEntry.getGroupId()) ||
[echo] - (fragmentCollectionId !=
[echo] - fragmentEntry.getFragmentCollectionId()) ||
[echo] - !StringUtil.wildcardMatches(
[echo] - fragmentEntry.getName(), name, '_', '%', '\\',
[echo] - true)) {
[echo] -
[echo] - list = null;
[echo] -
[echo] - break;
[echo] - }
[echo] - }
[echo] - }
[echo] - }
[echo] -
[echo] - if (list == null) {
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 5 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(5);
[echo] - }
[echo] -
[echo] - query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - boolean bindName = false;
[echo] -
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_2);
[echo] - }
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator);
[echo] - }
[echo] - else if (pagination) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] -
[echo] - String sql = query.toString();
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - Query q = session.createQuery(sql);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] -
[echo] - if (!pagination) {
[echo] - list = (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end, false);
[echo] -
[echo] - Collections.sort(list);
[echo] -
[echo] - list = Collections.unmodifiableList(list);
[echo] - }
[echo] - else {
[echo] - list = (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] -
[echo] - cacheResult(list);
[echo] -
[echo] - if (useFinderCache) {
[echo] - finderCache.putResult(finderPath, finderArgs, list);
[echo] - }
[echo] - }
[echo] - catch (Exception e) {
[echo] - if (useFinderCache) {
[echo] - finderCache.removeResult(finderPath, finderArgs);
[echo] - }
[echo] -
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - return list;
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry findByG_FCI_LikeN_First(
[echo] - long groupId, long fragmentCollectionId, String name,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = fetchByG_FCI_LikeN_First(
[echo] - groupId, fragmentCollectionId, name, orderByComparator);
[echo] -
[echo] - if (fragmentEntry != null) {
[echo] - return fragmentEntry;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(8);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", fragmentCollectionId=");
[echo] - msg.append(fragmentCollectionId);
[echo] -
[echo] - msg.append(", nameLIKE");
[echo] - msg.append(name);
[echo] -
[echo] - msg.append("}");
[echo] -
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry fetchByG_FCI_LikeN_First(
[echo] - long groupId, long fragmentCollectionId, String name,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - List<FragmentEntry> list = findByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name, 0, 1, orderByComparator);
[echo] -
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] -
[echo] - return null;
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry findByG_FCI_LikeN_Last(
[echo] - long groupId, long fragmentCollectionId, String name,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = fetchByG_FCI_LikeN_Last(
[echo] - groupId, fragmentCollectionId, name, orderByComparator);
[echo] -
[echo] - if (fragmentEntry != null) {
[echo] - return fragmentEntry;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(8);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", fragmentCollectionId=");
[echo] - msg.append(fragmentCollectionId);
[echo] -
[echo] - msg.append(", nameLIKE");
[echo] - msg.append(name);
[echo] -
[echo] - msg.append("}");
[echo] -
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry fetchByG_FCI_LikeN_Last(
[echo] - long groupId, long fragmentCollectionId, String name,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - int count = countByG_FCI_LikeN(groupId, fragmentCollectionId, name);
[echo] -
[echo] - if (count == 0) {
[echo] - return null;
[echo] - }
[echo] -
[echo] - List<FragmentEntry> list = findByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name, count - 1, count,
[echo] - orderByComparator);
[echo] -
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] -
[echo] - return null;
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry[] findByG_FCI_LikeN_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - String name, OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] -
[echo] - FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - FragmentEntry[] array = new FragmentEntryImpl[3];
[echo] -
[echo] - array[0] = getByG_FCI_LikeN_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, name,
[echo] - orderByComparator, true);
[echo] -
[echo] - array[1] = fragmentEntry;
[echo] -
[echo] - array[2] = getByG_FCI_LikeN_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, name,
[echo] - orderByComparator, false);
[echo] -
[echo] - return array;
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - protected FragmentEntry getByG_FCI_LikeN_PrevAndNext(
[echo] - Session session, FragmentEntry fragmentEntry, long groupId,
[echo] - long fragmentCollectionId, String name,
[echo] - OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 6 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] - (orderByComparator.getOrderByFields().length * 3));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(5);
[echo] - }
[echo] -
[echo] - query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - boolean bindName = false;
[echo] -
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_2);
[echo] - }
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - String[] orderByConditionFields =
[echo] - orderByComparator.getOrderByConditionFields();
[echo] -
[echo] - if (orderByConditionFields.length > 0) {
[echo] - query.append(WHERE_AND);
[echo] - }
[echo] -
[echo] - for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] - query.append(orderByConditionFields[i]);
[echo] -
[echo] - if ((i + 1) < orderByConditionFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN);
[echo] - }
[echo] - }
[echo] - }
[echo] -
[echo] - query.append(ORDER_BY_CLAUSE);
[echo] -
[echo] - String[] orderByFields = orderByComparator.getOrderByFields();
[echo] -
[echo] - for (int i = 0; i < orderByFields.length; i++) {
[echo] - query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] - query.append(orderByFields[i]);
[echo] -
[echo] - if ((i + 1) < orderByFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC);
[echo] - }
[echo] - }
[echo] - }
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] -
[echo] - String sql = query.toString();
[echo] -
[echo] - Query q = session.createQuery(sql);
[echo] -
[echo] - q.setFirstResult(0);
[echo] - q.setMaxResults(2);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - for (Object orderByConditionValue :
[echo] - orderByComparator.getOrderByConditionValues(
[echo] - fragmentEntry)) {
[echo] -
[echo] - qPos.add(orderByConditionValue);
[echo] - }
[echo] - }
[echo] -
[echo] - List<FragmentEntry> list = q.list();
[echo] -
[echo] - if (list.size() == 2) {
[echo] - return list.get(1);
[echo] - }
[echo] - else {
[echo] - return null;
[echo] - }
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name) {
[echo] -
[echo] - return filterFindByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name, QueryUtil.ALL_POS,
[echo] - QueryUtil.ALL_POS, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name, int start,
[echo] - int end) {
[echo] -
[echo] - return filterFindByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name, start, end, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name, int start,
[echo] - int end, OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name, start, end,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 5 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(6);
[echo] - }
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - boolean bindName = false;
[echo] -
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_2);
[echo] - }
[echo] -
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true);
[echo] - }
[echo] - else {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_TABLE, orderByComparator, true);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] - }
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] -
[echo] - return (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry[] filterFindByG_FCI_LikeN_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - String name, OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_FCI_LikeN_PrevAndNext(
[echo] - fragmentEntryId, groupId, fragmentCollectionId, name,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] -
[echo] - FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - FragmentEntry[] array = new FragmentEntryImpl[3];
[echo] -
[echo] - array[0] = filterGetByG_FCI_LikeN_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, name,
[echo] - orderByComparator, true);
[echo] -
[echo] - array[1] = fragmentEntry;
[echo] -
[echo] - array[2] = filterGetByG_FCI_LikeN_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, name,
[echo] - orderByComparator, false);
[echo] -
[echo] - return array;
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - protected FragmentEntry filterGetByG_FCI_LikeN_PrevAndNext(
[echo] - Session session, FragmentEntry fragmentEntry, long groupId,
[echo] - long fragmentCollectionId, String name,
[echo] - OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 7 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] - (orderByComparator.getOrderByFields().length * 3));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(6);
[echo] - }
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - boolean bindName = false;
[echo] -
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_2);
[echo] - }
[echo] -
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - String[] orderByConditionFields =
[echo] - orderByComparator.getOrderByConditionFields();
[echo] -
[echo] - if (orderByConditionFields.length > 0) {
[echo] - query.append(WHERE_AND);
[echo] - }
[echo] -
[echo] - for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] -
[echo] - if ((i + 1) < orderByConditionFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN);
[echo] - }
[echo] - }
[echo] - }
[echo] -
[echo] - query.append(ORDER_BY_CLAUSE);
[echo] -
[echo] - String[] orderByFields = orderByComparator.getOrderByFields();
[echo] -
[echo] - for (int i = 0; i < orderByFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByFields[i], true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByFields[i], true));
[echo] - }
[echo] -
[echo] - if ((i + 1) < orderByFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC);
[echo] - }
[echo] - }
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] - }
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - q.setFirstResult(0);
[echo] - q.setMaxResults(2);
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - for (Object orderByConditionValue :
[echo] - orderByComparator.getOrderByConditionValues(
[echo] - fragmentEntry)) {
[echo] -
[echo] - qPos.add(orderByConditionValue);
[echo] - }
[echo] - }
[echo] -
[echo] - List<FragmentEntry> list = q.list();
[echo] -
[echo] - if (list.size() == 2) {
[echo] - return list.get(1);
[echo] - }
[echo] - else {
[echo] - return null;
[echo] - }
[echo] - }
[echo] -
[echo] - /**
[echo] - * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; from the database.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - */
[echo] - @Override
[echo] - public void removeByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name) {
[echo] -
[echo] - for (FragmentEntry fragmentEntry :
[echo] - findByG_FCI_LikeN(
[echo] - groupId, fragmentCollectionId, name, QueryUtil.ALL_POS,
[echo] - QueryUtil.ALL_POS, null)) {
[echo] -
[echo] - remove(fragmentEntry);
[echo] - }
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the number of fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @return the number of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public int countByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name) {
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] -
[echo] - FinderPath finderPath = _finderPathWithPaginationCountByG_FCI_LikeN;
[echo] -
[echo] - Object[] finderArgs = new Object[] {
[echo] - groupId, fragmentCollectionId, name
[echo] - };
[echo] -
[echo] - Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo] -
[echo] - if (count == null) {
[echo] - StringBundler query = new StringBundler(4);
[echo] -
[echo] - query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - boolean bindName = false;
[echo] -
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_2);
[echo] - }
[echo] -
[echo] - String sql = query.toString();
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - Query q = session.createQuery(sql);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] -
[echo] - count = (Long)q.uniqueResult();
[echo] -
[echo] - finderCache.putResult(finderPath, finderArgs, count);
[echo] - }
[echo] - catch (Exception e) {
[echo] - finderCache.removeResult(finderPath, finderArgs);
[echo] -
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - return count.intValue();
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public int filterCountByG_FCI_LikeN(
[echo] - long groupId, long fragmentCollectionId, String name) {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return countByG_FCI_LikeN(groupId, fragmentCollectionId, name);
[echo] - }
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] -
[echo] - StringBundler query = new StringBundler(4);
[echo] -
[echo] - query.append(_FILTER_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - boolean bindName = false;
[echo] -
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_NAME_2);
[echo] - }
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - q.addScalar(
[echo] - COUNT_COLUMN_NAME, com.liferay.portal.kernel.dao.orm.Type.LONG);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] -
[echo] - Long count = (Long)q.uniqueResult();
[echo] -
[echo] - return count.intValue();
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_LIKEN_GROUPID_2 =
[echo] - "fragmentEntry.groupId = ? AND ";
[echo] -
[echo] - private static final String
[echo] - _FINDER_COLUMN_G_FCI_LIKEN_FRAGMENTCOLLECTIONID_2 =
[echo] - "fragmentEntry.fragmentCollectionId = ? AND ";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_LIKEN_NAME_2 =
[echo] - "fragmentEntry.name LIKE ?";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_LIKEN_NAME_3 =
[echo] - "(fragmentEntry.name IS NULL OR fragmentEntry.name LIKE '')";
[echo] -
[echo] - private FinderPath _finderPathWithPaginationFindByG_FCI_T;
[echo] - private FinderPath _finderPathWithoutPaginationFindByG_FCI_T;
[echo] - private FinderPath _finderPathCountByG_FCI_T;
[echo] -
[echo] - /**
[echo] - * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @return the matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type) {
[echo] -
[echo] - return findByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type, QueryUtil.ALL_POS,
[echo] - QueryUtil.ALL_POS, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type, int start, int end) {
[echo] -
[echo] - return findByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type, start, end, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - return findByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type, start, end, orderByComparator,
[echo] - true);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @param useFinderCache whether to use the finder cache
[echo] - * @return the ordered range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator,
[echo] - boolean useFinderCache) {
[echo] -
[echo] - boolean pagination = true;
[echo] - FinderPath finderPath = null;
[echo] - Object[] finderArgs = null;
[echo] -
[echo] - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
[echo] - (orderByComparator == null)) {
[echo] -
[echo] - pagination = false;
[echo] -
[echo] - if (useFinderCache) {
[echo] - finderPath = _finderPathWithoutPaginationFindByG_FCI_T;
[echo] - finderArgs = new Object[] {groupId, fragmentCollectionId, type};
[echo] - }
[echo] - }
[echo] - else if (useFinderCache) {
[echo] - finderPath = _finderPathWithPaginationFindByG_FCI_T;
[echo] - finderArgs = new Object[] {
[echo] - groupId, fragmentCollectionId, type, start, end,
[echo] - orderByComparator
[echo] - };
[echo] - }
[echo] -
[echo] - List<FragmentEntry> list = null;
[echo] -
[echo] - if (useFinderCache) {
[echo] - list = (List<FragmentEntry>)finderCache.getResult(
[echo] - finderPath, finderArgs, this);
[echo] -
[echo] - if ((list != null) && !list.isEmpty()) {
[echo] - for (FragmentEntry fragmentEntry : list) {
[echo] - if ((groupId != fragmentEntry.getGroupId()) ||
[echo] - (fragmentCollectionId !=
[echo] - fragmentEntry.getFragmentCollectionId()) ||
[echo] - (type != fragmentEntry.getType())) {
[echo] -
[echo] - list = null;
[echo] -
[echo] - break;
[echo] - }
[echo] - }
[echo] - }
[echo] - }
[echo] -
[echo] - if (list == null) {
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 5 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(5);
[echo] - }
[echo] -
[echo] - query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_TYPE_2);
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator);
[echo] - }
[echo] - else if (pagination) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] -
[echo] - String sql = query.toString();
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - Query q = session.createQuery(sql);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - qPos.add(type);
[echo] -
[echo] - if (!pagination) {
[echo] - list = (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end, false);
[echo] -
[echo] - Collections.sort(list);
[echo] -
[echo] - list = Collections.unmodifiableList(list);
[echo] - }
[echo] - else {
[echo] - list = (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] -
[echo] - cacheResult(list);
[echo] -
[echo] - if (useFinderCache) {
[echo] - finderCache.putResult(finderPath, finderArgs, list);
[echo] - }
[echo] - }
[echo] - catch (Exception e) {
[echo] - if (useFinderCache) {
[echo] - finderCache.removeResult(finderPath, finderArgs);
[echo] - }
[echo] -
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - return list;
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry findByG_FCI_T_First(
[echo] - long groupId, long fragmentCollectionId, int type,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = fetchByG_FCI_T_First(
[echo] - groupId, fragmentCollectionId, type, orderByComparator);
[echo] -
[echo] - if (fragmentEntry != null) {
[echo] - return fragmentEntry;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(8);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", fragmentCollectionId=");
[echo] - msg.append(fragmentCollectionId);
[echo] -
[echo] - msg.append(", type=");
[echo] - msg.append(type);
[echo] -
[echo] - msg.append("}");
[echo] -
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry fetchByG_FCI_T_First(
[echo] - long groupId, long fragmentCollectionId, int type,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - List<FragmentEntry> list = findByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type, 0, 1, orderByComparator);
[echo] -
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] -
[echo] - return null;
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry findByG_FCI_T_Last(
[echo] - long groupId, long fragmentCollectionId, int type,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = fetchByG_FCI_T_Last(
[echo] - groupId, fragmentCollectionId, type, orderByComparator);
[echo] -
[echo] - if (fragmentEntry != null) {
[echo] - return fragmentEntry;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(8);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", fragmentCollectionId=");
[echo] - msg.append(fragmentCollectionId);
[echo] -
[echo] - msg.append(", type=");
[echo] - msg.append(type);
[echo] -
[echo] - msg.append("}");
[echo] -
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry fetchByG_FCI_T_Last(
[echo] - long groupId, long fragmentCollectionId, int type,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - int count = countByG_FCI_T(groupId, fragmentCollectionId, type);
[echo] -
[echo] - if (count == 0) {
[echo] - return null;
[echo] - }
[echo] -
[echo] - List<FragmentEntry> list = findByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type, count - 1, count,
[echo] - orderByComparator);
[echo] -
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] -
[echo] - return null;
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry[] findByG_FCI_T_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - int type, OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - FragmentEntry[] array = new FragmentEntryImpl[3];
[echo] -
[echo] - array[0] = getByG_FCI_T_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, type,
[echo] - orderByComparator, true);
[echo] -
[echo] - array[1] = fragmentEntry;
[echo] -
[echo] - array[2] = getByG_FCI_T_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, type,
[echo] - orderByComparator, false);
[echo] -
[echo] - return array;
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - protected FragmentEntry getByG_FCI_T_PrevAndNext(
[echo] - Session session, FragmentEntry fragmentEntry, long groupId,
[echo] - long fragmentCollectionId, int type,
[echo] - OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 6 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] - (orderByComparator.getOrderByFields().length * 3));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(5);
[echo] - }
[echo] -
[echo] - query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_TYPE_2);
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - String[] orderByConditionFields =
[echo] - orderByComparator.getOrderByConditionFields();
[echo] -
[echo] - if (orderByConditionFields.length > 0) {
[echo] - query.append(WHERE_AND);
[echo] - }
[echo] -
[echo] - for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] - query.append(orderByConditionFields[i]);
[echo] -
[echo] - if ((i + 1) < orderByConditionFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN);
[echo] - }
[echo] - }
[echo] - }
[echo] -
[echo] - query.append(ORDER_BY_CLAUSE);
[echo] -
[echo] - String[] orderByFields = orderByComparator.getOrderByFields();
[echo] -
[echo] - for (int i = 0; i < orderByFields.length; i++) {
[echo] - query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] - query.append(orderByFields[i]);
[echo] -
[echo] - if ((i + 1) < orderByFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC);
[echo] - }
[echo] - }
[echo] - }
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] -
[echo] - String sql = query.toString();
[echo] -
[echo] - Query q = session.createQuery(sql);
[echo] -
[echo] - q.setFirstResult(0);
[echo] - q.setMaxResults(2);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - qPos.add(type);
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - for (Object orderByConditionValue :
[echo] - orderByComparator.getOrderByConditionValues(
[echo] - fragmentEntry)) {
[echo] -
[echo] - qPos.add(orderByConditionValue);
[echo] - }
[echo] - }
[echo] -
[echo] - List<FragmentEntry> list = q.list();
[echo] -
[echo] - if (list.size() == 2) {
[echo] - return list.get(1);
[echo] - }
[echo] - else {
[echo] - return null;
[echo] - }
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type) {
[echo] -
[echo] - return filterFindByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type, QueryUtil.ALL_POS,
[echo] - QueryUtil.ALL_POS, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type, int start, int end) {
[echo] -
[echo] - return filterFindByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type, start, end, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type, start, end,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 5 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(6);
[echo] - }
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_TYPE_2_SQL);
[echo] -
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true);
[echo] - }
[echo] - else {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_TABLE, orderByComparator, true);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] - }
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - qPos.add(type);
[echo] -
[echo] - return (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry[] filterFindByG_FCI_T_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - int type, OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_FCI_T_PrevAndNext(
[echo] - fragmentEntryId, groupId, fragmentCollectionId, type,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - FragmentEntry[] array = new FragmentEntryImpl[3];
[echo] -
[echo] - array[0] = filterGetByG_FCI_T_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, type,
[echo] - orderByComparator, true);
[echo] -
[echo] - array[1] = fragmentEntry;
[echo] -
[echo] - array[2] = filterGetByG_FCI_T_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, type,
[echo] - orderByComparator, false);
[echo] -
[echo] - return array;
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - protected FragmentEntry filterGetByG_FCI_T_PrevAndNext(
[echo] - Session session, FragmentEntry fragmentEntry, long groupId,
[echo] - long fragmentCollectionId, int type,
[echo] - OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 7 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] - (orderByComparator.getOrderByFields().length * 3));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(6);
[echo] - }
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_TYPE_2_SQL);
[echo] -
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - String[] orderByConditionFields =
[echo] - orderByComparator.getOrderByConditionFields();
[echo] -
[echo] - if (orderByConditionFields.length > 0) {
[echo] - query.append(WHERE_AND);
[echo] - }
[echo] -
[echo] - for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] -
[echo] - if ((i + 1) < orderByConditionFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN);
[echo] - }
[echo] - }
[echo] - }
[echo] -
[echo] - query.append(ORDER_BY_CLAUSE);
[echo] -
[echo] - String[] orderByFields = orderByComparator.getOrderByFields();
[echo] -
[echo] - for (int i = 0; i < orderByFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByFields[i], true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByFields[i], true));
[echo] - }
[echo] -
[echo] - if ((i + 1) < orderByFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC);
[echo] - }
[echo] - }
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] - }
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - q.setFirstResult(0);
[echo] - q.setMaxResults(2);
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - qPos.add(type);
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - for (Object orderByConditionValue :
[echo] - orderByComparator.getOrderByConditionValues(
[echo] - fragmentEntry)) {
[echo] -
[echo] - qPos.add(orderByConditionValue);
[echo] - }
[echo] - }
[echo] -
[echo] - List<FragmentEntry> list = q.list();
[echo] -
[echo] - if (list.size() == 2) {
[echo] - return list.get(1);
[echo] - }
[echo] - else {
[echo] - return null;
[echo] - }
[echo] - }
[echo] -
[echo] - /**
[echo] - * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; from the database.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - */
[echo] - @Override
[echo] - public void removeByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type) {
[echo] -
[echo] - for (FragmentEntry fragmentEntry :
[echo] - findByG_FCI_T(
[echo] - groupId, fragmentCollectionId, type, QueryUtil.ALL_POS,
[echo] - QueryUtil.ALL_POS, null)) {
[echo] -
[echo] - remove(fragmentEntry);
[echo] - }
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the number of fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @return the number of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public int countByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type) {
[echo] -
[echo] - FinderPath finderPath = _finderPathCountByG_FCI_T;
[echo] -
[echo] - Object[] finderArgs = new Object[] {
[echo] - groupId, fragmentCollectionId, type
[echo] - };
[echo] -
[echo] - Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo] -
[echo] - if (count == null) {
[echo] - StringBundler query = new StringBundler(4);
[echo] -
[echo] - query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_TYPE_2);
[echo] -
[echo] - String sql = query.toString();
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - Query q = session.createQuery(sql);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - qPos.add(type);
[echo] -
[echo] - count = (Long)q.uniqueResult();
[echo] -
[echo] - finderCache.putResult(finderPath, finderArgs, count);
[echo] - }
[echo] - catch (Exception e) {
[echo] - finderCache.removeResult(finderPath, finderArgs);
[echo] -
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - return count.intValue();
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public int filterCountByG_FCI_T(
[echo] - long groupId, long fragmentCollectionId, int type) {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return countByG_FCI_T(groupId, fragmentCollectionId, type);
[echo] - }
[echo] -
[echo] - StringBundler query = new StringBundler(4);
[echo] -
[echo] - query.append(_FILTER_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_TYPE_2_SQL);
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - q.addScalar(
[echo] - COUNT_COLUMN_NAME, com.liferay.portal.kernel.dao.orm.Type.LONG);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - qPos.add(type);
[echo] -
[echo] - Long count = (Long)q.uniqueResult();
[echo] -
[echo] - return count.intValue();
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_T_GROUPID_2 =
[echo] - "fragmentEntry.groupId = ? AND ";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_T_FRAGMENTCOLLECTIONID_2 =
[echo] - "fragmentEntry.fragmentCollectionId = ? AND ";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_T_TYPE_2 =
[echo] - "fragmentEntry.type = ?";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_T_TYPE_2_SQL =
[echo] - "fragmentEntry.type_ = ?";
[echo] -
[echo] - private FinderPath _finderPathWithPaginationFindByG_FCI_S;
[echo] - private FinderPath _finderPathWithoutPaginationFindByG_FCI_S;
[echo] - private FinderPath _finderPathCountByG_FCI_S;
[echo] -
[echo] - /**
[echo] - * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @return the matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status) {
[echo] -
[echo] - return findByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status, QueryUtil.ALL_POS,
[echo] - QueryUtil.ALL_POS, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status, int start,
[echo] - int end) {
[echo] -
[echo] - return findByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status, start, end, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - return findByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status, start, end,
[echo] - orderByComparator, true);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @param useFinderCache whether to use the finder cache
[echo] - * @return the ordered range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status, int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator,
[echo] - boolean useFinderCache) {
[echo] -
[echo] - boolean pagination = true;
[echo] - FinderPath finderPath = null;
[echo] - Object[] finderArgs = null;
[echo] -
[echo] - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
[echo] - (orderByComparator == null)) {
[echo] -
[echo] - pagination = false;
[echo] -
[echo] - if (useFinderCache) {
[echo] - finderPath = _finderPathWithoutPaginationFindByG_FCI_S;
[echo] - finderArgs = new Object[] {
[echo] - groupId, fragmentCollectionId, status
[echo] - };
[echo] - }
[echo] - }
[echo] - else if (useFinderCache) {
[echo] - finderPath = _finderPathWithPaginationFindByG_FCI_S;
[echo] - finderArgs = new Object[] {
[echo] - groupId, fragmentCollectionId, status, start, end,
[echo] - orderByComparator
[echo] - };
[echo] - }
[echo] -
[echo] - List<FragmentEntry> list = null;
[echo] -
[echo] - if (useFinderCache) {
[echo] - list = (List<FragmentEntry>)finderCache.getResult(
[echo] - finderPath, finderArgs, this);
[echo] -
[echo] - if ((list != null) && !list.isEmpty()) {
[echo] - for (FragmentEntry fragmentEntry : list) {
[echo] - if ((groupId != fragmentEntry.getGroupId()) ||
[echo] - (fragmentCollectionId !=
[echo] - fragmentEntry.getFragmentCollectionId()) ||
[echo] - (status != fragmentEntry.getStatus())) {
[echo] -
[echo] - list = null;
[echo] -
[echo] - break;
[echo] - }
[echo] - }
[echo] - }
[echo] - }
[echo] -
[echo] - if (list == null) {
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 5 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(5);
[echo] - }
[echo] -
[echo] - query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_STATUS_2);
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator);
[echo] - }
[echo] - else if (pagination) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] -
[echo] - String sql = query.toString();
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - Query q = session.createQuery(sql);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - qPos.add(status);
[echo] -
[echo] - if (!pagination) {
[echo] - list = (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end, false);
[echo] -
[echo] - Collections.sort(list);
[echo] -
[echo] - list = Collections.unmodifiableList(list);
[echo] - }
[echo] - else {
[echo] - list = (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] -
[echo] - cacheResult(list);
[echo] -
[echo] - if (useFinderCache) {
[echo] - finderCache.putResult(finderPath, finderArgs, list);
[echo] - }
[echo] - }
[echo] - catch (Exception e) {
[echo] - if (useFinderCache) {
[echo] - finderCache.removeResult(finderPath, finderArgs);
[echo] - }
[echo] -
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - return list;
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry findByG_FCI_S_First(
[echo] - long groupId, long fragmentCollectionId, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = fetchByG_FCI_S_First(
[echo] - groupId, fragmentCollectionId, status, orderByComparator);
[echo] -
[echo] - if (fragmentEntry != null) {
[echo] - return fragmentEntry;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(8);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", fragmentCollectionId=");
[echo] - msg.append(fragmentCollectionId);
[echo] -
[echo] - msg.append(", status=");
[echo] - msg.append(status);
[echo] -
[echo] - msg.append("}");
[echo] -
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry fetchByG_FCI_S_First(
[echo] - long groupId, long fragmentCollectionId, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - List<FragmentEntry> list = findByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status, 0, 1, orderByComparator);
[echo] -
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] -
[echo] - return null;
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry findByG_FCI_S_Last(
[echo] - long groupId, long fragmentCollectionId, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = fetchByG_FCI_S_Last(
[echo] - groupId, fragmentCollectionId, status, orderByComparator);
[echo] -
[echo] - if (fragmentEntry != null) {
[echo] - return fragmentEntry;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(8);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", fragmentCollectionId=");
[echo] - msg.append(fragmentCollectionId);
[echo] -
[echo] - msg.append(", status=");
[echo] - msg.append(status);
[echo] -
[echo] - msg.append("}");
[echo] -
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry fetchByG_FCI_S_Last(
[echo] - long groupId, long fragmentCollectionId, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - int count = countByG_FCI_S(groupId, fragmentCollectionId, status);
[echo] -
[echo] - if (count == 0) {
[echo] - return null;
[echo] - }
[echo] -
[echo] - List<FragmentEntry> list = findByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status, count - 1, count,
[echo] - orderByComparator);
[echo] -
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] -
[echo] - return null;
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] + * @param type the type
[echo] * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] * @return the previous, current, and next fragment entry
[echo] * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] */
[echo] @Override
[echo] - public FragmentEntry[] findByG_FCI_S_PrevAndNext(
[echo] + public FragmentEntry[] findByG_FCI_T_PrevAndNext(
[echo] long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - int status, OrderByComparator<FragmentEntry> orderByComparator)
[echo] + int type, OrderByComparator<FragmentEntry> orderByComparator)
[echo] throws NoSuchEntryException {
[echo]
[echo] FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo] @@ -6658,14 +4378,14 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] FragmentEntry[] array = new FragmentEntryImpl[3];
[echo]
[echo] - array[0] = getByG_FCI_S_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, status,
[echo] + array[0] = getByG_FCI_T_PrevAndNext(
[echo] + session, fragmentEntry, groupId, fragmentCollectionId, type,
[echo] orderByComparator, true);
[echo]
[echo] array[1] = fragmentEntry;
[echo]
[echo] - array[2] = getByG_FCI_S_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, status,
[echo] + array[2] = getByG_FCI_T_PrevAndNext(
[echo] + session, fragmentEntry, groupId, fragmentCollectionId, type,
[echo] orderByComparator, false);
[echo]
[echo] return array;
[echo] @@ -6678,9 +4398,9 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo]
[echo] - protected FragmentEntry getByG_FCI_S_PrevAndNext(
[echo] + protected FragmentEntry getByG_FCI_T_PrevAndNext(
[echo] Session session, FragmentEntry fragmentEntry, long groupId,
[echo] - long fragmentCollectionId, int status,
[echo] + long fragmentCollectionId, int type,
[echo] OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo]
[echo] StringBundler query = null;
[echo] @@ -6696,11 +4416,11 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_GROUPID_2);
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_GROUPID_2);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_FRAGMENTCOLLECTIONID_2);
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_STATUS_2);
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_TYPE_2);
[echo]
[echo] if (orderByComparator != null) {
[echo] String[] orderByConditionFields =
[echo] @@ -6775,7 +4495,7 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] qPos.add(fragmentCollectionId);
[echo]
[echo] - qPos.add(status);
[echo] + qPos.add(type);
[echo]
[echo] if (orderByComparator != null) {
[echo] for (Object orderByConditionValue :
[echo] @@ -6797,24 +4517,122 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] + * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; from the database.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param type the type
[echo] + */
[echo] + @Override
[echo] + public void removeByG_FCI_T(
[echo] + long groupId, long fragmentCollectionId, int type) {
[echo] +
[echo] + for (FragmentEntry fragmentEntry :
[echo] + findByG_FCI_T(
[echo] + groupId, fragmentCollectionId, type, QueryUtil.ALL_POS,
[echo] + QueryUtil.ALL_POS, null)) {
[echo] +
[echo] + remove(fragmentEntry);
[echo] + }
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the number of fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param type the type
[echo] + * @return the number of matching fragment entries
[echo] + */
[echo] + @Override
[echo] + public int countByG_FCI_T(
[echo] + long groupId, long fragmentCollectionId, int type) {
[echo] +
[echo] + FinderPath finderPath = _finderPathCountByG_FCI_T;
[echo] +
[echo] + Object[] finderArgs = new Object[] {
[echo] + groupId, fragmentCollectionId, type
[echo] + };
[echo] +
[echo] + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo] +
[echo] + if (count == null) {
[echo] + StringBundler query = new StringBundler(4);
[echo] +
[echo] + query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_GROUPID_2);
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_FRAGMENTCOLLECTIONID_2);
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_TYPE_2);
[echo] +
[echo] + String sql = query.toString();
[echo] +
[echo] + Session session = null;
[echo] +
[echo] + try {
[echo] + session = openSession();
[echo] +
[echo] + Query q = session.createQuery(sql);
[echo] +
[echo] + QueryPos qPos = QueryPos.getInstance(q);
[echo] +
[echo] + qPos.add(groupId);
[echo] +
[echo] + qPos.add(fragmentCollectionId);
[echo] +
[echo] + qPos.add(type);
[echo] +
[echo] + count = (Long)q.uniqueResult();
[echo] +
[echo] + finderCache.putResult(finderPath, finderArgs, count);
[echo] + }
[echo] + catch (Exception e) {
[echo] + finderCache.removeResult(finderPath, finderArgs);
[echo] +
[echo] + throw processException(e);
[echo] + }
[echo] + finally {
[echo] + closeSession(session);
[echo] + }
[echo] + }
[echo] +
[echo] + return count.intValue();
[echo] + }
[echo] +
[echo] + private static final String _FINDER_COLUMN_G_FCI_T_GROUPID_2 =
[echo] + "fragmentEntry.groupId = ? AND ";
[echo] +
[echo] + private static final String _FINDER_COLUMN_G_FCI_T_FRAGMENTCOLLECTIONID_2 =
[echo] + "fragmentEntry.fragmentCollectionId = ? AND ";
[echo] +
[echo] + private static final String _FINDER_COLUMN_G_FCI_T_TYPE_2 =
[echo] + "fragmentEntry.type = ?";
[echo] +
[echo] + private FinderPath _finderPathWithPaginationFindByG_FCI_S;
[echo] + private FinderPath _finderPathWithoutPaginationFindByG_FCI_S;
[echo] + private FinderPath _finderPathCountByG_FCI_S;
[echo] +
[echo] + /**
[echo] + * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param status the status
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] + * @return the matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_S(
[echo] + public List<FragmentEntry> findByG_FCI_S(
[echo] long groupId, long fragmentCollectionId, int status) {
[echo]
[echo] - return filterFindByG_FCI_S(
[echo] + return findByG_FCI_S(
[echo] groupId, fragmentCollectionId, status, QueryUtil.ALL_POS,
[echo] QueryUtil.ALL_POS, null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] + * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] *
[echo] * <p>
[echo] * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] @@ -6825,19 +4643,19 @@ public class FragmentEntryPersistenceImpl
[echo] * @param status the status
[echo] * @param start the lower bound of the range of fragment entries
[echo] * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] + * @return the range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_S(
[echo] + public List<FragmentEntry> findByG_FCI_S(
[echo] long groupId, long fragmentCollectionId, int status, int start,
[echo] int end) {
[echo]
[echo] - return filterFindByG_FCI_S(
[echo] + return findByG_FCI_S(
[echo] groupId, fragmentCollectionId, status, start, end, null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] *
[echo] * <p>
[echo] * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] @@ -6849,106 +4667,302 @@ public class FragmentEntryPersistenceImpl
[echo] * @param start the lower bound of the range of fragment entries
[echo] * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] + * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_S(
[echo] + public List<FragmentEntry> findByG_FCI_S(
[echo] long groupId, long fragmentCollectionId, int status, int start, int end,
[echo] OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status, start, end,
[echo] - orderByComparator);
[echo] - }
[echo] + return findByG_FCI_S(
[echo] + groupId, fragmentCollectionId, status, start, end,
[echo] + orderByComparator, true);
[echo] + }
[echo]
[echo] - StringBundler query = null;
[echo] + /**
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] + *
[echo] + * <p>
[echo] + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] + * </p>
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param status the status
[echo] + * @param start the lower bound of the range of fragment entries
[echo] + * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] + * @param useFinderCache whether to use the finder cache
[echo] + * @return the ordered range of matching fragment entries
[echo] + */
[echo] + @Override
[echo] + public List<FragmentEntry> findByG_FCI_S(
[echo] + long groupId, long fragmentCollectionId, int status, int start, int end,
[echo] + OrderByComparator<FragmentEntry> orderByComparator,
[echo] + boolean useFinderCache) {
[echo]
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 5 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(6);
[echo] - }
[echo] + boolean pagination = true;
[echo] + FinderPath finderPath = null;
[echo] + Object[] finderArgs = null;
[echo] +
[echo] + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
[echo] + (orderByComparator == null)) {
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] + pagination = false;
[echo] +
[echo] + if (useFinderCache) {
[echo] + finderPath = _finderPathWithoutPaginationFindByG_FCI_S;
[echo] + finderArgs = new Object[] {
[echo] + groupId, fragmentCollectionId, status
[echo] + };
[echo] + }
[echo] }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] + else if (useFinderCache) {
[echo] + finderPath = _finderPathWithPaginationFindByG_FCI_S;
[echo] + finderArgs = new Object[] {
[echo] + groupId, fragmentCollectionId, status, start, end,
[echo] + orderByComparator
[echo] + };
[echo] }
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_GROUPID_2);
[echo] + List<FragmentEntry> list = null;
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_FRAGMENTCOLLECTIONID_2);
[echo] + if (useFinderCache) {
[echo] + list = (List<FragmentEntry>)finderCache.getResult(
[echo] + finderPath, finderArgs, this);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_STATUS_2);
[echo] + if ((list != null) && !list.isEmpty()) {
[echo] + for (FragmentEntry fragmentEntry : list) {
[echo] + if ((groupId != fragmentEntry.getGroupId()) ||
[echo] + (fragmentCollectionId !=
[echo] + fragmentEntry.getFragmentCollectionId()) ||
[echo] + (status != fragmentEntry.getStatus())) {
[echo]
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] + list = null;
[echo] +
[echo] + break;
[echo] + }
[echo] + }
[echo] + }
[echo] }
[echo]
[echo] - if (orderByComparator != null) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true);
[echo] + if (list == null) {
[echo] + StringBundler query = null;
[echo] +
[echo] + if (orderByComparator != null) {
[echo] + query = new StringBundler(
[echo] + 5 + (orderByComparator.getOrderByFields().length * 2));
[echo] }
[echo] else {
[echo] + query = new StringBundler(5);
[echo] + }
[echo] +
[echo] + query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_S_GROUPID_2);
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_S_FRAGMENTCOLLECTIONID_2);
[echo] +
[echo] + query.append(_FINDER_COLUMN_G_FCI_S_STATUS_2);
[echo] +
[echo] + if (orderByComparator != null) {
[echo] appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_TABLE, orderByComparator, true);
[echo] + query, _ORDER_BY_ENTITY_ALIAS, orderByComparator);
[echo] }
[echo] - }
[echo] - else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] + else if (pagination) {
[echo] query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] +
[echo] + String sql = query.toString();
[echo] +
[echo] + Session session = null;
[echo] +
[echo] + try {
[echo] + session = openSession();
[echo] +
[echo] + Query q = session.createQuery(sql);
[echo] +
[echo] + QueryPos qPos = QueryPos.getInstance(q);
[echo] +
[echo] + qPos.add(groupId);
[echo] +
[echo] + qPos.add(fragmentCollectionId);
[echo] +
[echo] + qPos.add(status);
[echo] +
[echo] + if (!pagination) {
[echo] + list = (List<FragmentEntry>)QueryUtil.list(
[echo] + q, getDialect(), start, end, false);
[echo] +
[echo] + Collections.sort(list);
[echo] +
[echo] + list = Collections.unmodifiableList(list);
[echo] + }
[echo] + else {
[echo] + list = (List<FragmentEntry>)QueryUtil.list(
[echo] + q, getDialect(), start, end);
[echo] + }
[echo] +
[echo] + cacheResult(list);
[echo] +
[echo] + if (useFinderCache) {
[echo] + finderCache.putResult(finderPath, finderArgs, list);
[echo] + }
[echo] + }
[echo] + catch (Exception e) {
[echo] + if (useFinderCache) {
[echo] + finderCache.removeResult(finderPath, finderArgs);
[echo] + }
[echo] +
[echo] + throw processException(e);
[echo] }
[echo] + finally {
[echo] + closeSession(session);
[echo] + }
[echo] + }
[echo] +
[echo] + return list;
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param status the status
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry findByG_FCI_S_First(
[echo] + long groupId, long fragmentCollectionId, int status,
[echo] + OrderByComparator<FragmentEntry> orderByComparator)
[echo] + throws NoSuchEntryException {
[echo] +
[echo] + FragmentEntry fragmentEntry = fetchByG_FCI_S_First(
[echo] + groupId, fragmentCollectionId, status, orderByComparator);
[echo] +
[echo] + if (fragmentEntry != null) {
[echo] + return fragmentEntry;
[echo] + }
[echo] +
[echo] + StringBundler msg = new StringBundler(8);
[echo] +
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] +
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo] +
[echo] + msg.append(", fragmentCollectionId=");
[echo] + msg.append(fragmentCollectionId);
[echo] +
[echo] + msg.append(", status=");
[echo] + msg.append(status);
[echo] +
[echo] + msg.append("}");
[echo] +
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param status the status
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry fetchByG_FCI_S_First(
[echo] + long groupId, long fragmentCollectionId, int status,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo] +
[echo] + List<FragmentEntry> list = findByG_FCI_S(
[echo] + groupId, fragmentCollectionId, status, 0, 1, orderByComparator);
[echo] +
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] + }
[echo] +
[echo] + return null;
[echo] + }
[echo] +
[echo] + /**
[echo] + * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param status the status
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry findByG_FCI_S_Last(
[echo] + long groupId, long fragmentCollectionId, int status,
[echo] + OrderByComparator<FragmentEntry> orderByComparator)
[echo] + throws NoSuchEntryException {
[echo] +
[echo] + FragmentEntry fragmentEntry = fetchByG_FCI_S_Last(
[echo] + groupId, fragmentCollectionId, status, orderByComparator);
[echo] +
[echo] + if (fragmentEntry != null) {
[echo] + return fragmentEntry;
[echo] }
[echo]
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] + StringBundler msg = new StringBundler(8);
[echo]
[echo] - Session session = null;
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo]
[echo] - try {
[echo] - session = openSession();
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo]
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] + msg.append(", fragmentCollectionId=");
[echo] + msg.append(fragmentCollectionId);
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] + msg.append(", status=");
[echo] + msg.append(status);
[echo]
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] + msg.append("}");
[echo]
[echo] - qPos.add(groupId);
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] + }
[echo]
[echo] - qPos.add(fragmentCollectionId);
[echo] + /**
[echo] + * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param status the status
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry fetchByG_FCI_S_Last(
[echo] + long groupId, long fragmentCollectionId, int status,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - qPos.add(status);
[echo] + int count = countByG_FCI_S(groupId, fragmentCollectionId, status);
[echo]
[echo] - return (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] + if (count == 0) {
[echo] + return null;
[echo] }
[echo] - finally {
[echo] - closeSession(session);
[echo] +
[echo] + List<FragmentEntry> list = findByG_FCI_S(
[echo] + groupId, fragmentCollectionId, status, count - 1, count,
[echo] + orderByComparator);
[echo] +
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] }
[echo] +
[echo] + return null;
[echo] }
[echo]
[echo] /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] + * Returns the fragment entries before and after the current fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] *
[echo] * @param fragmentEntryId the primary key of the current fragment entry
[echo] * @param groupId the group ID
[echo] @@ -6959,17 +4973,11 @@ public class FragmentEntryPersistenceImpl
[echo] * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] */
[echo] @Override
[echo] - public FragmentEntry[] filterFindByG_FCI_S_PrevAndNext(
[echo] + public FragmentEntry[] findByG_FCI_S_PrevAndNext(
[echo] long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] int status, OrderByComparator<FragmentEntry> orderByComparator)
[echo] throws NoSuchEntryException {
[echo]
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_FCI_S_PrevAndNext(
[echo] - fragmentEntryId, groupId, fragmentCollectionId, status,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo]
[echo] Session session = null;
[echo] @@ -6979,13 +4987,13 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] FragmentEntry[] array = new FragmentEntryImpl[3];
[echo]
[echo] - array[0] = filterGetByG_FCI_S_PrevAndNext(
[echo] + array[0] = getByG_FCI_S_PrevAndNext(
[echo] session, fragmentEntry, groupId, fragmentCollectionId, status,
[echo] orderByComparator, true);
[echo]
[echo] array[1] = fragmentEntry;
[echo]
[echo] - array[2] = filterGetByG_FCI_S_PrevAndNext(
[echo] + array[2] = getByG_FCI_S_PrevAndNext(
[echo] session, fragmentEntry, groupId, fragmentCollectionId, status,
[echo] orderByComparator, false);
[echo]
[echo] @@ -6999,7 +5007,7 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo]
[echo] - protected FragmentEntry filterGetByG_FCI_S_PrevAndNext(
[echo] + protected FragmentEntry getByG_FCI_S_PrevAndNext(
[echo] Session session, FragmentEntry fragmentEntry, long groupId,
[echo] long fragmentCollectionId, int status,
[echo] OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo] @@ -7008,20 +5016,14 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] if (orderByComparator != null) {
[echo] query = new StringBundler(
[echo] - 7 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] + 6 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] (orderByComparator.getOrderByFields().length * 3));
[echo] }
[echo] else {
[echo] - query = new StringBundler(6);
[echo] + query = new StringBundler(5);
[echo] }
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] + query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo]
[echo] query.append(_FINDER_COLUMN_G_FCI_S_GROUPID_2);
[echo]
[echo] @@ -7029,11 +5031,6 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] query.append(_FINDER_COLUMN_G_FCI_S_STATUS_2);
[echo]
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] -
[echo] if (orderByComparator != null) {
[echo] String[] orderByConditionFields =
[echo] orderByComparator.getOrderByConditionFields();
[echo] @@ -7043,18 +5040,8 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] + query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] + query.append(orderByConditionFields[i]);
[echo]
[echo] if ((i + 1) < orderByConditionFields.length) {
[echo] if (orderByComparator.isAscending() ^ previous) {
[echo] @@ -7079,16 +5066,8 @@ public class FragmentEntryPersistenceImpl
[echo] String[] orderByFields = orderByComparator.getOrderByFields();
[echo]
[echo] for (int i = 0; i < orderByFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByFields[i], true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByFields[i], true));
[echo] - }
[echo] + query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] + query.append(orderByFields[i]);
[echo]
[echo] if ((i + 1) < orderByFields.length) {
[echo] if (orderByComparator.isAscending() ^ previous) {
[echo] @@ -7109,30 +5088,16 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo] else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] + query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] }
[echo]
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] + String sql = query.toString();
[echo]
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] + Query q = session.createQuery(sql);
[echo]
[echo] q.setFirstResult(0);
[echo] q.setMaxResults(2);
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] -
[echo] QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] qPos.add(groupId);
[echo] @@ -7148,340 +5113,68 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] qPos.add(orderByConditionValue);
[echo] }
[echo] - }
[echo] -
[echo] - List<FragmentEntry> list = q.list();
[echo] -
[echo] - if (list.size() == 2) {
[echo] - return list.get(1);
[echo] - }
[echo] - else {
[echo] - return null;
[echo] - }
[echo] - }
[echo] -
[echo] - /**
[echo] - * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63; from the database.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - */
[echo] - @Override
[echo] - public void removeByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status) {
[echo] -
[echo] - for (FragmentEntry fragmentEntry :
[echo] - findByG_FCI_S(
[echo] - groupId, fragmentCollectionId, status, QueryUtil.ALL_POS,
[echo] - QueryUtil.ALL_POS, null)) {
[echo] -
[echo] - remove(fragmentEntry);
[echo] - }
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the number of fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @return the number of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public int countByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status) {
[echo] -
[echo] - FinderPath finderPath = _finderPathCountByG_FCI_S;
[echo] -
[echo] - Object[] finderArgs = new Object[] {
[echo] - groupId, fragmentCollectionId, status
[echo] - };
[echo] -
[echo] - Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo] -
[echo] - if (count == null) {
[echo] - StringBundler query = new StringBundler(4);
[echo] -
[echo] - query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_STATUS_2);
[echo] -
[echo] - String sql = query.toString();
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - Query q = session.createQuery(sql);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - qPos.add(status);
[echo] -
[echo] - count = (Long)q.uniqueResult();
[echo] -
[echo] - finderCache.putResult(finderPath, finderArgs, count);
[echo] - }
[echo] - catch (Exception e) {
[echo] - finderCache.removeResult(finderPath, finderArgs);
[echo] -
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - return count.intValue();
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param status the status
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public int filterCountByG_FCI_S(
[echo] - long groupId, long fragmentCollectionId, int status) {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return countByG_FCI_S(groupId, fragmentCollectionId, status);
[echo] - }
[echo] -
[echo] - StringBundler query = new StringBundler(4);
[echo] -
[echo] - query.append(_FILTER_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_S_STATUS_2);
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - q.addScalar(
[echo] - COUNT_COLUMN_NAME, com.liferay.portal.kernel.dao.orm.Type.LONG);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - qPos.add(status);
[echo] -
[echo] - Long count = (Long)q.uniqueResult();
[echo] -
[echo] - return count.intValue();
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_S_GROUPID_2 =
[echo] - "fragmentEntry.groupId = ? AND ";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_S_FRAGMENTCOLLECTIONID_2 =
[echo] - "fragmentEntry.fragmentCollectionId = ? AND ";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_S_STATUS_2 =
[echo] - "fragmentEntry.status = ?";
[echo] -
[echo] - private FinderPath _finderPathWithPaginationFindByG_FCI_LikeN_S;
[echo] - private FinderPath _finderPathWithPaginationCountByG_FCI_LikeN_S;
[echo] -
[echo] - /**
[echo] - * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @return the matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status) {
[echo] -
[echo] - return findByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status, QueryUtil.ALL_POS,
[echo] - QueryUtil.ALL_POS, null);
[echo] - }
[echo] + }
[echo]
[echo] - /**
[echo] - * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status,
[echo] - int start, int end) {
[echo] + List<FragmentEntry> list = q.list();
[echo]
[echo] - return findByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status, start, end, null);
[echo] + if (list.size() == 2) {
[echo] + return list.get(1);
[echo] + }
[echo] + else {
[echo] + return null;
[echo] + }
[echo] }
[echo]
[echo] /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] + * Removes all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63; from the database.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> findByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status,
[echo] - int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] + public void removeByG_FCI_S(
[echo] + long groupId, long fragmentCollectionId, int status) {
[echo]
[echo] - return findByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status, start, end,
[echo] - orderByComparator, true);
[echo] + for (FragmentEntry fragmentEntry :
[echo] + findByG_FCI_S(
[echo] + groupId, fragmentCollectionId, status, QueryUtil.ALL_POS,
[echo] + QueryUtil.ALL_POS, null)) {
[echo] +
[echo] + remove(fragmentEntry);
[echo] + }
[echo] }
[echo]
[echo] /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] + * Returns the number of fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @param useFinderCache whether to use the finder cache
[echo] - * @return the ordered range of matching fragment entries
[echo] + * @return the number of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> findByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status,
[echo] - int start, int end, OrderByComparator<FragmentEntry> orderByComparator,
[echo] - boolean useFinderCache) {
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] + public int countByG_FCI_S(
[echo] + long groupId, long fragmentCollectionId, int status) {
[echo]
[echo] - boolean pagination = true;
[echo] - FinderPath finderPath = null;
[echo] - Object[] finderArgs = null;
[echo] + FinderPath finderPath = _finderPathCountByG_FCI_S;
[echo]
[echo] - finderPath = _finderPathWithPaginationFindByG_FCI_LikeN_S;
[echo] - finderArgs = new Object[] {
[echo] - groupId, fragmentCollectionId, name, status, start, end,
[echo] - orderByComparator
[echo] + Object[] finderArgs = new Object[] {
[echo] + groupId, fragmentCollectionId, status
[echo] };
[echo]
[echo] - List<FragmentEntry> list = null;
[echo] -
[echo] - if (useFinderCache) {
[echo] - list = (List<FragmentEntry>)finderCache.getResult(
[echo] - finderPath, finderArgs, this);
[echo] -
[echo] - if ((list != null) && !list.isEmpty()) {
[echo] - for (FragmentEntry fragmentEntry : list) {
[echo] - if ((groupId != fragmentEntry.getGroupId()) ||
[echo] - (fragmentCollectionId !=
[echo] - fragmentEntry.getFragmentCollectionId()) ||
[echo] - !StringUtil.wildcardMatches(
[echo] - fragmentEntry.getName(), name, '_', '%', '\\',
[echo] - true) ||
[echo] - (status != fragmentEntry.getStatus())) {
[echo] -
[echo] - list = null;
[echo] -
[echo] - break;
[echo] - }
[echo] - }
[echo] - }
[echo] - }
[echo] -
[echo] - if (list == null) {
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 6 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(6);
[echo] - }
[echo] -
[echo] - query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_FRAGMENTCOLLECTIONID_2);
[echo] + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo]
[echo] - boolean bindName = false;
[echo] + if (count == null) {
[echo] + StringBundler query = new StringBundler(4);
[echo]
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] + query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_2);
[echo] - }
[echo] + query.append(_FINDER_COLUMN_G_FCI_S_GROUPID_2);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_STATUS_2);
[echo] + query.append(_FINDER_COLUMN_G_FCI_S_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] - if (orderByComparator != null) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator);
[echo] - }
[echo] - else if (pagination) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] + query.append(_FINDER_COLUMN_G_FCI_S_STATUS_2);
[echo]
[echo] String sql = query.toString();
[echo]
[echo] @@ -7498,35 +5191,14 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] qPos.add(fragmentCollectionId);
[echo]
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] -
[echo] qPos.add(status);
[echo]
[echo] - if (!pagination) {
[echo] - list = (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end, false);
[echo] -
[echo] - Collections.sort(list);
[echo] -
[echo] - list = Collections.unmodifiableList(list);
[echo] - }
[echo] - else {
[echo] - list = (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] -
[echo] - cacheResult(list);
[echo] + count = (Long)q.uniqueResult();
[echo]
[echo] - if (useFinderCache) {
[echo] - finderCache.putResult(finderPath, finderArgs, list);
[echo] - }
[echo] + finderCache.putResult(finderPath, finderArgs, count);
[echo] }
[echo] catch (Exception e) {
[echo] - if (useFinderCache) {
[echo] - finderCache.removeResult(finderPath, finderArgs);
[echo] - }
[echo] + finderCache.removeResult(finderPath, finderArgs);
[echo]
[echo] throw processException(e);
[echo] }
[echo] @@ -7535,515 +5207,393 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo]
[echo] - return list;
[echo] + return count.intValue();
[echo] }
[echo]
[echo] - /**
[echo] - * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry findByG_FCI_LikeN_S_First(
[echo] - long groupId, long fragmentCollectionId, String name, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = fetchByG_FCI_LikeN_S_First(
[echo] - groupId, fragmentCollectionId, name, status, orderByComparator);
[echo] -
[echo] - if (fragmentEntry != null) {
[echo] - return fragmentEntry;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(10);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", fragmentCollectionId=");
[echo] - msg.append(fragmentCollectionId);
[echo] -
[echo] - msg.append(", nameLIKE");
[echo] - msg.append(name);
[echo] + private static final String _FINDER_COLUMN_G_FCI_S_GROUPID_2 =
[echo] + "fragmentEntry.groupId = ? AND ";
[echo]
[echo] - msg.append(", status=");
[echo] - msg.append(status);
[echo] + private static final String _FINDER_COLUMN_G_FCI_S_FRAGMENTCOLLECTIONID_2 =
[echo] + "fragmentEntry.fragmentCollectionId = ? AND ";
[echo]
[echo] - msg.append("}");
[echo] + private static final String _FINDER_COLUMN_G_FCI_S_STATUS_2 =
[echo] + "fragmentEntry.status = ?";
[echo]
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] - }
[echo] + private FinderPath _finderPathWithPaginationFindByG_FCI_LikeN_S;
[echo] + private FinderPath _finderPathWithPaginationCountByG_FCI_LikeN_S;
[echo]
[echo] /**
[echo] - * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] + * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param name the name
[echo] * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + * @return the matching fragment entries
[echo] */
[echo] @Override
[echo] - public FragmentEntry fetchByG_FCI_LikeN_S_First(
[echo] - long groupId, long fragmentCollectionId, String name, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - List<FragmentEntry> list = findByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status, 0, 1,
[echo] - orderByComparator);
[echo] -
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] + public List<FragmentEntry> findByG_FCI_LikeN_S(
[echo] + long groupId, long fragmentCollectionId, String name, int status) {
[echo]
[echo] - return null;
[echo] + return findByG_FCI_LikeN_S(
[echo] + groupId, fragmentCollectionId, name, status, QueryUtil.ALL_POS,
[echo] + QueryUtil.ALL_POS, null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] + * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] + *
[echo] + * <p>
[echo] + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] + * </p>
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param name the name
[echo] * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] + * @param start the lower bound of the range of fragment entries
[echo] + * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] + * @return the range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public FragmentEntry findByG_FCI_LikeN_S_Last(
[echo] - long groupId, long fragmentCollectionId, String name, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = fetchByG_FCI_LikeN_S_Last(
[echo] - groupId, fragmentCollectionId, name, status, orderByComparator);
[echo] -
[echo] - if (fragmentEntry != null) {
[echo] - return fragmentEntry;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(10);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", fragmentCollectionId=");
[echo] - msg.append(fragmentCollectionId);
[echo] -
[echo] - msg.append(", nameLIKE");
[echo] - msg.append(name);
[echo] -
[echo] - msg.append(", status=");
[echo] - msg.append(status);
[echo] -
[echo] - msg.append("}");
[echo] + public List<FragmentEntry> findByG_FCI_LikeN_S(
[echo] + long groupId, long fragmentCollectionId, String name, int status,
[echo] + int start, int end) {
[echo]
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] + return findByG_FCI_LikeN_S(
[echo] + groupId, fragmentCollectionId, name, status, start, end, null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] + *
[echo] + * <p>
[echo] + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] + * </p>
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param name the name
[echo] * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + * @param start the lower bound of the range of fragment entries
[echo] + * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] + * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public FragmentEntry fetchByG_FCI_LikeN_S_Last(
[echo] + public List<FragmentEntry> findByG_FCI_LikeN_S(
[echo] long groupId, long fragmentCollectionId, String name, int status,
[echo] + int start, int end,
[echo] OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - int count = countByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status);
[echo] -
[echo] - if (count == 0) {
[echo] - return null;
[echo] - }
[echo] -
[echo] - List<FragmentEntry> list = findByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status, count - 1, count,
[echo] - orderByComparator);
[echo] -
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] -
[echo] - return null;
[echo] + return findByG_FCI_LikeN_S(
[echo] + groupId, fragmentCollectionId, name, status, start, end,
[echo] + orderByComparator, true);
[echo] }
[echo]
[echo] /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] + *
[echo] + * <p>
[echo] + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] + * </p>
[echo] *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param name the name
[echo] * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] + * @param start the lower bound of the range of fragment entries
[echo] + * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] + * @param useFinderCache whether to use the finder cache
[echo] + * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public FragmentEntry[] findByG_FCI_LikeN_S_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - String name, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] + public List<FragmentEntry> findByG_FCI_LikeN_S(
[echo] + long groupId, long fragmentCollectionId, String name, int status,
[echo] + int start, int end, OrderByComparator<FragmentEntry> orderByComparator,
[echo] + boolean useFinderCache) {
[echo]
[echo] name = Objects.toString(name, "");
[echo]
[echo] - FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - FragmentEntry[] array = new FragmentEntryImpl[3];
[echo] -
[echo] - array[0] = getByG_FCI_LikeN_S_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, name,
[echo] - status, orderByComparator, true);
[echo] + boolean pagination = true;
[echo] + FinderPath finderPath = null;
[echo] + Object[] finderArgs = null;
[echo]
[echo] - array[1] = fragmentEntry;
[echo] + finderPath = _finderPathWithPaginationFindByG_FCI_LikeN_S;
[echo] + finderArgs = new Object[] {
[echo] + groupId, fragmentCollectionId, name, status, start, end,
[echo] + orderByComparator
[echo] + };
[echo]
[echo] - array[2] = getByG_FCI_LikeN_S_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, name,
[echo] - status, orderByComparator, false);
[echo] + List<FragmentEntry> list = null;
[echo]
[echo] - return array;
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] + if (useFinderCache) {
[echo] + list = (List<FragmentEntry>)finderCache.getResult(
[echo] + finderPath, finderArgs, this);
[echo]
[echo] - protected FragmentEntry getByG_FCI_LikeN_S_PrevAndNext(
[echo] - Session session, FragmentEntry fragmentEntry, long groupId,
[echo] - long fragmentCollectionId, String name, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo] + if ((list != null) && !list.isEmpty()) {
[echo] + for (FragmentEntry fragmentEntry : list) {
[echo] + if ((groupId != fragmentEntry.getGroupId()) ||
[echo] + (fragmentCollectionId !=
[echo] + fragmentEntry.getFragmentCollectionId()) ||
[echo] + !StringUtil.wildcardMatches(
[echo] + fragmentEntry.getName(), name, '_', '%', '\\',
[echo] + true) ||
[echo] + (status != fragmentEntry.getStatus())) {
[echo]
[echo] - StringBundler query = null;
[echo] + list = null;
[echo]
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 7 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] - (orderByComparator.getOrderByFields().length * 3));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(6);
[echo] + break;
[echo] + }
[echo] + }
[echo] + }
[echo] }
[echo]
[echo] - query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_GROUPID_2);
[echo] + if (list == null) {
[echo] + StringBundler query = null;
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_FRAGMENTCOLLECTIONID_2);
[echo] + if (orderByComparator != null) {
[echo] + query = new StringBundler(
[echo] + 6 + (orderByComparator.getOrderByFields().length * 2));
[echo] + }
[echo] + else {
[echo] + query = new StringBundler(6);
[echo] + }
[echo]
[echo] - boolean bindName = false;
[echo] + query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_GROUPID_2);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_2);
[echo] - }
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_STATUS_2);
[echo] + boolean bindName = false;
[echo]
[echo] - if (orderByComparator != null) {
[echo] - String[] orderByConditionFields =
[echo] - orderByComparator.getOrderByConditionFields();
[echo] + if (name.isEmpty()) {
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_3);
[echo] + }
[echo] + else {
[echo] + bindName = true;
[echo]
[echo] - if (orderByConditionFields.length > 0) {
[echo] - query.append(WHERE_AND);
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_2);
[echo] }
[echo]
[echo] - for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] - query.append(orderByConditionFields[i]);
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_STATUS_2);
[echo]
[echo] - if ((i + 1) < orderByConditionFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN);
[echo] - }
[echo] - }
[echo] + if (orderByComparator != null) {
[echo] + appendOrderByComparator(
[echo] + query, _ORDER_BY_ENTITY_ALIAS, orderByComparator);
[echo] + }
[echo] + else if (pagination) {
[echo] + query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] }
[echo]
[echo] - query.append(ORDER_BY_CLAUSE);
[echo] + String sql = query.toString();
[echo]
[echo] - String[] orderByFields = orderByComparator.getOrderByFields();
[echo] + Session session = null;
[echo]
[echo] - for (int i = 0; i < orderByFields.length; i++) {
[echo] - query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] - query.append(orderByFields[i]);
[echo] + try {
[echo] + session = openSession();
[echo]
[echo] - if ((i + 1) < orderByFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC_HAS_NEXT);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC);
[echo] - }
[echo] - }
[echo] - }
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] + Query q = session.createQuery(sql);
[echo]
[echo] - String sql = query.toString();
[echo] + QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] - Query q = session.createQuery(sql);
[echo] + qPos.add(groupId);
[echo]
[echo] - q.setFirstResult(0);
[echo] - q.setMaxResults(2);
[echo] + qPos.add(fragmentCollectionId);
[echo]
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] + if (bindName) {
[echo] + qPos.add(name);
[echo] + }
[echo]
[echo] - qPos.add(groupId);
[echo] + qPos.add(status);
[echo]
[echo] - qPos.add(fragmentCollectionId);
[echo] + if (!pagination) {
[echo] + list = (List<FragmentEntry>)QueryUtil.list(
[echo] + q, getDialect(), start, end, false);
[echo]
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] + Collections.sort(list);
[echo]
[echo] - qPos.add(status);
[echo] + list = Collections.unmodifiableList(list);
[echo] + }
[echo] + else {
[echo] + list = (List<FragmentEntry>)QueryUtil.list(
[echo] + q, getDialect(), start, end);
[echo] + }
[echo]
[echo] - if (orderByComparator != null) {
[echo] - for (Object orderByConditionValue :
[echo] - orderByComparator.getOrderByConditionValues(
[echo] - fragmentEntry)) {
[echo] + cacheResult(list);
[echo]
[echo] - qPos.add(orderByConditionValue);
[echo] + if (useFinderCache) {
[echo] + finderCache.putResult(finderPath, finderArgs, list);
[echo] + }
[echo] }
[echo] - }
[echo] -
[echo] - List<FragmentEntry> list = q.list();
[echo] + catch (Exception e) {
[echo] + if (useFinderCache) {
[echo] + finderCache.removeResult(finderPath, finderArgs);
[echo] + }
[echo]
[echo] - if (list.size() == 2) {
[echo] - return list.get(1);
[echo] - }
[echo] - else {
[echo] - return null;
[echo] + throw processException(e);
[echo] + }
[echo] + finally {
[echo] + closeSession(session);
[echo] + }
[echo] }
[echo] +
[echo] + return list;
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] + * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param name the name
[echo] * @param status the status
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status) {
[echo] + public FragmentEntry findByG_FCI_LikeN_S_First(
[echo] + long groupId, long fragmentCollectionId, String name, int status,
[echo] + OrderByComparator<FragmentEntry> orderByComparator)
[echo] + throws NoSuchEntryException {
[echo]
[echo] - return filterFindByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status, QueryUtil.ALL_POS,
[echo] - QueryUtil.ALL_POS, null);
[echo] + FragmentEntry fragmentEntry = fetchByG_FCI_LikeN_S_First(
[echo] + groupId, fragmentCollectionId, name, status, orderByComparator);
[echo] +
[echo] + if (fragmentEntry != null) {
[echo] + return fragmentEntry;
[echo] + }
[echo] +
[echo] + StringBundler msg = new StringBundler(10);
[echo] +
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] +
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo] +
[echo] + msg.append(", fragmentCollectionId=");
[echo] + msg.append(fragmentCollectionId);
[echo] +
[echo] + msg.append(", nameLIKE");
[echo] + msg.append(name);
[echo] +
[echo] + msg.append(", status=");
[echo] + msg.append(status);
[echo] +
[echo] + msg.append("}");
[echo] +
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] }
[echo]
[echo] /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] + * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param name the name
[echo] * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_LikeN_S(
[echo] + public FragmentEntry fetchByG_FCI_LikeN_S_First(
[echo] long groupId, long fragmentCollectionId, String name, int status,
[echo] - int start, int end) {
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - return filterFindByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status, start, end, null);
[echo] + List<FragmentEntry> list = findByG_FCI_LikeN_S(
[echo] + groupId, fragmentCollectionId, name, status, 0, 1,
[echo] + orderByComparator);
[echo] +
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] + }
[echo] +
[echo] + return null;
[echo] }
[echo]
[echo] /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] + * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param name the name
[echo] * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status,
[echo] - int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status, start, end,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 6 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(7);
[echo] - }
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - boolean bindName = false;
[echo] + public FragmentEntry findByG_FCI_LikeN_S_Last(
[echo] + long groupId, long fragmentCollectionId, String name, int status,
[echo] + OrderByComparator<FragmentEntry> orderByComparator)
[echo] + throws NoSuchEntryException {
[echo]
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] + FragmentEntry fragmentEntry = fetchByG_FCI_LikeN_S_Last(
[echo] + groupId, fragmentCollectionId, name, status, orderByComparator);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_2);
[echo] + if (fragmentEntry != null) {
[echo] + return fragmentEntry;
[echo] }
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_STATUS_2);
[echo] -
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] + StringBundler msg = new StringBundler(10);
[echo]
[echo] - if (orderByComparator != null) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true);
[echo] - }
[echo] - else {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_TABLE, orderByComparator, true);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] - }
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo]
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo]
[echo] - Session session = null;
[echo] + msg.append(", fragmentCollectionId=");
[echo] + msg.append(fragmentCollectionId);
[echo]
[echo] - try {
[echo] - session = openSession();
[echo] + msg.append(", nameLIKE");
[echo] + msg.append(name);
[echo]
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] + msg.append(", status=");
[echo] + msg.append(status);
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] + msg.append("}");
[echo]
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] + }
[echo]
[echo] - qPos.add(groupId);
[echo] + /**
[echo] + * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param name the name
[echo] + * @param status the status
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry fetchByG_FCI_LikeN_S_Last(
[echo] + long groupId, long fragmentCollectionId, String name, int status,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - qPos.add(fragmentCollectionId);
[echo] + int count = countByG_FCI_LikeN_S(
[echo] + groupId, fragmentCollectionId, name, status);
[echo]
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] + if (count == 0) {
[echo] + return null;
[echo] + }
[echo]
[echo] - qPos.add(status);
[echo] + List<FragmentEntry> list = findByG_FCI_LikeN_S(
[echo] + groupId, fragmentCollectionId, name, status, count - 1, count,
[echo] + orderByComparator);
[echo]
[echo] - return (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] }
[echo] +
[echo] + return null;
[echo] }
[echo]
[echo] /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] + * Returns the fragment entries before and after the current fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] *
[echo] * @param fragmentEntryId the primary key of the current fragment entry
[echo] * @param groupId the group ID
[echo] @@ -8055,18 +5605,12 @@ public class FragmentEntryPersistenceImpl
[echo] * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] */
[echo] @Override
[echo] - public FragmentEntry[] filterFindByG_FCI_LikeN_S_PrevAndNext(
[echo] + public FragmentEntry[] findByG_FCI_LikeN_S_PrevAndNext(
[echo] long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] String name, int status,
[echo] OrderByComparator<FragmentEntry> orderByComparator)
[echo] throws NoSuchEntryException {
[echo]
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_FCI_LikeN_S_PrevAndNext(
[echo] - fragmentEntryId, groupId, fragmentCollectionId, name, status,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] name = Objects.toString(name, "");
[echo]
[echo] FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo] @@ -8078,13 +5622,13 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] FragmentEntry[] array = new FragmentEntryImpl[3];
[echo]
[echo] - array[0] = filterGetByG_FCI_LikeN_S_PrevAndNext(
[echo] + array[0] = getByG_FCI_LikeN_S_PrevAndNext(
[echo] session, fragmentEntry, groupId, fragmentCollectionId, name,
[echo] status, orderByComparator, true);
[echo]
[echo] array[1] = fragmentEntry;
[echo]
[echo] - array[2] = filterGetByG_FCI_LikeN_S_PrevAndNext(
[echo] + array[2] = getByG_FCI_LikeN_S_PrevAndNext(
[echo] session, fragmentEntry, groupId, fragmentCollectionId, name,
[echo] status, orderByComparator, false);
[echo]
[echo] @@ -8098,7 +5642,7 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo]
[echo] - protected FragmentEntry filterGetByG_FCI_LikeN_S_PrevAndNext(
[echo] + protected FragmentEntry getByG_FCI_LikeN_S_PrevAndNext(
[echo] Session session, FragmentEntry fragmentEntry, long groupId,
[echo] long fragmentCollectionId, String name, int status,
[echo] OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo] @@ -8107,20 +5651,14 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] if (orderByComparator != null) {
[echo] query = new StringBundler(
[echo] - 8 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] + 7 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] (orderByComparator.getOrderByFields().length * 3));
[echo] }
[echo] else {
[echo] - query = new StringBundler(7);
[echo] + query = new StringBundler(6);
[echo] }
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] + query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo]
[echo] query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_GROUPID_2);
[echo]
[echo] @@ -8139,11 +5677,6 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_STATUS_2);
[echo]
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] -
[echo] if (orderByComparator != null) {
[echo] String[] orderByConditionFields =
[echo] orderByComparator.getOrderByConditionFields();
[echo] @@ -8153,18 +5686,8 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] + query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] + query.append(orderByConditionFields[i]);
[echo]
[echo] if ((i + 1) < orderByConditionFields.length) {
[echo] if (orderByComparator.isAscending() ^ previous) {
[echo] @@ -8189,16 +5712,8 @@ public class FragmentEntryPersistenceImpl
[echo] String[] orderByFields = orderByComparator.getOrderByFields();
[echo]
[echo] for (int i = 0; i < orderByFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByFields[i], true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByFields[i], true));
[echo] - }
[echo] + query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] + query.append(orderByFields[i]);
[echo]
[echo] if ((i + 1) < orderByFields.length) {
[echo] if (orderByComparator.isAscending() ^ previous) {
[echo] @@ -8219,30 +5734,16 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo] else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] + query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] }
[echo]
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] + String sql = query.toString();
[echo]
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] + Query q = session.createQuery(sql);
[echo]
[echo] q.setFirstResult(0);
[echo] q.setMaxResults(2);
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] -
[echo] QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] qPos.add(groupId);
[echo] @@ -8301,349 +5802,45 @@ public class FragmentEntryPersistenceImpl
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param name the name
[echo] - * @param status the status
[echo] - * @return the number of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public int countByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status) {
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] -
[echo] - FinderPath finderPath = _finderPathWithPaginationCountByG_FCI_LikeN_S;
[echo] -
[echo] - Object[] finderArgs = new Object[] {
[echo] - groupId, fragmentCollectionId, name, status
[echo] - };
[echo] -
[echo] - Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo] -
[echo] - if (count == null) {
[echo] - StringBundler query = new StringBundler(5);
[echo] -
[echo] - query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - boolean bindName = false;
[echo] -
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_2);
[echo] - }
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_STATUS_2);
[echo] -
[echo] - String sql = query.toString();
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - Query q = session.createQuery(sql);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] -
[echo] - qPos.add(status);
[echo] -
[echo] - count = (Long)q.uniqueResult();
[echo] -
[echo] - finderCache.putResult(finderPath, finderArgs, count);
[echo] - }
[echo] - catch (Exception e) {
[echo] - finderCache.removeResult(finderPath, finderArgs);
[echo] -
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - return count.intValue();
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and name LIKE &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param name the name
[echo] - * @param status the status
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public int filterCountByG_FCI_LikeN_S(
[echo] - long groupId, long fragmentCollectionId, String name, int status) {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return countByG_FCI_LikeN_S(
[echo] - groupId, fragmentCollectionId, name, status);
[echo] - }
[echo] -
[echo] - name = Objects.toString(name, "");
[echo] -
[echo] - StringBundler query = new StringBundler(5);
[echo] -
[echo] - query.append(_FILTER_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - boolean bindName = false;
[echo] -
[echo] - if (name.isEmpty()) {
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_3);
[echo] - }
[echo] - else {
[echo] - bindName = true;
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_2);
[echo] - }
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_STATUS_2);
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - q.addScalar(
[echo] - COUNT_COLUMN_NAME, com.liferay.portal.kernel.dao.orm.Type.LONG);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - if (bindName) {
[echo] - qPos.add(name);
[echo] - }
[echo] -
[echo] - qPos.add(status);
[echo] -
[echo] - Long count = (Long)q.uniqueResult();
[echo] -
[echo] - return count.intValue();
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_LIKEN_S_GROUPID_2 =
[echo] - "fragmentEntry.groupId = ? AND ";
[echo] -
[echo] - private static final String
[echo] - _FINDER_COLUMN_G_FCI_LIKEN_S_FRAGMENTCOLLECTIONID_2 =
[echo] - "fragmentEntry.fragmentCollectionId = ? AND ";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_LIKEN_S_NAME_2 =
[echo] - "fragmentEntry.name LIKE ? AND ";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_LIKEN_S_NAME_3 =
[echo] - "(fragmentEntry.name IS NULL OR fragmentEntry.name LIKE '') AND ";
[echo] -
[echo] - private static final String _FINDER_COLUMN_G_FCI_LIKEN_S_STATUS_2 =
[echo] - "fragmentEntry.status = ?";
[echo] -
[echo] - private FinderPath _finderPathWithPaginationFindByG_FCI_T_S;
[echo] - private FinderPath _finderPathWithoutPaginationFindByG_FCI_T_S;
[echo] - private FinderPath _finderPathCountByG_FCI_T_S;
[echo] -
[echo] - /**
[echo] - * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @return the matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status) {
[echo] -
[echo] - return findByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status, QueryUtil.ALL_POS,
[echo] - QueryUtil.ALL_POS, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status,
[echo] - int start, int end) {
[echo] -
[echo] - return findByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status, start, end, null);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries
[echo] - */
[echo] - @Override
[echo] - public List<FragmentEntry> findByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status,
[echo] - int start, int end,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - return findByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status, start, end,
[echo] - orderByComparator, true);
[echo] - }
[echo] -
[echo] - /**
[echo] - * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @param useFinderCache whether to use the finder cache
[echo] - * @return the ordered range of matching fragment entries
[echo] + * @param status the status
[echo] + * @return the number of matching fragment entries
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> findByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status,
[echo] - int start, int end, OrderByComparator<FragmentEntry> orderByComparator,
[echo] - boolean useFinderCache) {
[echo] -
[echo] - boolean pagination = true;
[echo] - FinderPath finderPath = null;
[echo] - Object[] finderArgs = null;
[echo] + public int countByG_FCI_LikeN_S(
[echo] + long groupId, long fragmentCollectionId, String name, int status) {
[echo]
[echo] - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
[echo] - (orderByComparator == null)) {
[echo] + name = Objects.toString(name, "");
[echo]
[echo] - pagination = false;
[echo] + FinderPath finderPath = _finderPathWithPaginationCountByG_FCI_LikeN_S;
[echo]
[echo] - if (useFinderCache) {
[echo] - finderPath = _finderPathWithoutPaginationFindByG_FCI_T_S;
[echo] - finderArgs = new Object[] {
[echo] - groupId, fragmentCollectionId, type, status
[echo] - };
[echo] - }
[echo] - }
[echo] - else if (useFinderCache) {
[echo] - finderPath = _finderPathWithPaginationFindByG_FCI_T_S;
[echo] - finderArgs = new Object[] {
[echo] - groupId, fragmentCollectionId, type, status, start, end,
[echo] - orderByComparator
[echo] - };
[echo] - }
[echo] + Object[] finderArgs = new Object[] {
[echo] + groupId, fragmentCollectionId, name, status
[echo] + };
[echo]
[echo] - List<FragmentEntry> list = null;
[echo] + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
[echo]
[echo] - if (useFinderCache) {
[echo] - list = (List<FragmentEntry>)finderCache.getResult(
[echo] - finderPath, finderArgs, this);
[echo] + if (count == null) {
[echo] + StringBundler query = new StringBundler(5);
[echo]
[echo] - if ((list != null) && !list.isEmpty()) {
[echo] - for (FragmentEntry fragmentEntry : list) {
[echo] - if ((groupId != fragmentEntry.getGroupId()) ||
[echo] - (fragmentCollectionId !=
[echo] - fragmentEntry.getFragmentCollectionId()) ||
[echo] - (type != fragmentEntry.getType()) ||
[echo] - (status != fragmentEntry.getStatus())) {
[echo] + query.append(_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - list = null;
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_GROUPID_2);
[echo]
[echo] - break;
[echo] - }
[echo] - }
[echo] - }
[echo] - }
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] - if (list == null) {
[echo] - StringBundler query = null;
[echo] + boolean bindName = false;
[echo]
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 6 + (orderByComparator.getOrderByFields().length * 2));
[echo] + if (name.isEmpty()) {
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_3);
[echo] }
[echo] else {
[echo] - query = new StringBundler(6);
[echo] - }
[echo] -
[echo] - query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_TYPE_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_STATUS_2);
[echo] + bindName = true;
[echo]
[echo] - if (orderByComparator != null) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator);
[echo] - }
[echo] - else if (pagination) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_NAME_2);
[echo] }
[echo]
[echo] + query.append(_FINDER_COLUMN_G_FCI_LIKEN_S_STATUS_2);
[echo] +
[echo] String sql = query.toString();
[echo]
[echo] Session session = null;
[echo] @@ -8659,33 +5856,18 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] qPos.add(fragmentCollectionId);
[echo]
[echo] - qPos.add(type);
[echo] + if (bindName) {
[echo] + qPos.add(name);
[echo] + }
[echo]
[echo] qPos.add(status);
[echo]
[echo] - if (!pagination) {
[echo] - list = (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end, false);
[echo] -
[echo] - Collections.sort(list);
[echo] -
[echo] - list = Collections.unmodifiableList(list);
[echo] - }
[echo] - else {
[echo] - list = (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] -
[echo] - cacheResult(list);
[echo] + count = (Long)q.uniqueResult();
[echo]
[echo] - if (useFinderCache) {
[echo] - finderCache.putResult(finderPath, finderArgs, list);
[echo] - }
[echo] + finderCache.putResult(finderPath, finderArgs, count);
[echo] }
[echo] catch (Exception e) {
[echo] - if (useFinderCache) {
[echo] - finderCache.removeResult(finderPath, finderArgs);
[echo] - }
[echo] + finderCache.removeResult(finderPath, finderArgs);
[echo]
[echo] throw processException(e);
[echo] }
[echo] @@ -8694,489 +5876,400 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo]
[echo] - return list;
[echo] + return count.intValue();
[echo] }
[echo]
[echo] + private static final String _FINDER_COLUMN_G_FCI_LIKEN_S_GROUPID_2 =
[echo] + "fragmentEntry.groupId = ? AND ";
[echo] +
[echo] + private static final String
[echo] + _FINDER_COLUMN_G_FCI_LIKEN_S_FRAGMENTCOLLECTIONID_2 =
[echo] + "fragmentEntry.fragmentCollectionId = ? AND ";
[echo] +
[echo] + private static final String _FINDER_COLUMN_G_FCI_LIKEN_S_NAME_2 =
[echo] + "fragmentEntry.name LIKE ? AND ";
[echo] +
[echo] + private static final String _FINDER_COLUMN_G_FCI_LIKEN_S_NAME_3 =
[echo] + "(fragmentEntry.name IS NULL OR fragmentEntry.name LIKE '') AND ";
[echo] +
[echo] + private static final String _FINDER_COLUMN_G_FCI_LIKEN_S_STATUS_2 =
[echo] + "fragmentEntry.status = ?";
[echo] +
[echo] + private FinderPath _finderPathWithPaginationFindByG_FCI_T_S;
[echo] + private FinderPath _finderPathWithoutPaginationFindByG_FCI_T_S;
[echo] + private FinderPath _finderPathCountByG_FCI_T_S;
[echo] +
[echo] /**
[echo] - * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] + * Returns all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param type the type
[echo] * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] + * @return the matching fragment entries
[echo] */
[echo] @Override
[echo] - public FragmentEntry findByG_FCI_T_S_First(
[echo] - long groupId, long fragmentCollectionId, int type, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = fetchByG_FCI_T_S_First(
[echo] - groupId, fragmentCollectionId, type, status, orderByComparator);
[echo] -
[echo] - if (fragmentEntry != null) {
[echo] - return fragmentEntry;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(10);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", fragmentCollectionId=");
[echo] - msg.append(fragmentCollectionId);
[echo] -
[echo] - msg.append(", type=");
[echo] - msg.append(type);
[echo] -
[echo] - msg.append(", status=");
[echo] - msg.append(status);
[echo] -
[echo] - msg.append("}");
[echo] + public List<FragmentEntry> findByG_FCI_T_S(
[echo] + long groupId, long fragmentCollectionId, int type, int status) {
[echo]
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] + return findByG_FCI_T_S(
[echo] + groupId, fragmentCollectionId, type, status, QueryUtil.ALL_POS,
[echo] + QueryUtil.ALL_POS, null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] + * Returns a range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] + *
[echo] + * <p>
[echo] + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] + * </p>
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param type the type
[echo] * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + * @param start the lower bound of the range of fragment entries
[echo] + * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] + * @return the range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public FragmentEntry fetchByG_FCI_T_S_First(
[echo] + public List<FragmentEntry> findByG_FCI_T_S(
[echo] long groupId, long fragmentCollectionId, int type, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] -
[echo] - List<FragmentEntry> list = findByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status, 0, 1,
[echo] - orderByComparator);
[echo] -
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] - }
[echo] + int start, int end) {
[echo]
[echo] - return null;
[echo] + return findByG_FCI_T_S(
[echo] + groupId, fragmentCollectionId, type, status, start, end, null);
[echo] }
[echo]
[echo] /**
[echo] - * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] + *
[echo] + * <p>
[echo] + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] + * </p>
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param type the type
[echo] * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment entry
[echo] - * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] + * @param start the lower bound of the range of fragment entries
[echo] + * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] + * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public FragmentEntry findByG_FCI_T_S_Last(
[echo] - long groupId, long fragmentCollectionId, int type, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] -
[echo] - FragmentEntry fragmentEntry = fetchByG_FCI_T_S_Last(
[echo] - groupId, fragmentCollectionId, type, status, orderByComparator);
[echo] -
[echo] - if (fragmentEntry != null) {
[echo] - return fragmentEntry;
[echo] - }
[echo] -
[echo] - StringBundler msg = new StringBundler(10);
[echo] -
[echo] - msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] -
[echo] - msg.append("groupId=");
[echo] - msg.append(groupId);
[echo] -
[echo] - msg.append(", fragmentCollectionId=");
[echo] - msg.append(fragmentCollectionId);
[echo] -
[echo] - msg.append(", type=");
[echo] - msg.append(type);
[echo] -
[echo] - msg.append(", status=");
[echo] - msg.append(status);
[echo] -
[echo] - msg.append("}");
[echo] + public List<FragmentEntry> findByG_FCI_T_S(
[echo] + long groupId, long fragmentCollectionId, int type, int status,
[echo] + int start, int end,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - throw new NoSuchEntryException(msg.toString());
[echo] + return findByG_FCI_T_S(
[echo] + groupId, fragmentCollectionId, type, status, start, end,
[echo] + orderByComparator, true);
[echo] }
[echo]
[echo] /**
[echo] - * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] + * Returns an ordered range of all the fragment entries where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] + *
[echo] + * <p>
[echo] + * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] + * </p>
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param type the type
[echo] * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] + * @param start the lower bound of the range of fragment entries
[echo] + * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] + * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] + * @param useFinderCache whether to use the finder cache
[echo] + * @return the ordered range of matching fragment entries
[echo] */
[echo] @Override
[echo] - public FragmentEntry fetchByG_FCI_T_S_Last(
[echo] + public List<FragmentEntry> findByG_FCI_T_S(
[echo] long groupId, long fragmentCollectionId, int type, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator) {
[echo] + int start, int end, OrderByComparator<FragmentEntry> orderByComparator,
[echo] + boolean useFinderCache) {
[echo]
[echo] - int count = countByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status);
[echo] + boolean pagination = true;
[echo] + FinderPath finderPath = null;
[echo] + Object[] finderArgs = null;
[echo]
[echo] - if (count == 0) {
[echo] - return null;
[echo] - }
[echo] + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
[echo] + (orderByComparator == null)) {
[echo]
[echo] - List<FragmentEntry> list = findByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status, count - 1, count,
[echo] - orderByComparator);
[echo] + pagination = false;
[echo]
[echo] - if (!list.isEmpty()) {
[echo] - return list.get(0);
[echo] + if (useFinderCache) {
[echo] + finderPath = _finderPathWithoutPaginationFindByG_FCI_T_S;
[echo] + finderArgs = new Object[] {
[echo] + groupId, fragmentCollectionId, type, status
[echo] + };
[echo] + }
[echo] + }
[echo] + else if (useFinderCache) {
[echo] + finderPath = _finderPathWithPaginationFindByG_FCI_T_S;
[echo] + finderArgs = new Object[] {
[echo] + groupId, fragmentCollectionId, type, status, start, end,
[echo] + orderByComparator
[echo] + };
[echo] }
[echo]
[echo] - return null;
[echo] - }
[echo] + List<FragmentEntry> list = null;
[echo]
[echo] - /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * @param fragmentEntryId the primary key of the current fragment entry
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] - * @return the previous, current, and next fragment entry
[echo] - * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] - */
[echo] - @Override
[echo] - public FragmentEntry[] findByG_FCI_T_S_PrevAndNext(
[echo] - long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] - int type, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator)
[echo] - throws NoSuchEntryException {
[echo] + if (useFinderCache) {
[echo] + list = (List<FragmentEntry>)finderCache.getResult(
[echo] + finderPath, finderArgs, this);
[echo]
[echo] - FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo] + if ((list != null) && !list.isEmpty()) {
[echo] + for (FragmentEntry fragmentEntry : list) {
[echo] + if ((groupId != fragmentEntry.getGroupId()) ||
[echo] + (fragmentCollectionId !=
[echo] + fragmentEntry.getFragmentCollectionId()) ||
[echo] + (type != fragmentEntry.getType()) ||
[echo] + (status != fragmentEntry.getStatus())) {
[echo]
[echo] - Session session = null;
[echo] + list = null;
[echo]
[echo] - try {
[echo] - session = openSession();
[echo] + break;
[echo] + }
[echo] + }
[echo] + }
[echo] + }
[echo]
[echo] - FragmentEntry[] array = new FragmentEntryImpl[3];
[echo] + if (list == null) {
[echo] + StringBundler query = null;
[echo]
[echo] - array[0] = getByG_FCI_T_S_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, type,
[echo] - status, orderByComparator, true);
[echo] + if (orderByComparator != null) {
[echo] + query = new StringBundler(
[echo] + 6 + (orderByComparator.getOrderByFields().length * 2));
[echo] + }
[echo] + else {
[echo] + query = new StringBundler(6);
[echo] + }
[echo]
[echo] - array[1] = fragmentEntry;
[echo] + query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo]
[echo] - array[2] = getByG_FCI_T_S_PrevAndNext(
[echo] - session, fragmentEntry, groupId, fragmentCollectionId, type,
[echo] - status, orderByComparator, false);
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_S_GROUPID_2);
[echo]
[echo] - return array;
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_S_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] - protected FragmentEntry getByG_FCI_T_S_PrevAndNext(
[echo] - Session session, FragmentEntry fragmentEntry, long groupId,
[echo] - long fragmentCollectionId, int type, int status,
[echo] - OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_S_TYPE_2);
[echo]
[echo] - StringBundler query = null;
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_S_STATUS_2);
[echo]
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 7 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] - (orderByComparator.getOrderByFields().length * 3));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(6);
[echo] - }
[echo] + if (orderByComparator != null) {
[echo] + appendOrderByComparator(
[echo] + query, _ORDER_BY_ENTITY_ALIAS, orderByComparator);
[echo] + }
[echo] + else if (pagination) {
[echo] + query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] + }
[echo]
[echo] - query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] + String sql = query.toString();
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_GROUPID_2);
[echo] + Session session = null;
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_FRAGMENTCOLLECTIONID_2);
[echo] + try {
[echo] + session = openSession();
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_TYPE_2);
[echo] + Query q = session.createQuery(sql);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_STATUS_2);
[echo] + QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] - if (orderByComparator != null) {
[echo] - String[] orderByConditionFields =
[echo] - orderByComparator.getOrderByConditionFields();
[echo] + qPos.add(groupId);
[echo]
[echo] - if (orderByConditionFields.length > 0) {
[echo] - query.append(WHERE_AND);
[echo] - }
[echo] + qPos.add(fragmentCollectionId);
[echo]
[echo] - for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] - query.append(orderByConditionFields[i]);
[echo] + qPos.add(type);
[echo]
[echo] - if ((i + 1) < orderByConditionFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN_HAS_NEXT);
[echo] - }
[echo] + qPos.add(status);
[echo] +
[echo] + if (!pagination) {
[echo] + list = (List<FragmentEntry>)QueryUtil.list(
[echo] + q, getDialect(), start, end, false);
[echo] +
[echo] + Collections.sort(list);
[echo] +
[echo] + list = Collections.unmodifiableList(list);
[echo] }
[echo] else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(WHERE_GREATER_THAN);
[echo] - }
[echo] - else {
[echo] - query.append(WHERE_LESSER_THAN);
[echo] - }
[echo] + list = (List<FragmentEntry>)QueryUtil.list(
[echo] + q, getDialect(), start, end);
[echo] }
[echo] - }
[echo]
[echo] - query.append(ORDER_BY_CLAUSE);
[echo] -
[echo] - String[] orderByFields = orderByComparator.getOrderByFields();
[echo] -
[echo] - for (int i = 0; i < orderByFields.length; i++) {
[echo] - query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] - query.append(orderByFields[i]);
[echo] + cacheResult(list);
[echo]
[echo] - if ((i + 1) < orderByFields.length) {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC_HAS_NEXT);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC_HAS_NEXT);
[echo] - }
[echo] + if (useFinderCache) {
[echo] + finderCache.putResult(finderPath, finderArgs, list);
[echo] }
[echo] - else {
[echo] - if (orderByComparator.isAscending() ^ previous) {
[echo] - query.append(ORDER_BY_ASC);
[echo] - }
[echo] - else {
[echo] - query.append(ORDER_BY_DESC);
[echo] - }
[echo] + }
[echo] + catch (Exception e) {
[echo] + if (useFinderCache) {
[echo] + finderCache.removeResult(finderPath, finderArgs);
[echo] }
[echo] +
[echo] + throw processException(e);
[echo] + }
[echo] + finally {
[echo] + closeSession(session);
[echo] }
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] }
[echo]
[echo] - String sql = query.toString();
[echo] + return list;
[echo] + }
[echo]
[echo] - Query q = session.createQuery(sql);
[echo] + /**
[echo] + * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] + *
[echo] + * @param groupId the group ID
[echo] + * @param fragmentCollectionId the fragment collection ID
[echo] + * @param type the type
[echo] + * @param status the status
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] + */
[echo] + @Override
[echo] + public FragmentEntry findByG_FCI_T_S_First(
[echo] + long groupId, long fragmentCollectionId, int type, int status,
[echo] + OrderByComparator<FragmentEntry> orderByComparator)
[echo] + throws NoSuchEntryException {
[echo]
[echo] - q.setFirstResult(0);
[echo] - q.setMaxResults(2);
[echo] + FragmentEntry fragmentEntry = fetchByG_FCI_T_S_First(
[echo] + groupId, fragmentCollectionId, type, status, orderByComparator);
[echo]
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] + if (fragmentEntry != null) {
[echo] + return fragmentEntry;
[echo] + }
[echo]
[echo] - qPos.add(groupId);
[echo] + StringBundler msg = new StringBundler(10);
[echo]
[echo] - qPos.add(fragmentCollectionId);
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo]
[echo] - qPos.add(type);
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo]
[echo] - qPos.add(status);
[echo] + msg.append(", fragmentCollectionId=");
[echo] + msg.append(fragmentCollectionId);
[echo]
[echo] - if (orderByComparator != null) {
[echo] - for (Object orderByConditionValue :
[echo] - orderByComparator.getOrderByConditionValues(
[echo] - fragmentEntry)) {
[echo] + msg.append(", type=");
[echo] + msg.append(type);
[echo]
[echo] - qPos.add(orderByConditionValue);
[echo] - }
[echo] - }
[echo] + msg.append(", status=");
[echo] + msg.append(status);
[echo]
[echo] - List<FragmentEntry> list = q.list();
[echo] + msg.append("}");
[echo]
[echo] - if (list.size() == 2) {
[echo] - return list.get(1);
[echo] - }
[echo] - else {
[echo] - return null;
[echo] - }
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] }
[echo]
[echo] /**
[echo] - * Returns all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] + * Returns the first fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param type the type
[echo] * @param status the status
[echo] - * @return the matching fragment entries that the user has permission to view
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the first matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status) {
[echo] + public FragmentEntry fetchByG_FCI_T_S_First(
[echo] + long groupId, long fragmentCollectionId, int type, int status,
[echo] + OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - return filterFindByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status, QueryUtil.ALL_POS,
[echo] - QueryUtil.ALL_POS, null);
[echo] + List<FragmentEntry> list = findByG_FCI_T_S(
[echo] + groupId, fragmentCollectionId, type, status, 0, 1,
[echo] + orderByComparator);
[echo] +
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] + }
[echo] +
[echo] + return null;
[echo] }
[echo]
[echo] /**
[echo] - * Returns a range of all the fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] + * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param type the type
[echo] * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @return the range of matching fragment entries that the user has permission to view
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment entry
[echo] + * @throws NoSuchEntryException if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status,
[echo] - int start, int end) {
[echo] + public FragmentEntry findByG_FCI_T_S_Last(
[echo] + long groupId, long fragmentCollectionId, int type, int status,
[echo] + OrderByComparator<FragmentEntry> orderByComparator)
[echo] + throws NoSuchEntryException {
[echo]
[echo] - return filterFindByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status, start, end, null);
[echo] + FragmentEntry fragmentEntry = fetchByG_FCI_T_S_Last(
[echo] + groupId, fragmentCollectionId, type, status, orderByComparator);
[echo] +
[echo] + if (fragmentEntry != null) {
[echo] + return fragmentEntry;
[echo] + }
[echo] +
[echo] + StringBundler msg = new StringBundler(10);
[echo] +
[echo] + msg.append(_NO_SUCH_ENTITY_WITH_KEY);
[echo] +
[echo] + msg.append("groupId=");
[echo] + msg.append(groupId);
[echo] +
[echo] + msg.append(", fragmentCollectionId=");
[echo] + msg.append(fragmentCollectionId);
[echo] +
[echo] + msg.append(", type=");
[echo] + msg.append(type);
[echo] +
[echo] + msg.append(", status=");
[echo] + msg.append(status);
[echo] +
[echo] + msg.append("}");
[echo] +
[echo] + throw new NoSuchEntryException(msg.toString());
[echo] }
[echo]
[echo] /**
[echo] - * Returns an ordered range of all the fragment entries that the user has permissions to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * <p>
[echo] - * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not <code>QueryUtil#ALL_POS</code>), then the query will include the default ORDER BY logic from <code>FragmentEntryModelImpl</code>. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
[echo] - * </p>
[echo] + * Returns the last fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] *
[echo] * @param groupId the group ID
[echo] * @param fragmentCollectionId the fragment collection ID
[echo] * @param type the type
[echo] * @param status the status
[echo] - * @param start the lower bound of the range of fragment entries
[echo] - * @param end the upper bound of the range of fragment entries (not inclusive)
[echo] - * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
[echo] - * @return the ordered range of matching fragment entries that the user has permission to view
[echo] + * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
[echo] + * @return the last matching fragment entry, or <code>null</code> if a matching fragment entry could not be found
[echo] */
[echo] @Override
[echo] - public List<FragmentEntry> filterFindByG_FCI_T_S(
[echo] + public FragmentEntry fetchByG_FCI_T_S_Last(
[echo] long groupId, long fragmentCollectionId, int type, int status,
[echo] - int start, int end,
[echo] OrderByComparator<FragmentEntry> orderByComparator) {
[echo]
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status, start, end,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] - StringBundler query = null;
[echo] -
[echo] - if (orderByComparator != null) {
[echo] - query = new StringBundler(
[echo] - 6 + (orderByComparator.getOrderByFields().length * 2));
[echo] - }
[echo] - else {
[echo] - query = new StringBundler(7);
[echo] - }
[echo] + int count = countByG_FCI_T_S(
[echo] + groupId, fragmentCollectionId, type, status);
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] + if (count == 0) {
[echo] + return null;
[echo] }
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_TYPE_2_SQL);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_STATUS_2);
[echo] -
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] + List<FragmentEntry> list = findByG_FCI_T_S(
[echo] + groupId, fragmentCollectionId, type, status, count - 1, count,
[echo] + orderByComparator);
[echo]
[echo] - if (orderByComparator != null) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true);
[echo] - }
[echo] - else {
[echo] - appendOrderByComparator(
[echo] - query, _ORDER_BY_ENTITY_TABLE, orderByComparator, true);
[echo] - }
[echo] - }
[echo] - else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] + if (!list.isEmpty()) {
[echo] + return list.get(0);
[echo] }
[echo]
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - qPos.add(type);
[echo] -
[echo] - qPos.add(status);
[echo] -
[echo] - return (List<FragmentEntry>)QueryUtil.list(
[echo] - q, getDialect(), start, end);
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] + return null;
[echo] }
[echo]
[echo] /**
[echo] - * Returns the fragment entries before and after the current fragment entry in the ordered set of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] + * Returns the fragment entries before and after the current fragment entry in the ordered set where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] *
[echo] * @param fragmentEntryId the primary key of the current fragment entry
[echo] * @param groupId the group ID
[echo] @@ -9188,18 +6281,12 @@ public class FragmentEntryPersistenceImpl
[echo] * @throws NoSuchEntryException if a fragment entry with the primary key could not be found
[echo] */
[echo] @Override
[echo] - public FragmentEntry[] filterFindByG_FCI_T_S_PrevAndNext(
[echo] + public FragmentEntry[] findByG_FCI_T_S_PrevAndNext(
[echo] long fragmentEntryId, long groupId, long fragmentCollectionId,
[echo] int type, int status,
[echo] OrderByComparator<FragmentEntry> orderByComparator)
[echo] throws NoSuchEntryException {
[echo]
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return findByG_FCI_T_S_PrevAndNext(
[echo] - fragmentEntryId, groupId, fragmentCollectionId, type, status,
[echo] - orderByComparator);
[echo] - }
[echo] -
[echo] FragmentEntry fragmentEntry = findByPrimaryKey(fragmentEntryId);
[echo]
[echo] Session session = null;
[echo] @@ -9209,13 +6296,13 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] FragmentEntry[] array = new FragmentEntryImpl[3];
[echo]
[echo] - array[0] = filterGetByG_FCI_T_S_PrevAndNext(
[echo] + array[0] = getByG_FCI_T_S_PrevAndNext(
[echo] session, fragmentEntry, groupId, fragmentCollectionId, type,
[echo] status, orderByComparator, true);
[echo]
[echo] array[1] = fragmentEntry;
[echo]
[echo] - array[2] = filterGetByG_FCI_T_S_PrevAndNext(
[echo] + array[2] = getByG_FCI_T_S_PrevAndNext(
[echo] session, fragmentEntry, groupId, fragmentCollectionId, type,
[echo] status, orderByComparator, false);
[echo]
[echo] @@ -9229,7 +6316,7 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo]
[echo] - protected FragmentEntry filterGetByG_FCI_T_S_PrevAndNext(
[echo] + protected FragmentEntry getByG_FCI_T_S_PrevAndNext(
[echo] Session session, FragmentEntry fragmentEntry, long groupId,
[echo] long fragmentCollectionId, int type, int status,
[echo] OrderByComparator<FragmentEntry> orderByComparator, boolean previous) {
[echo] @@ -9238,34 +6325,23 @@ public class FragmentEntryPersistenceImpl
[echo]
[echo] if (orderByComparator != null) {
[echo] query = new StringBundler(
[echo] - 8 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] + 7 + (orderByComparator.getOrderByConditionFields().length * 3) +
[echo] (orderByComparator.getOrderByFields().length * 3));
[echo] }
[echo] else {
[echo] - query = new StringBundler(7);
[echo] + query = new StringBundler(6);
[echo] }
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(_FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1);
[echo] - }
[echo] + query.append(_SQL_SELECT_FRAGMENTENTRY_WHERE);
[echo]
[echo] query.append(_FINDER_COLUMN_G_FCI_T_S_GROUPID_2);
[echo]
[echo] query.append(_FINDER_COLUMN_G_FCI_T_S_FRAGMENTCOLLECTIONID_2);
[echo]
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_TYPE_2_SQL);
[echo] + query.append(_FINDER_COLUMN_G_FCI_T_S_TYPE_2);
[echo]
[echo] query.append(_FINDER_COLUMN_G_FCI_T_S_STATUS_2);
[echo]
[echo] - if (!getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2);
[echo] - }
[echo] -
[echo] if (orderByComparator != null) {
[echo] String[] orderByConditionFields =
[echo] orderByComparator.getOrderByConditionFields();
[echo] @@ -9275,18 +6351,8 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo]
[echo] for (int i = 0; i < orderByConditionFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByConditionFields[i],
[echo] - true));
[echo] - }
[echo] + query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] + query.append(orderByConditionFields[i]);
[echo]
[echo] if ((i + 1) < orderByConditionFields.length) {
[echo] if (orderByComparator.isAscending() ^ previous) {
[echo] @@ -9311,16 +6377,8 @@ public class FragmentEntryPersistenceImpl
[echo] String[] orderByFields = orderByComparator.getOrderByFields();
[echo]
[echo] for (int i = 0; i < orderByFields.length; i++) {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_ALIAS, orderByFields[i], true));
[echo] - }
[echo] - else {
[echo] - query.append(
[echo] - getColumnName(
[echo] - _ORDER_BY_ENTITY_TABLE, orderByFields[i], true));
[echo] - }
[echo] + query.append(_ORDER_BY_ENTITY_ALIAS);
[echo] + query.append(orderByFields[i]);
[echo]
[echo] if ((i + 1) < orderByFields.length) {
[echo] if (orderByComparator.isAscending() ^ previous) {
[echo] @@ -9341,30 +6399,16 @@ public class FragmentEntryPersistenceImpl
[echo] }
[echo] }
[echo] else {
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] - }
[echo] - else {
[echo] - query.append(FragmentEntryModelImpl.ORDER_BY_SQL);
[echo] - }
[echo] + query.append(FragmentEntryModelImpl.ORDER_BY_JPQL);
[echo] }
[echo]
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] + String sql = query.toString();
[echo]
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] + Query q = session.createQuery(sql);
[echo]
[echo] q.setFirstResult(0);
[echo] q.setMaxResults(2);
[echo]
[echo] - if (getDB().isSupportsInlineDistinct()) {
[echo] - q.addEntity(_FILTER_ENTITY_ALIAS, FragmentEntryImpl.class);
[echo] - }
[echo] - else {
[echo] - q.addEntity(_FILTER_ENTITY_TABLE, FragmentEntryImpl.class);
[echo] - }
[echo] -
[echo] QueryPos qPos = QueryPos.getInstance(q);
[echo]
[echo] qPos.add(groupId);
[echo] @@ -9485,72 +6529,6 @@ public class FragmentEntryPersistenceImpl
[echo] return count.intValue();
[echo] }
[echo]
[echo] - /**
[echo] - * Returns the number of fragment entries that the user has permission to view where groupId = &#63; and fragmentCollectionId = &#63; and type = &#63; and status = &#63;.
[echo] - *
[echo] - * @param groupId the group ID
[echo] - * @param fragmentCollectionId the fragment collection ID
[echo] - * @param type the type
[echo] - * @param status the status
[echo] - * @return the number of matching fragment entries that the user has permission to view
[echo] - */
[echo] - @Override
[echo] - public int filterCountByG_FCI_T_S(
[echo] - long groupId, long fragmentCollectionId, int type, int status) {
[echo] -
[echo] - if (!InlineSQLHelperUtil.isEnabled(groupId)) {
[echo] - return countByG_FCI_T_S(
[echo] - groupId, fragmentCollectionId, type, status);
[echo] - }
[echo] -
[echo] - StringBundler query = new StringBundler(5);
[echo] -
[echo] - query.append(_FILTER_SQL_COUNT_FRAGMENTENTRY_WHERE);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_GROUPID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_FRAGMENTCOLLECTIONID_2);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_TYPE_2_SQL);
[echo] -
[echo] - query.append(_FINDER_COLUMN_G_FCI_T_S_STATUS_2);
[echo] -
[echo] - String sql = InlineSQLHelperUtil.replacePermissionCheck(
[echo] - query.toString(), FragmentEntry.class.getName(),
[echo] - _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);
[echo] -
[echo] - Session session = null;
[echo] -
[echo] - try {
[echo] - session = openSession();
[echo] -
[echo] - SQLQuery q = session.createSynchronizedSQLQuery(sql);
[echo] -
[echo] - q.addScalar(
[echo] - COUNT_COLUMN_NAME, com.liferay.portal.kernel.dao.orm.Type.LONG);
[echo] -
[echo] - QueryPos qPos = QueryPos.getInstance(q);
[echo] -
[echo] - qPos.add(groupId);
[echo] -
[echo] - qPos.add(fragmentCollectionId);
[echo] -
[echo] - qPos.add(type);
[echo] -
[echo] - qPos.add(status);
[echo] -
[echo] - Long count = (Long)q.uniqueResult();
[echo] -
[echo] - return count.intValue();
[echo] - }
[echo] - catch (Exception e) {
[echo] - throw processException(e);
[echo] - }
[echo] - finally {
[echo] - closeSession(session);
[echo] - }
[echo] - }
[echo] -
[echo] private static final String _FINDER_COLUMN_G_FCI_T_S_GROUPID_2 =
[echo] "fragmentEntry.groupId = ? AND ";
[echo]
[echo] @@ -9561,9 +6539,6 @@ public class FragmentEntryPersistenceImpl
[echo] private static final String _FINDER_COLUMN_G_FCI_T_S_TYPE_2 =
[echo] "fragmentEntry.type = ? AND ";
[echo]
[echo] - private static final String _FINDER_COLUMN_G_FCI_T_S_TYPE_2_SQL =
[echo] - "fragmentEntry.type_ = ? AND ";
[echo] -
[echo] private static final String _FINDER_COLUMN_G_FCI_T_S_STATUS_2 =
[echo] "fragmentEntry.status = ?";
[echo]
[echo] @@ -10824,31 +7799,8 @@ public class FragmentEntryPersistenceImpl
[echo] private static final String _SQL_COUNT_FRAGMENTENTRY_WHERE =
[echo] "SELECT COUNT(fragmentEntry) FROM FragmentEntry fragmentEntry WHERE ";
[echo]
[echo] - private static final String _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN =
[echo] - "fragmentEntry.fragmentEntryId";
[echo] -
[echo] - private static final String _FILTER_SQL_SELECT_FRAGMENTENTRY_WHERE =
[echo] - "SELECT DISTINCT {fragmentEntry.*} FROM FragmentEntry fragmentEntry WHERE ";
[echo] -
[echo] - private static final String
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_1 =
[echo] - "SELECT {FragmentEntry.*} FROM (SELECT DISTINCT fragmentEntry.fragmentEntryId FROM FragmentEntry fragmentEntry WHERE ";
[echo] -
[echo] - private static final String
[echo] - _FILTER_SQL_SELECT_FRAGMENTENTRY_NO_INLINE_DISTINCT_WHERE_2 =
[echo] - ") TEMP_TABLE INNER JOIN FragmentEntry ON TEMP_TABLE.fragmentEntryId = FragmentEntry.fragmentEntryId";
[echo] -
[echo] - private static final String _FILTER_SQL_COUNT_FRAGMENTENTRY_WHERE =
[echo] - "SELECT COUNT(DISTINCT fragmentEntry.fragmentEntryId) AS COUNT_VALUE FROM FragmentEntry fragmentEntry WHERE ";
[echo] -
[echo] - private static final String _FILTER_ENTITY_ALIAS = "fragmentEntry";
[echo] -
[echo] - private static final String _FILTER_ENTITY_TABLE = "FragmentEntry";
[echo] -
[echo] private static final String _ORDER_BY_ENTITY_ALIAS = "fragmentEntry.";
[echo]
[echo] - private static final String _ORDER_BY_ENTITY_TABLE = "FragmentEntry.";
[echo] -
[echo] private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY =
[echo] "No FragmentEntry exists with the primary key ";
[echo]
[echo] diff --git a/modules/apps/fragment/fragment-test/src/testIntegration/java/com/liferay/fragment/service/persistence/test/FragmentCollectionPersistenceTest.java b/modules/apps/fragment/fragment-test/src/testIntegration/java/com/liferay/fragment/service/persistence/test/FragmentCollectionPersistenceTest.java
[echo] index deb7dc7..d5a8d72 100644
[echo] --- a/modules/apps/fragment/fragment-test/src/testIntegration/java/com/liferay/fragment/service/persistence/test/FragmentCollectionPersistenceTest.java
[echo] +++ b/modules/apps/fragment/fragment-test/src/testIntegration/java/com/liferay/fragment/service/persistence/test/FragmentCollectionPersistenceTest.java
[echo] @@ -275,12 +275,6 @@ public class FragmentCollectionPersistenceTest {
[echo] QueryUtil.ALL_POS, QueryUtil.ALL_POS, getOrderByComparator());
[echo] }
[echo]
[echo] - @Test
[echo] - public void testFilterFindByGroupId() throws Exception {
[echo] - _persistence.filterFindByGroupId(
[echo] - 0, QueryUtil.ALL_POS, QueryUtil.ALL_POS, getOrderByComparator());
[echo] - }
[echo] -
[echo] protected OrderByComparator<FragmentCollection> getOrderByComparator() {
[echo] return OrderByComparatorFactoryUtil.create(
[echo] "FragmentCollection", "mvccVersion", true, "uuid", true,
[echo] diff --git a/modules/apps/fragment/fragment-test/src/testIntegration/java/com/liferay/fragment/service/persistence/test/FragmentEntryPersistenceTest.java b/modules/apps/fragment/fragment-test/src/testIntegration/java/com/liferay/fragment/service/persistence/test/FragmentEntryPersistenceTest.java
[echo] index 6ac9363..e0ee30e 100644
[echo] --- a/modules/apps/fragment/fragment-test/src/testIntegration/java/com/liferay/fragment/service/persistence/test/FragmentEntryPersistenceTest.java
[echo] +++ b/modules/apps/fragment/fragment-test/src/testIntegration/java/com/liferay/fragment/service/persistence/test/FragmentEntryPersistenceTest.java
[echo] @@ -364,12 +364,6 @@ public class FragmentEntryPersistenceTest {
[echo] QueryUtil.ALL_POS, QueryUtil.ALL_POS, getOrderByComparator());
[echo] }
[echo]
[echo] - @Test
[echo] - public void testFilterFindByGroupId() throws Exception {
[echo] - _persistence.filterFindByGroupId(
[echo] - 0, QueryUtil.ALL_POS, QueryUtil.ALL_POS, getOrderByComparator());
[echo] - }
[echo] -
[echo] protected OrderByComparator<FragmentEntry> getOrderByComparator() {
[echo] return OrderByComparatorFactoryUtil.create(
[echo] "FragmentEntry", "mvccVersion", true, "uuid", true,
[stopwatch] [run.batch.test.action: 11:36.007 sec]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment