custom-sql.asset.xml Maven / Gradle / Ivy
<?xml version="1.0"?>
<custom-sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetCategoryFinder.countByC_C">
<![CDATA[
SELECT
COUNT(DISTINCT AssetCategory.categoryId) AS COUNT_VALUE
FROM
AssetEntry
INNER JOIN
AssetEntryAssetCategoryRel ON
AssetEntryAssetCategoryRel.assetEntryId = AssetEntry.entryId
INNER JOIN
AssetCategory ON
AssetCategory.categoryId = AssetEntryAssetCategoryRel.assetCategoryId
WHERE
(AssetEntry.classNameId = ?) AND
(AssetEntry.classPK = ?)
]]>
</sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetCategoryFinder.countByG_C_N">
<![CDATA[
SELECT
COUNT(DISTINCT AssetEntryAssetCategoryRel.assetEntryId) AS COUNT_VALUE
FROM
AssetCategory
INNER JOIN
AssetEntryAssetCategoryRel ON
AssetEntryAssetCategoryRel.assetCategoryId = AssetCategory.categoryId
WHERE
(
AssetEntryAssetCategoryRel.assetEntryId IN
(
SELECT
entryId
FROM
AssetEntry
WHERE
(AssetEntry.groupId = ?) AND
(AssetEntry.classNameId = ?) AND
(AssetEntry.visible = [$TRUE$])
)
) AND
(
(AssetCategory.name LIKE ?) OR
(? IS NULL)
)
]]>
</sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetCategoryFinder.countByG_N_P">
<![CDATA[
SELECT
COUNT(DISTINCT AssetCategory.categoryId) AS COUNT_VALUE
FROM
AssetCategory
[$JOIN$]
WHERE
(AssetCategory.groupId = ?) AND
(
(AssetCategory.name LIKE ?) OR
(? IS NULL)
)
]]>
</sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetCategoryFinder.findByG_N">
<![CDATA[
SELECT
{AssetCategory.*}
FROM
AssetCategory
WHERE
(AssetCategory.groupId = ?) AND
(LOWER(AssetCategory.name) = ?)
]]>
</sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetCategoryFinder.findByC_C">
<![CDATA[
SELECT
{AssetCategory.*}
FROM
AssetEntry
INNER JOIN
AssetEntryAssetCategoryRel ON
AssetEntryAssetCategoryRel.assetEntryId = AssetEntry.entryId
INNER JOIN
AssetCategory ON
AssetCategory.categoryId = AssetEntryAssetCategoryRel.assetCategoryId
WHERE
(AssetEntry.classNameId = ?) AND
(AssetEntry.classPK = ?)
]]>
</sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetCategoryFinder.findByG_N_P">
<![CDATA[
SELECT
{AssetCategory.*}
FROM
AssetCategory
[$JOIN$]
WHERE
(AssetCategory.groupId = ?) AND
(
(AssetCategory.name LIKE ?) OR
(? IS NULL)
)
ORDER BY
AssetCategory.name ASC
]]>
</sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetEntryFinder.findByAndCategoryIds">
<![CDATA[
EXISTS
(
SELECT
1
FROM
AssetEntryAssetCategoryRel
WHERE
(AssetEntryAssetCategoryRel.assetEntryId = AssetEntry.entryId) AND
(AssetEntryAssetCategoryRel.assetCategoryId IN ([$CATEGORY_ID$]))
)
]]>
</sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetEntryFinder.findByAndTagIds">
<![CDATA[
SELECT
DISTINCT AssetEntries_AssetTags.entryId
FROM
AssetEntries_AssetTags
WHERE
[$TAG_ID$]
]]>
</sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetEntryFinder.findPriorityByC_C">
<![CDATA[
SELECT
AssetEntry.priority
FROM
AssetEntry
WHERE
(AssetEntry.classNameId = ?) AND
(AssetEntry.classPK = ?)
]]>
</sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetLinkFinder.findByG_C">
<![CDATA[
SELECT
AssetLink.*
FROM
AssetLink
WHERE
EXISTS
(
SELECT
1
FROM
AssetEntry AssetEntry1, AssetEntry AssetEntry2
WHERE
(AssetLink.entryId1 = AssetEntry1.entryId) AND
(AssetLink.entryId2 = AssetEntry2.entryId) AND
(
(AssetEntry1.groupId = ?) OR
(AssetEntry2.groupId = ?)
)
)
[$CREATE_DATE_COMPARATOR$]
]]>
</sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetLinkFinder.findByC_C">
<![CDATA[
SELECT
AssetLink.*
FROM
AssetEntry
INNER JOIN
AssetLink ON
AssetEntry.entryId = AssetLink.entryId1
WHERE
(AssetEntry.classNameId = ?) AND
(AssetEntry.classPK = ?)
UNION
SELECT
AssetLink.*
FROM
AssetEntry
INNER JOIN
AssetLink ON
AssetEntry.entryId = AssetLink.entryId2
WHERE
(AssetEntry.classNameId = ?) AND
(AssetEntry.classPK = ?)
]]>
</sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetVocabularyFinder.countByG_N">
<![CDATA[
SELECT
COUNT(DISTINCT AssetVocabulary.vocabularyId) AS COUNT_VALUE
FROM
AssetVocabulary
WHERE
(AssetVocabulary.groupId = ?) AND
(
(AssetVocabulary.name LIKE ?) OR
(? IS NULL)
)
]]>
</sql>
<sql id="com.liferay.asset.kernel.service.persistence.AssetVocabularyFinder.findByG_N">
<![CDATA[
SELECT
{AssetVocabulary.*}
FROM
AssetVocabulary
WHERE
(AssetVocabulary.groupId = ?) AND
(
(LOWER(AssetVocabulary.name) LIKE ?) OR
(? IS NULL)
)
ORDER BY
AssetVocabulary.name ASC
]]>
</sql>
</custom-sql> © 2015 - 2025 Weber Informatics LLC | Privacy Policy