create
Note
@Modifying(clearAutomatically = true
)
@Query(value = "INSERT INTO " + NOTES_KEY
+ " (" + IDENTIFIER_KEY + ","
+ AUTHOR_KEY + ","
+ CONTENT_NOTE_KEY + ","
+ CREATION_DATE_KEY + ","
+ MARKED_AS_DONE_KEY + ","
+ MARKED_AS_DONE_BY_KEY + ","
+ MARKED_AS_DONE_DATE_KEY + ")"
+ "VALUES ("
+ ":" + IDENTIFIER_KEY + ","
+ ":" + AUTHOR_KEY + ","
+ ":" + CONTENT_NOTE_KEY + ","
+ ":" + CREATION_DATE_KEY + ","
+ "false,"
+ "NULL,"
+ "-1"
+ ")",
nativeQuery = true
)
Method to execute the query to create a new Note
Parameters
authorId
The author of the note identifier
noteId
The note identifier
contentNote
The content of the note
creationDate
The creation date of the note