net.java.dev.moskitodemo.guestbook.business
Class CommentServiceImpl

java.lang.Object
  extended by net.java.dev.moskitodemo.guestbook.business.CommentServiceImpl
All Implemented Interfaces:
ICommentService

public class CommentServiceImpl
extends Object
implements ICommentService


Field Summary
private  net.java.dev.moskito.util.storage.Storage<Integer,Comment> comments
           
private static org.apache.log4j.Logger log
           
private  AtomicInteger nextId
           
private  net.anotheria.util.sorter.Sorter sorter
           
 
Constructor Summary
CommentServiceImpl()
           
 
Method Summary
private  void _load()
           
private  void _save()
           
 Comment createComment()
           
private  List<Comment> createListFromMap()
           
 void deleteComment(int id)
           
 Comment getComment(int id)
           
 List<Comment> getComments()
           
 List<Comment> getCommentsSorted(CommentSortType sortType)
           
 void updateComment(Comment c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextId

private AtomicInteger nextId

comments

private net.java.dev.moskito.util.storage.Storage<Integer,Comment> comments

sorter

private net.anotheria.util.sorter.Sorter sorter

log

private static org.apache.log4j.Logger log
Constructor Detail

CommentServiceImpl

CommentServiceImpl()
Method Detail

createComment

public Comment createComment()
                      throws CommentServiceException
Specified by:
createComment in interface ICommentService
Throws:
CommentServiceException

deleteComment

public void deleteComment(int id)
                   throws CommentServiceException
Specified by:
deleteComment in interface ICommentService
Throws:
CommentServiceException

getComment

public Comment getComment(int id)
                   throws CommentServiceException
Specified by:
getComment in interface ICommentService
Throws:
CommentServiceException

getComments

public List<Comment> getComments()
                          throws CommentServiceException
Specified by:
getComments in interface ICommentService
Throws:
CommentServiceException

getCommentsSorted

public List<Comment> getCommentsSorted(CommentSortType sortType)
                                throws CommentServiceException
Specified by:
getCommentsSorted in interface ICommentService
Throws:
CommentServiceException

createListFromMap

private List<Comment> createListFromMap()

updateComment

public void updateComment(Comment c)
                   throws CommentServiceException
Specified by:
updateComment in interface ICommentService
Throws:
CommentServiceException

_save

private void _save()

_load

private void _load()


Copyright © 2006 MoSKito Project Team. All Rights Reserved.
MoSKito, the open source java monitoring framework