All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.custom-sql.default.xml Maven / Gradle / Ivy

There is a newer version: 7.0.162
Show newest version
<?xml version="1.0"?>

<custom-sql>
	<sql id="com.liferay.journal.service.persistence.JournalArticleFinder.countByG_F">
		<![CDATA[
			SELECT
				COUNT(DISTINCT JournalArticle.articleId) AS COUNT_VALUE
			FROM
				JournalArticle
			LEFT JOIN
				JournalArticle tempJournalArticle ON
					[$STATUS_JOIN$] AND
					(JournalArticle.groupId = tempJournalArticle.groupId) AND
					(JournalArticle.articleId = tempJournalArticle.articleId) AND
					(JournalArticle.version < tempJournalArticle.version)
			WHERE
				(JournalArticle.groupId = ?) AND
				[$STATUS$] AND
				[$FOLDER_ID$] AND
				(tempJournalArticle.id_ IS NULL)
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalArticleFinder.countByG_ST">
		<![CDATA[
			SELECT
				COUNT(DISTINCT JournalArticle.articleId) AS COUNT_VALUE
			FROM
				JournalArticle
			LEFT JOIN
				JournalArticle tempJournalArticle ON
					(JournalArticle.groupId = tempJournalArticle.groupId) AND
					(JournalArticle.articleId = tempJournalArticle.articleId) AND
					(JournalArticle.version < tempJournalArticle.version)
			WHERE
				(JournalArticle.groupId = ?) AND
				(JournalArticle.status = ?) AND
				(tempJournalArticle.id_ IS NULL)
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalArticleFinder.countByG_U_F_C">
		<![CDATA[
			SELECT
				COUNT(DISTINCT JournalArticle.articleId) AS COUNT_VALUE
			FROM
				JournalArticle
			LEFT JOIN
				JournalArticle tempJournalArticle ON
					[$STATUS_JOIN$] AND
					(JournalArticle.groupId = tempJournalArticle.groupId) AND
					(JournalArticle.articleId = tempJournalArticle.articleId) AND
					(JournalArticle.version < tempJournalArticle.version)
			WHERE
				(JournalArticle.groupId = ?) AND
				(JournalArticle.classNameId = ?) AND
				([$FOLDER_ID$]) AND
				([$OWNER_USER_ID$] [$OWNER_USER_ID_AND_OR_CONNECTOR$] [$STATUS$]) AND
				(tempJournalArticle.id_ IS NULL)
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalArticleFinder.countByG_F_C_S">
		<![CDATA[
			SELECT
				COUNT(DISTINCT JournalArticle.articleId) AS COUNT_VALUE
			FROM
				JournalArticle
			LEFT JOIN
				JournalArticle tempJournalArticle ON
					[$STATUS_JOIN$] AND
					(JournalArticle.groupId = tempJournalArticle.groupId) AND
					(JournalArticle.articleId = tempJournalArticle.articleId) AND
					(JournalArticle.version < tempJournalArticle.version)
			WHERE
				(JournalArticle.groupId = ?) AND
				(JournalArticle.classNameId = ?) AND
				([$FOLDER_ID$]) AND
				(JournalArticle.DDMStructureId = ?) AND
				([$STATUS$]) AND
				(tempJournalArticle.id_ IS NULL)
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalArticleFinder.findByG_ST_L">
		<![CDATA[
			SELECT
				JournalArticle.*
			FROM
				JournalArticle
			LEFT JOIN
				JournalArticle tempJournalArticle ON
					(JournalArticle.groupId = tempJournalArticle.groupId) AND
					(JournalArticle.articleId = tempJournalArticle.articleId) AND
					(JournalArticle.version < tempJournalArticle.version)
			LEFT JOIN
				JournalArticleLocalization ON
					(JournalArticle.companyId = JournalArticleLocalization.companyId) AND
					(JournalArticle.id_ = JournalArticleLocalization.articlePK) AND
					(JournalArticleLocalization.languageId = ?)
			WHERE
				(JournalArticle.groupId = ?) AND
				(JournalArticle.status = ?) AND
				(tempJournalArticle.id_ IS NULL)
			ORDER BY
				JournalArticle.id_ ASC
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalArticleFinder.findByG_F_L">
		<![CDATA[
			SELECT
				JournalArticle.*
			FROM
				JournalArticle
			LEFT JOIN
				JournalArticle tempJournalArticle ON
					[$STATUS_JOIN$] AND
					(JournalArticle.groupId = tempJournalArticle.groupId) AND
					(JournalArticle.articleId = tempJournalArticle.articleId) AND
					(JournalArticle.version < tempJournalArticle.version)
			LEFT JOIN
				JournalArticleLocalization ON
					(JournalArticle.companyId = JournalArticleLocalization.companyId) AND
					(JournalArticle.id_ = JournalArticleLocalization.articlePK) AND
					(JournalArticleLocalization.languageId = ?)
			WHERE
				(JournalArticle.groupId = ?) AND
				([$STATUS$]) AND
				[$FOLDER_ID$] AND
				(tempJournalArticle.id_ IS NULL)
			ORDER BY
				JournalArticle.id_ ASC
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalArticleFinder.findByG_U_F_C">
		<![CDATA[
			SELECT
				JournalArticle.*
			FROM
				JournalArticle
			LEFT JOIN
				JournalArticle tempJournalArticle ON
					[$STATUS_JOIN$] AND
					(JournalArticle.groupId = tempJournalArticle.groupId) AND
					(JournalArticle.articleId = tempJournalArticle.articleId) AND
					(JournalArticle.version < tempJournalArticle.version)
			LEFT JOIN
				(
					SELECT
						JournalArticleLocalization.companyId, JournalArticleLocalization.articlePK, JournalArticleLocalization.title
					FROM
						JournalArticleLocalization
					WHERE
						1 = ?
					GROUP BY
						JournalArticleLocalization.companyId, JournalArticleLocalization.articlePK, JournalArticleLocalization.title
				) JournalArticleLocalization ON
					(JournalArticle.companyId = JournalArticleLocalization.companyId) AND
					(JournalArticle.id_ = JournalArticleLocalization.articlePK)
			WHERE
				(JournalArticle.groupId = ?) AND
				(JournalArticle.classNameId = ?) AND
				([$FOLDER_ID$]) AND
				([$OWNER_USER_ID$] [$OWNER_USER_ID_AND_OR_CONNECTOR$] [$STATUS$]) AND
				(tempJournalArticle.id_ IS NULL)
			ORDER BY
				JournalArticle.id_ ASC
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalArticleFinder.findByG_U_F_C_L">
		<![CDATA[
			SELECT
				JournalArticle.*
			FROM
				JournalArticle
			LEFT JOIN
				JournalArticle tempJournalArticle ON
					[$STATUS_JOIN$] AND
					(JournalArticle.groupId = tempJournalArticle.groupId) AND
					(JournalArticle.articleId = tempJournalArticle.articleId) AND
					(JournalArticle.version < tempJournalArticle.version)
			LEFT JOIN
				JournalArticleLocalization ON
					(JournalArticle.companyId = JournalArticleLocalization.companyId) AND
					(JournalArticle.id_ = JournalArticleLocalization.articlePK) AND
					(JournalArticleLocalization.languageId = ?)
			WHERE
				(JournalArticle.groupId = ?) AND
				(JournalArticle.classNameId = ?) AND
				([$FOLDER_ID$]) AND
				([$OWNER_USER_ID$] [$OWNER_USER_ID_AND_OR_CONNECTOR$] [$STATUS$]) AND
				(tempJournalArticle.id_ IS NULL)
			ORDER BY
				JournalArticle.id_ ASC
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalArticleFinder.findByG_F_C_S_L">
		<![CDATA[
			SELECT
				JournalArticle.*
			FROM
				JournalArticle
			LEFT JOIN
				JournalArticle tempJournalArticle ON
					[$STATUS_JOIN$] AND
					(JournalArticle.groupId = tempJournalArticle.groupId) AND
					(JournalArticle.articleId = tempJournalArticle.articleId) AND
					(JournalArticle.version < tempJournalArticle.version)
			LEFT JOIN
				JournalArticleLocalization ON
					(JournalArticle.companyId = JournalArticleLocalization.companyId) AND
					(JournalArticle.id_ = JournalArticleLocalization.articlePK) AND
					(JournalArticleLocalization.languageId = ?)
			WHERE
				(JournalArticle.groupId = ?) AND
				(JournalArticle.classNameId = ?) AND
				([$FOLDER_ID$]) AND
				(JournalArticle.DDMStructureId = ?) AND
				([$STATUS$]) AND
				(tempJournalArticle.id_ IS NULL)
			ORDER BY
				JournalArticle.id_ ASC
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalFolderFinder.countA_ByG_U_F_DDMSI">
		<![CDATA[
			SELECT
				COUNT(DISTINCT JournalArticle.articleId) AS COUNT_VALUE
			FROM
				JournalArticle
			WHERE
				(JournalArticle.groupId = ?) AND
				(JournalArticle.classNameId = 0) AND
				([$OWNER_USER_ID$] [$OWNER_USER_ID_AND_OR_CONNECTOR$] ([$STATUS$]))
				[$ARTICLE_FOLDER_ID$]
				[$DDM_STRUCTURE_ID$]
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalFolderFinder.countF_ByG_F">
		<![CDATA[
			SELECT
				COUNT(*) AS COUNT_VALUE
			FROM
				JournalFolder
			WHERE
				(JournalFolder.groupId = ?) AND
				([$STATUS$])
				[$FOLDER_PARENT_FOLDER_ID$]
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalFolderFinder.findA_ByG_U_F_DDMSI">
		<![CDATA[
			SELECT
				JournalArticle.folderId AS modelFolderId, JournalArticle.articleId AS articleId, JournalArticle.version AS version, 0 AS modelFolder, JournalArticle.displayDate AS displayDate, JournalArticle.modifiedDate AS modifiedDate
			FROM
				(
					SELECT
						JournalArticle.groupId AS groupId, JournalArticle.articleId AS articleId, MAX(JournalArticle.version) AS version
					FROM
						JournalArticle
					WHERE
						(JournalArticle.groupId = ?) AND
						(JournalArticle.classNameId = 0) AND
						([$OWNER_USER_ID$] [$OWNER_USER_ID_AND_OR_CONNECTOR$] ([$STATUS$]))
						[$ARTICLE_FOLDER_ID$]
						[$DDM_STRUCTURE_ID$]
					GROUP BY
						JournalArticle.groupId, JournalArticle.folderId, JournalArticle.articleId
				) TEMP_TABLE
			INNER JOIN
				JournalArticle ON
					(TEMP_TABLE.groupId = JournalArticle.groupId) AND
					(TEMP_TABLE.articleId = JournalArticle.articleId) AND
					(TEMP_TABLE.version = JournalArticle.version)
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalFolderFinder.findA_ByG_U_F_DDMSI_L">
		<![CDATA[
			SELECT
				JournalArticle.folderId AS modelFolderId, JournalArticle.articleId AS articleId, JournalArticleLocalization.title AS title, JournalArticle.version AS version, 0 AS modelFolder, JournalArticle.createDate AS createDate, JournalArticle.displayDate AS displayDate, JournalArticle.modifiedDate AS modifiedDate
			FROM
				(
					SELECT
						JournalArticle.groupId AS groupId, JournalArticle.articleId AS articleId, MAX(JournalArticle.version) AS version
					FROM
						JournalArticle
					WHERE
						(JournalArticle.groupId = ?) AND
						(JournalArticle.classNameId = 0) AND
						([$OWNER_USER_ID$] [$OWNER_USER_ID_AND_OR_CONNECTOR$] ([$STATUS$]))
						[$ARTICLE_FOLDER_ID$]
						[$DDM_STRUCTURE_ID$]
					GROUP BY
						JournalArticle.groupId, JournalArticle.folderId, JournalArticle.articleId
				) TEMP_TABLE
			INNER JOIN
				JournalArticle ON
					(TEMP_TABLE.groupId = JournalArticle.groupId) AND
					(TEMP_TABLE.articleId = JournalArticle.articleId) AND
					(TEMP_TABLE.version = JournalArticle.version)
			LEFT JOIN
				JournalArticleLocalization ON
					(JournalArticle.id_ = JournalArticleLocalization.articlePK) AND
					(JournalArticleLocalization.languageId = ?)
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalFolderFinder.findF_ByNoAssets">
		<![CDATA[
			SELECT
				{JournalFolder.*}
			FROM
				JournalFolder
			LEFT JOIN
				AssetEntry ON
					(AssetEntry.classNameId = ?) AND
					(AssetEntry.classPK = JournalFolder.folderId)
			WHERE
				AssetEntry.classPK IS NULL
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalFolderFinder.findF_ByG_F">
		<![CDATA[
			SELECT
				DISTINCT folderId AS modelFolderId, '' AS articleId, 0 AS version, 1 AS modelFolder, JournalFolder.createDate AS displayDate, JournalFolder.modifiedDate AS modifiedDate
			FROM
				JournalFolder
			WHERE
				(JournalFolder.groupId = ?) AND
				([$STATUS$])
				[$FOLDER_PARENT_FOLDER_ID$]
		]]>
	</sql>
	<sql id="com.liferay.journal.service.persistence.JournalFolderFinder.findF_ByG_F_L">
		<![CDATA[
			SELECT
				DISTINCT folderId AS modelFolderId, '' AS articleId, JournalFolder.name AS title, 0 AS version, 1 AS modelFolder, JournalFolder.createDate AS createDate, JournalFolder.createDate AS displayDate, JournalFolder.modifiedDate AS modifiedDate
			FROM
				JournalFolder
			WHERE
				(JournalFolder.groupId = ?) AND
				([$STATUS$])
				[$FOLDER_PARENT_FOLDER_ID$]
		]]>
	</sql>
</custom-sql>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy