update
Link
@Modifying(clearAutomatically = true
)
@Query(value = ""UPDATE " + LINKS_KEY + " SET " +
TITLE_KEY + "=:" + TITLE_KEY + "," +
DESCRIPTION_KEY + "=:" + DESCRIPTION_KEY + "," +
EXPIRED_TIME_KEY + "=" + ":#{#" + EXPIRED_TIME_KEY + ".name()}," +
UNIQUE_ACCESS_KEY + "=:" + UNIQUE_ACCESS_KEY +
" WHERE " + LINK_IDENTIFIER_KEY + "=:" + LINK_IDENTIFIER_KEY + " AND " + OWNER_KEY + "=:" + OWNER_KEY",
nativeQuery = true
)
Method to execute the query to save a link
Parameters
linkId
The identifier of the link
title
The title of the link
description
The description of the link
expiredTime
The expiration time set for the link
hasUniqueAccess
: whether the link has the unique access
owner
The owner of the link