public class NoteDaoImpl extends NoteDaoBase
Note
TRANSFORM_NONE
Constructor and Description |
---|
NoteDaoImpl() |
Modifier and Type | Method and Description |
---|---|
Object |
create(int transform,
Note note)
Does the same thing as
NoteDao.create(Note) with an additional flag called
transform . |
Note |
forceLoad(Long id)
Load a note from the persistent store, even if it is cached.
|
protected Note |
handleFindLatestNote()
Performs the core logic for
NoteDaoBase.findLatestNote() |
protected Note |
handleFindNearestNote(long noteId,
Date creationDate,
boolean younger)
Performs the core logic for
NoteDaoBase.findNearestNote(long, java.util.Date, boolean) |
protected Long |
handleGetAutosave(Long userId,
Long noteId,
Long parentNoteId,
Collection<StringPropertyFilter> properties)
Performs the core logic for
NoteDaoBase.getAutosave(Long, Long, Long, Collection) |
protected Collection<Long> |
handleGetFavoriteNoteIds(Long userId,
Long lowerBound,
Long upperBound)
Performs the core logic for
NoteDaoBase.getFavoriteNoteIds(Long, Long, Long) |
protected List<Long> |
handleGetNoteIdsOfDiscussion(Long discussionId)
Performs the core logic for
NoteDaoBase.getNoteIdsOfDiscussion(Long) |
protected List<Note> |
handleGetNotesByTag(Long tagId)
Performs the core logic for
NoteDaoBase.getNotesByTag(Long) |
protected long |
handleGetNotesCount()
Performs the core logic for
NoteDaoBase.getNotesCount() |
protected List<Note> |
handleGetNotesForBlog(Long blogId,
Long firstNoteId,
Integer limit)
Performs the core logic for
NoteDaoBase.getNotesForBlog(Long, Long, Integer) |
protected List<Note> |
handleGetNotesOfUser(Long userId)
Performs the core logic for
NoteDaoBase.getNotesOfUser(Long) |
protected int |
handleGetNumberOfFavorites(Long noteId) |
protected void |
handleUpdateFollowableItems(Note note,
boolean updateChildren)
Performs the core logic for
#updateFollowableItems(Note) |
boolean |
hasInconsistentTopics(Long discussionId,
Long topicId)
Test whether a discussion has notes which do not have the provided topic.
|
void |
moveToTopic(Long discussionId,
Blog newTopic)
Moves the given discussion to the given topic.
|
create, create, create, evict, findLatestNote, findNearestNote, getAutosave, getFavoriteNoteIds, getGlobalIdDao, getNoteIdsOfDiscussion, getNotesByTag, getNotesCount, getNotesForBlog, getNotesOfUser, getNumberOfFavorites, load, load, loadAll, loadAll, remove, remove, remove, setGlobalIdDao, transformEntities, transformEntity, update, update, updateFollowableItems
public Object create(int transform, Note note)
Does the same thing as NoteDao.create(Note)
with an additional flag called
transform
. If this flag is set to TRANSFORM_NONE
then the returned
entity will NOT be transformed. If this flag is any of the other constants
defined here then the result WILL BE passed through an operation which can
optionally transform the entity (into a value object for example). By default, transformation
does not occur.
create
in interface NoteDao
create
in class NoteDaoBase
NoteDao.create(int transform, Note)
public Note forceLoad(Long id)
id
- the ID of the note to loadprotected Note handleFindLatestNote()
NoteDaoBase.findLatestNote()
handleFindLatestNote
in class NoteDaoBase
protected Note handleFindNearestNote(long noteId, Date creationDate, boolean younger)
NoteDaoBase
NoteDaoBase.findNearestNote(long, java.util.Date, boolean)
handleFindNearestNote
in class NoteDaoBase
protected Long handleGetAutosave(Long userId, Long noteId, Long parentNoteId, Collection<StringPropertyFilter> properties)
NoteDaoBase
NoteDaoBase.getAutosave(Long, Long, Long, Collection)
handleGetAutosave
in class NoteDaoBase
protected Collection<Long> handleGetFavoriteNoteIds(Long userId, Long lowerBound, Long upperBound)
NoteDaoBase.getFavoriteNoteIds(Long, Long, Long)
handleGetFavoriteNoteIds
in class NoteDaoBase
protected List<Long> handleGetNoteIdsOfDiscussion(Long discussionId)
NoteDaoBase.getNoteIdsOfDiscussion(Long)
handleGetNoteIdsOfDiscussion
in class NoteDaoBase
protected List<Note> handleGetNotesByTag(Long tagId)
NoteDaoBase.getNotesByTag(Long)
handleGetNotesByTag
in class NoteDaoBase
com.communote.server.persistence.tag.NoteDao#getTaggedItemsByTag(Long)
protected long handleGetNotesCount()
NoteDaoBase.getNotesCount()
handleGetNotesCount
in class NoteDaoBase
com.communote.server.persistence.tag.NoteDao#getTaggedItemCount()
protected List<Note> handleGetNotesForBlog(Long blogId, Long firstNoteId, Integer limit)
NoteDaoBase.getNotesForBlog(Long, Long, Integer)
handleGetNotesForBlog
in class NoteDaoBase
protected List<Note> handleGetNotesOfUser(Long userId)
NoteDaoBase.getNotesOfUser(Long)
handleGetNotesOfUser
in class NoteDaoBase
protected int handleGetNumberOfFavorites(Long noteId)
handleGetNumberOfFavorites
in class NoteDaoBase
protected void handleUpdateFollowableItems(Note note, boolean updateChildren)
#updateFollowableItems(Note)
handleUpdateFollowableItems
in class NoteDaoBase
public boolean hasInconsistentTopics(Long discussionId, Long topicId)
discussionId
- ID of the discussiontopicId
- the ID of the topic to testCopyright © 2019 Communote team. All rights reserved.