META-INF.custom-sql.default.xml Maven / Gradle / Ivy
<?xml version="1.0"?> <custom-sql> <sql id="com.liferay.chat.service.persistence.EntryFinder.findByEmptyContent"> <![CDATA[ SELECT {Chat_Entry.*} FROM Chat_Entry WHERE (fromUserId = ?) AND (toUserId = ?) AND ( (content = '') OR (content IS NULL) ) ORDER BY createDate DESC ]]> </sql> <sql id="com.liferay.chat.service.persistence.EntryFinder.findByNew"> <![CDATA[ SELECT {Chat_Entry.*} FROM Chat_Entry WHERE ( (fromUserId = ?) OR (toUserId = ?) ) AND (flag = ?) ORDER BY createDate DESC ]]> </sql> <sql id="com.liferay.chat.service.persistence.EntryFinder.findByOld"> <![CDATA[ SELECT {Chat_Entry.*} FROM Chat_Entry WHERE (createDate < ?) ORDER BY createDate DESC ]]> </sql> <sql id="com.liferay.chat.service.persistence.StatusFinder.findByModifiedDate"> <![CDATA[ SELECT Chat_Status.awake AS awake, User_.firstName AS firstName, Group_.groupId AS groupId, User_.lastName AS lastName, User_.middleName AS middleName, User_.portraitId AS portraitId, User_.screenName AS screenName, User_.userId AS userId, User_.uuid_ AS userUuid FROM Chat_Status INNER JOIN User_ ON User_.userId = Chat_Status.userId INNER JOIN Group_ ON (Group_.classPK = User_.userId) AND (Group_.companyId = User_.companyId) WHERE (Group_.classNameId = ?) AND (User_.companyId = ?) AND (User_.userId != ?) AND (Chat_Status.modifiedDate > ?) AND (Chat_Status.online_ = [$TRUE$]) ORDER BY Chat_Status.awake ASC, User_.firstName ASC, User_.middleName ASC, User_.lastName ASC ]]> </sql> <sql id="com.liferay.chat.service.persistence.StatusFinder.findBySocialRelationTypes"> <![CDATA[ SELECT DISTINCT Chat_Status.awake AS awake, User_.firstName AS firstName, Group_.groupId AS groupId, User_.lastName AS lastName, User_.middleName AS middleName, User_.portraitId AS portraitId, User_.screenName AS screenName, User_.userId AS userId, User_.uuid_ AS userUuid FROM Chat_Status INNER JOIN User_ ON User_.userId = Chat_Status.userId INNER JOIN Group_ ON (Group_.classPK = User_.userId) AND (Group_.companyId = User_.companyId) INNER JOIN SocialRelation ON SocialRelation.userId2 = User_.userId WHERE (Group_.classNameId = ?) AND (SocialRelation.userId1 = ?) AND [$SOCIAL_RELATION_TYPES$] (User_.companyId = ?) AND (User_.userId != ?) AND (Chat_Status.modifiedDate > ?) AND (Chat_Status.online_ = [$TRUE$]) ORDER BY Chat_Status.awake ASC, User_.firstName ASC, User_.middleName ASC, User_.lastName ASC ]]> </sql> <sql id="com.liferay.chat.service.persistence.StatusFinder.findByUsersGroups"> <![CDATA[ SELECT DISTINCT Chat_Status.awake AS awake, User_.firstName AS firstName, Group_.groupId AS groupId, User_.lastName AS lastName, User_.middleName AS middleName, User_.portraitId AS portraitId, User_.screenName AS screenName, User_.userId AS userId, User_.uuid_ AS userUuid FROM Chat_Status INNER JOIN User_ ON User_.userId = Chat_Status.userId INNER JOIN Users_Groups ON Users_Groups.userId = User_.userId INNER JOIN Group_ ON (Group_.classPK = User_.userId) AND (Group_.companyId = User_.companyId) WHERE (Group_.classNameId = ?) AND (User_.companyId = ?) AND (User_.userId != ?) AND ( Users_Groups.groupId IN ( SELECT Users_Groups.groupId FROM Users_Groups [$USERS_GROUPS_JOIN$] WHERE (userId = ?) [$USERS_GROUPS_WHERE$] ) ) AND (Chat_Status.modifiedDate > ?) AND (Chat_Status.online_ = [$TRUE$]) ORDER BY Chat_Status.awake ASC, User_.firstName ASC, User_.middleName ASC, User_.lastName ASC ]]> </sql> </custom-sql>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy