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

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

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

<custom-sql>
	<sql id="com.liferay.blogs.service.persistence.BlogsEntryFinder.countByOrganizationIds">
		<![CDATA[
			SELECT
				COUNT(*) AS COUNT_VALUE
			FROM
				BlogsEntry
			INNER JOIN
				User_ ON
					User_.userId = BlogsEntry.userId
			INNER JOIN
				Users_Orgs ON
					Users_Orgs.userId = User_.userId
			WHERE
				[$ORGANIZATION_ID$] AND
				(BlogsEntry.displayDate < ?)
		]]>
	</sql>
	<sql id="com.liferay.blogs.service.persistence.BlogsEntryFinder.findByGroupIds">
		<![CDATA[
			SELECT
				{BlogsEntry.*}
			FROM
				BlogsEntry
			INNER JOIN
				Group_ ON
					Group_.groupId = BlogsEntry.groupId
			WHERE
				(Group_.companyId = ?) AND
				(
					(Group_.groupId = ?) OR
					(
						(Group_.liveGroupId = 0) AND
						(
							Group_.groupId NOT IN
								(
									SELECT
										liveGroupId
									FROM
										Group_
									WHERE
										groupId = ?
								)
						) AND
						(
							(Group_.classNameId != [$CLASS_NAME_ID_COM.LIFERAY.PORTAL.MODEL.LAYOUT$]) OR
							(
								Group_.parentGroupId NOT IN
									(
										SELECT
											groupId
										FROM
											Group_
										WHERE
											(groupId != ?) AND
											(liveGroupId != 0)
									)
							)
						)
					)
				) AND
				(BlogsEntry.displayDate < ?)
			ORDER BY
				BlogsEntry.displayDate DESC
		]]>
	</sql>
	<sql id="com.liferay.blogs.service.persistence.BlogsEntryFinder.findByOrganizationIds">
		<![CDATA[
			SELECT
				{BlogsEntry.*}
			FROM
				BlogsEntry
			INNER JOIN
				User_ ON
					User_.userId = BlogsEntry.userId
			INNER JOIN
				Users_Orgs ON
					Users_Orgs.userId = User_.userId
			WHERE
				[$ORGANIZATION_ID$] AND
				(BlogsEntry.displayDate < ?)
			ORDER BY
				BlogsEntry.displayDate DESC
		]]>
	</sql>
	<sql id="com.liferay.blogs.service.persistence.BlogsEntryFinder.findByNoAssets">
		<![CDATA[
			SELECT
				{BlogsEntry.*}
			FROM
				BlogsEntry
			LEFT JOIN
				AssetEntry ON
					(AssetEntry.classNameId = ?) AND
					(AssetEntry.classPK = BlogsEntry.entryId)
			WHERE
				AssetEntry.classPK IS NULL
		]]>
	</sql>
</custom-sql>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy