<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
	"https://hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
    
    <query name="findAllMobilePreferenceByUser">
        <![CDATA[
            SELECT 
                ump
            FROM UserMobilePreference ump
            WHERE
                ump.user = :user
        ]]>
    </query>
    
    <query name="findMobilePreferenceByUserAndPreferenceName">
        <![CDATA[
            SELECT 
                ump
            FROM UserMobilePreference ump
            WHERE
                ump.user = :user AND
                ump.preferenceName = :preferenceName
        ]]>
    </query>
    
    <query name="updatePreferenceValueInUserMobilePreferenceById">
        <![CDATA[
            UPDATE 
                UserMobilePreference
            SET 
                preferenceValue = :preferenceValue,
                lastUpdatedBy = :lastUpdatedBy,
                lastUpdatedOn = :lastUpdatedOn
            WHERE
                id = :id
        ]]>
    </query>
    
</hibernate-mapping>