org.telscenter.sail.webapp.service.premadecomment.impl
Class PremadeCommentServiceImpl

java.lang.Object
  extended by org.telscenter.sail.webapp.service.premadecomment.impl.PremadeCommentServiceImpl
All Implemented Interfaces:
PremadeCommentService

public class PremadeCommentServiceImpl
extends Object
implements PremadeCommentService

Author:
patrick lawler

Constructor Summary
PremadeCommentServiceImpl()
           
 
Method Summary
 PremadeCommentList addPremadeCommentToList(Long commentListId, PremadeComment comment)
          Adds a PremadeComment to the PremadeCommentList given the PremadeComment and the PremadeCommentList ID
 PremadeComment createPremadeComment(PremadeCommentParameters param)
          Creates a new PremadeComment in the data store.
 PremadeCommentList createPremadeCommentList(PremadeCommentListParameters param)
          Creates a new PremadeCommentList in the data store.
 void deletePremadeComment(Long commentId)
          Removes a PremadeComment from the data store using its id.
 void deletePremadeCommentList(Long commentListId)
          Removes a PremadeCommentList from the data store given its ID
 PremadeCommentList removePremadeCommentFromList(Long commentListId, PremadeComment comment)
          Removes a PremadeComment from the list of PremadeCommentList given the PremadeCommentList ID and the PremadeComment
 Set<PremadeCommentList> retrieveAllGlobalPremadeCommentLists()
          Retrieves all PremadeCommentLists that have the global field set to true
 Set<PremadeCommentList> retrieveAllPremadeCommentLists()
          Retrieves all PremadeCommentLists from the data store.
 Set<PremadeCommentList> retrieveAllPremadeCommentListsByRun(Run run)
          Retrieves all PremadeCommentLists associated with a given run.
 Set<PremadeCommentList> retrieveAllPremadeCommentListsByUser(User user)
          Retrieves all PremadeCommentLists associated with a given user.
 Set<PremadeComment> retrieveAllPremadeComments()
          Retrieves all PremadeComments from the data store.
 Set<PremadeComment> retrieveAllPremadeCommentsByUser(User user)
          Retrieves all PremadeComments associated with a given user.
 PremadeComment retrievePremadeCommentById(Long id)
          Retrieves a PremadeComment with the given id
 PremadeCommentList retrievePremadeCommentListById(Long id)
          Retrieves a PremadeCommentList with the given id
 void setPremadeCommentDao(PremadeCommentDao<PremadeComment> premadeCommentDao)
           
 void setPremadeCommentListDao(PremadeCommentListDao<PremadeCommentList> premadeCommentListDao)
           
 PremadeCommentList updatePremadeCommentListLabel(Long commentListId, String newLabel)
          Updates the label of a PremadeCommentList given its ID and new label.
 PremadeComment updatePremadeCommentListPosition(Long premadeCommentId, Long listPosition)
          Updates the listPosition in a PremadeComment using its id.
 PremadeComment updatePremadeCommentMessage(Long premadeCommentId, String newComment)
          Updates the comment in a PremadeComment using its id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PremadeCommentServiceImpl

public PremadeCommentServiceImpl()
Method Detail

createPremadeComment

@Transactional
public PremadeComment createPremadeComment(PremadeCommentParameters param)
Description copied from interface: PremadeCommentService
Creates a new PremadeComment in the data store.

Specified by:
createPremadeComment in interface PremadeCommentService
Parameters:
param - PremadeCommentParameters
Returns:
PremadeComment

deletePremadeComment

@Transactional
public void deletePremadeComment(Long commentId)
Description copied from interface: PremadeCommentService
Removes a PremadeComment from the data store using its id.

Specified by:
deletePremadeComment in interface PremadeCommentService
Parameters:
commentId - Long

updatePremadeCommentMessage

@Transactional
public PremadeComment updatePremadeCommentMessage(Long premadeCommentId,
                                                                String newComment)
                                           throws ObjectNotFoundException
Description copied from interface: PremadeCommentService
Updates the comment in a PremadeComment using its id.

Specified by:
updatePremadeCommentMessage in interface PremadeCommentService
Parameters:
premadeCommentId - Long
newComment - String
Returns:
updated PremadeComment
Throws:
ObjectNotFoundException

updatePremadeCommentListPosition

@Transactional
public PremadeComment updatePremadeCommentListPosition(Long premadeCommentId,
                                                                     Long listPosition)
                                                throws ObjectNotFoundException
Description copied from interface: PremadeCommentService
Updates the listPosition in a PremadeComment using its id.

Specified by:
updatePremadeCommentListPosition in interface PremadeCommentService
Parameters:
premadeCommentId - the id of the premade comment
listPosition - the new list position
Returns:
Throws:
ObjectNotFoundException

retrieveAllPremadeComments

@Transactional
public Set<PremadeComment> retrieveAllPremadeComments()
Description copied from interface: PremadeCommentService
Retrieves all PremadeComments from the data store.

Specified by:
retrieveAllPremadeComments in interface PremadeCommentService
Returns:
a Set

retrieveAllPremadeCommentsByUser

@Transactional
public Set<PremadeComment> retrieveAllPremadeCommentsByUser(User user)
Description copied from interface: PremadeCommentService
Retrieves all PremadeComments associated with a given user.

Specified by:
retrieveAllPremadeCommentsByUser in interface PremadeCommentService
Parameters:
user - User
Returns:
a Set

createPremadeCommentList

@Transactional
public PremadeCommentList createPremadeCommentList(PremadeCommentListParameters param)
Description copied from interface: PremadeCommentService
Creates a new PremadeCommentList in the data store.

Specified by:
createPremadeCommentList in interface PremadeCommentService
Parameters:
param - PremadeCommentListParameters
Returns:
PremadeCommentList

deletePremadeCommentList

@Transactional
public void deletePremadeCommentList(Long commentListId)
                              throws ObjectNotFoundException
Description copied from interface: PremadeCommentService
Removes a PremadeCommentList from the data store given its ID

Specified by:
deletePremadeCommentList in interface PremadeCommentService
Parameters:
commentListId - Long
Throws:
ObjectNotFoundException

updatePremadeCommentListLabel

@Transactional
public PremadeCommentList updatePremadeCommentListLabel(Long commentListId,
                                                                      String newLabel)
                                                 throws ObjectNotFoundException
Description copied from interface: PremadeCommentService
Updates the label of a PremadeCommentList given its ID and new label.

Specified by:
updatePremadeCommentListLabel in interface PremadeCommentService
Parameters:
commentListId - Long
newLabel - String
Returns:
PremadeCommentList
Throws:
ObjectNotFoundException

addPremadeCommentToList

@Transactional
public PremadeCommentList addPremadeCommentToList(Long commentListId,
                                                                PremadeComment comment)
                                           throws ObjectNotFoundException
Description copied from interface: PremadeCommentService
Adds a PremadeComment to the PremadeCommentList given the PremadeComment and the PremadeCommentList ID

Specified by:
addPremadeCommentToList in interface PremadeCommentService
Parameters:
commentListId - Long
comment - PremadeComment
Returns:
PremadeCommentList
Throws:
ObjectNotFoundException

removePremadeCommentFromList

@Transactional
public PremadeCommentList removePremadeCommentFromList(Long commentListId,
                                                                     PremadeComment comment)
                                                throws ObjectNotFoundException
Description copied from interface: PremadeCommentService
Removes a PremadeComment from the list of PremadeCommentList given the PremadeCommentList ID and the PremadeComment

Specified by:
removePremadeCommentFromList in interface PremadeCommentService
Returns:
PremadeCommentList
Throws:
ObjectNotFoundException

retrieveAllPremadeCommentLists

@Transactional
public Set<PremadeCommentList> retrieveAllPremadeCommentLists()
Description copied from interface: PremadeCommentService
Retrieves all PremadeCommentLists from the data store.

Specified by:
retrieveAllPremadeCommentLists in interface PremadeCommentService
Returns:
a Set

retrieveAllPremadeCommentListsByUser

@Transactional
public Set<PremadeCommentList> retrieveAllPremadeCommentListsByUser(User user)
Description copied from interface: PremadeCommentService
Retrieves all PremadeCommentLists associated with a given user.

Specified by:
retrieveAllPremadeCommentListsByUser in interface PremadeCommentService
Parameters:
user - User
Returns:
a Set

retrieveAllPremadeCommentListsByRun

@Transactional
public Set<PremadeCommentList> retrieveAllPremadeCommentListsByRun(Run run)
Description copied from interface: PremadeCommentService
Retrieves all PremadeCommentLists associated with a given run.

Specified by:
retrieveAllPremadeCommentListsByRun in interface PremadeCommentService
Parameters:
run - Run
Returns:
a Set

setPremadeCommentDao

public void setPremadeCommentDao(PremadeCommentDao<PremadeComment> premadeCommentDao)
Parameters:
premadeCommentDao - the premadeCommentDao to set

setPremadeCommentListDao

public void setPremadeCommentListDao(PremadeCommentListDao<PremadeCommentList> premadeCommentListDao)
Parameters:
premadeCommentListDao - the premadeCommentListDao to set

retrieveAllGlobalPremadeCommentLists

public Set<PremadeCommentList> retrieveAllGlobalPremadeCommentLists()
Description copied from interface: PremadeCommentService
Retrieves all PremadeCommentLists that have the global field set to true

Specified by:
retrieveAllGlobalPremadeCommentLists in interface PremadeCommentService
Returns:
a Set of PremadeCommentLists
See Also:
PremadeCommentService.retrieveAllGlobalPremadeCommentLists()

retrievePremadeCommentListById

@Transactional
public PremadeCommentList retrievePremadeCommentListById(Long id)
Description copied from interface: PremadeCommentService
Retrieves a PremadeCommentList with the given id

Specified by:
retrievePremadeCommentListById in interface PremadeCommentService
Returns:
a PremadeCommentList or null if there is no PremadeCommentList with the given id

retrievePremadeCommentById

@Transactional
public PremadeComment retrievePremadeCommentById(Long id)
Description copied from interface: PremadeCommentService
Retrieves a PremadeComment with the given id

Specified by:
retrievePremadeCommentById in interface PremadeCommentService
Returns:
a PremadeCommet or null if there is no PremadeComment with the given id


Copyright © 2012. All Rights Reserved.