From 1b8aad99b17e4eebd98b6f9f890f084f0840de0b Mon Sep 17 00:00:00 2001 From: Ian Hlavats Date: Wed, 5 Jun 2013 16:06:48 +0200 Subject: [PATCH] Updated Javadocs. --- .../java/com/mycompany/controller/SignupController.java | 2 +- .../mycompany/lifecycle/ConversationExceptionFilter.java | 2 +- .../src/main/java/com/mycompany/service/IdeaService.java | 2 +- .../java/com/mycompany/service/impl/AbstractService.java | 6 ++++++ .../java/com/mycompany/service/impl/ChartServiceImpl.java | 6 ++++++ .../com/mycompany/service/impl/ContentServiceImpl.java | 6 ++++++ .../com/mycompany/service/impl/CountryServiceImpl.java | 6 ++---- .../java/com/mycompany/service/impl/EventServiceImpl.java | 6 ++++++ .../java/com/mycompany/service/impl/IdeaServiceImpl.java | 6 ++++++ .../java/com/mycompany/service/impl/UserServiceImpl.java | 8 ++++++-- .../java/com/mycompany/service/impl/VenueServiceImpl.java | 6 ++++++ .../src/main/java/com/mycompany/util/Queries.java | 1 + 12 files changed, 48 insertions(+), 9 deletions(-) diff --git a/primefaces-webapp/src/main/java/com/mycompany/controller/SignupController.java b/primefaces-webapp/src/main/java/com/mycompany/controller/SignupController.java index 5b278c7..c319b98 100644 --- a/primefaces-webapp/src/main/java/com/mycompany/controller/SignupController.java +++ b/primefaces-webapp/src/main/java/com/mycompany/controller/SignupController.java @@ -83,7 +83,7 @@ public Gender[] getGenders() { /** * Return a date 100 years ago. * - * @return + * @return A Date object. */ public Date getMinDate() { Calendar cal = Calendar.getInstance(); diff --git a/primefaces-webapp/src/main/java/com/mycompany/lifecycle/ConversationExceptionFilter.java b/primefaces-webapp/src/main/java/com/mycompany/lifecycle/ConversationExceptionFilter.java index f728bb5..bad1ed1 100644 --- a/primefaces-webapp/src/main/java/com/mycompany/lifecycle/ConversationExceptionFilter.java +++ b/primefaces-webapp/src/main/java/com/mycompany/lifecycle/ConversationExceptionFilter.java @@ -43,7 +43,7 @@ /** * - * This filter handles the {@link NonexistentConversationException) propagating + * This filter handles the {@link NonexistentConversationException} propagating * from CDI for requests containing an invalid conversation ID (cid parameter). * * @author Ian Hlavats (ian@tarantulaconsulting.com) diff --git a/primefaces-webapp/src/main/java/com/mycompany/service/IdeaService.java b/primefaces-webapp/src/main/java/com/mycompany/service/IdeaService.java index 1e1d817..5f26d29 100644 --- a/primefaces-webapp/src/main/java/com/mycompany/service/IdeaService.java +++ b/primefaces-webapp/src/main/java/com/mycompany/service/IdeaService.java @@ -61,7 +61,7 @@ public interface IdeaService { /** * Finds a list of {@link Idea} objects. * - * @return + * @return A List of Idea objects. */ List findIdeas(); diff --git a/primefaces-webapp/src/main/java/com/mycompany/service/impl/AbstractService.java b/primefaces-webapp/src/main/java/com/mycompany/service/impl/AbstractService.java index 4d42834..be79e4d 100644 --- a/primefaces-webapp/src/main/java/com/mycompany/service/impl/AbstractService.java +++ b/primefaces-webapp/src/main/java/com/mycompany/service/impl/AbstractService.java @@ -30,6 +30,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * Base class for service implementations. + * + * @author Ian Hlavats (ian@tarantulaconsulting.com) + * + */ public abstract class AbstractService { @PersistenceContext diff --git a/primefaces-webapp/src/main/java/com/mycompany/service/impl/ChartServiceImpl.java b/primefaces-webapp/src/main/java/com/mycompany/service/impl/ChartServiceImpl.java index d5c5b17..e716bad 100644 --- a/primefaces-webapp/src/main/java/com/mycompany/service/impl/ChartServiceImpl.java +++ b/primefaces-webapp/src/main/java/com/mycompany/service/impl/ChartServiceImpl.java @@ -34,6 +34,12 @@ import com.mycompany.service.ChartService; import com.mycompany.util.Queries; +/** + * Chart service implementation class. + * + * @author Ian Hlavats (ian@tarantulaconsulting.com) + * + */ @Named("chartService") @Stateless public class ChartServiceImpl extends AbstractService implements ChartService { diff --git a/primefaces-webapp/src/main/java/com/mycompany/service/impl/ContentServiceImpl.java b/primefaces-webapp/src/main/java/com/mycompany/service/impl/ContentServiceImpl.java index 5d420fa..c446074 100644 --- a/primefaces-webapp/src/main/java/com/mycompany/service/impl/ContentServiceImpl.java +++ b/primefaces-webapp/src/main/java/com/mycompany/service/impl/ContentServiceImpl.java @@ -33,6 +33,12 @@ import com.mycompany.service.ContentService; import com.mycompany.util.Queries; +/** + * Content service implementation class. + * + * @author Ian Hlavats (ian@tarantulaconsulting.com) + * + */ @Named("contentService") @Stateless public class ContentServiceImpl extends AbstractService implements ContentService { diff --git a/primefaces-webapp/src/main/java/com/mycompany/service/impl/CountryServiceImpl.java b/primefaces-webapp/src/main/java/com/mycompany/service/impl/CountryServiceImpl.java index 3761d44..65eac39 100644 --- a/primefaces-webapp/src/main/java/com/mycompany/service/impl/CountryServiceImpl.java +++ b/primefaces-webapp/src/main/java/com/mycompany/service/impl/CountryServiceImpl.java @@ -47,10 +47,8 @@ import com.mycompany.util.Queries; /** - *

- * Controller class for countries. Since this class holds application-wide - * state, namely a list of {@link Country} objects, we annotate it as an - * application-scoped CDI bean. + * + * Country service implementation class. * * @author Ian Hlavats (ian@tarantulaconsulting.com) * diff --git a/primefaces-webapp/src/main/java/com/mycompany/service/impl/EventServiceImpl.java b/primefaces-webapp/src/main/java/com/mycompany/service/impl/EventServiceImpl.java index cd8e753..5c870e2 100644 --- a/primefaces-webapp/src/main/java/com/mycompany/service/impl/EventServiceImpl.java +++ b/primefaces-webapp/src/main/java/com/mycompany/service/impl/EventServiceImpl.java @@ -49,6 +49,12 @@ import com.mycompany.service.EventService; import com.mycompany.util.Queries; +/** + * Event service implementation class. + * + * @author Ian Hlavats (ian@tarantulaconsulting.com) + * + */ @Named("eventService") @Stateless public class EventServiceImpl extends AbstractService implements EventService { diff --git a/primefaces-webapp/src/main/java/com/mycompany/service/impl/IdeaServiceImpl.java b/primefaces-webapp/src/main/java/com/mycompany/service/impl/IdeaServiceImpl.java index 63bffcf..6c40533 100644 --- a/primefaces-webapp/src/main/java/com/mycompany/service/impl/IdeaServiceImpl.java +++ b/primefaces-webapp/src/main/java/com/mycompany/service/impl/IdeaServiceImpl.java @@ -36,6 +36,12 @@ import com.mycompany.model.Idea; import com.mycompany.service.IdeaService; +/** + * Idea service implementation class. + * + * @author Ian Hlavats (ian@tarantulaconsulting.com) + * + */ @Named("ideaService") @Stateless public class IdeaServiceImpl extends AbstractService implements IdeaService { diff --git a/primefaces-webapp/src/main/java/com/mycompany/service/impl/UserServiceImpl.java b/primefaces-webapp/src/main/java/com/mycompany/service/impl/UserServiceImpl.java index c25a38f..d7a36bd 100644 --- a/primefaces-webapp/src/main/java/com/mycompany/service/impl/UserServiceImpl.java +++ b/primefaces-webapp/src/main/java/com/mycompany/service/impl/UserServiceImpl.java @@ -38,6 +38,8 @@ import com.mycompany.util.Queries; /** + * User service implementation class. + * * @uml.dependency supplier="javax.persistence.EntityManager" */ @Named("userService") @@ -59,7 +61,8 @@ public UserRelationship findRelationshipToUser(User user1, User user2) { @Override public User findUser(String username, String password) { - TypedQuery query = em.createNamedQuery(Queries.USER_FIND_BY_USERNAME_PASSWORD, User.class); + TypedQuery query = em.createNamedQuery(Queries.USER_FIND_BY_USERNAME_PASSWORD, + User.class); query.setParameter(1, username); query.setParameter(2, password); List users = query.getResultList(); @@ -103,7 +106,8 @@ public List findUsersByName(String suggest) { @Override public List findUsersByType(RelationshipType type, User user) { - TypedQuery query = em.createNamedQuery(Queries.USER_FIND_BY_RELATIONSHIP_TYPE, User.class); + TypedQuery query = em.createNamedQuery(Queries.USER_FIND_BY_RELATIONSHIP_TYPE, + User.class); query.setParameter(1, type); query.setParameter(2, user); return query.getResultList(); diff --git a/primefaces-webapp/src/main/java/com/mycompany/service/impl/VenueServiceImpl.java b/primefaces-webapp/src/main/java/com/mycompany/service/impl/VenueServiceImpl.java index 8796261..a850bd8 100644 --- a/primefaces-webapp/src/main/java/com/mycompany/service/impl/VenueServiceImpl.java +++ b/primefaces-webapp/src/main/java/com/mycompany/service/impl/VenueServiceImpl.java @@ -33,6 +33,12 @@ import com.mycompany.model.Venue; import com.mycompany.service.VenueService; +/** + * Venue service implementation class. + * + * @author Ian Hlavats (ian@tarantulaconsulting.com) + * + */ @Named("venueService") @Stateless public class VenueServiceImpl extends AbstractService implements VenueService { diff --git a/primefaces-webapp/src/main/java/com/mycompany/util/Queries.java b/primefaces-webapp/src/main/java/com/mycompany/util/Queries.java index 52aa5c1..a1c3fbb 100644 --- a/primefaces-webapp/src/main/java/com/mycompany/util/Queries.java +++ b/primefaces-webapp/src/main/java/com/mycompany/util/Queries.java @@ -24,6 +24,7 @@ */ package com.mycompany.util; +import com.mycompany.model.City; import com.mycompany.model.Content; import com.mycompany.model.Country; import com.mycompany.model.Event;