Skip to content

Commit

Permalink
Updated Javadocs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Hlavats committed Jun 5, 2013
1 parent f92757f commit 1b8aad9
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ([email protected])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public interface IdeaService {
/**
* Finds a list of {@link Idea} objects.
*
* @return
* @return A List of Idea objects.
*/
List<Idea> findIdeas();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Base class for service implementations.
*
* @author Ian Hlavats ([email protected])
*
*/
public abstract class AbstractService {

@PersistenceContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
import com.mycompany.service.ChartService;
import com.mycompany.util.Queries;

/**
* Chart service implementation class.
*
* @author Ian Hlavats ([email protected])
*
*/
@Named("chartService")
@Stateless
public class ChartServiceImpl extends AbstractService implements ChartService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
import com.mycompany.service.ContentService;
import com.mycompany.util.Queries;

/**
* Content service implementation class.
*
* @author Ian Hlavats ([email protected])
*
*/
@Named("contentService")
@Stateless
public class ContentServiceImpl extends AbstractService implements ContentService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@
import com.mycompany.util.Queries;

/**
* <p>
* 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 ([email protected])
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
import com.mycompany.service.EventService;
import com.mycompany.util.Queries;

/**
* Event service implementation class.
*
* @author Ian Hlavats ([email protected])
*
*/
@Named("eventService")
@Stateless
public class EventServiceImpl extends AbstractService implements EventService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
import com.mycompany.model.Idea;
import com.mycompany.service.IdeaService;

/**
* Idea service implementation class.
*
* @author Ian Hlavats ([email protected])
*
*/
@Named("ideaService")
@Stateless
public class IdeaServiceImpl extends AbstractService implements IdeaService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
import com.mycompany.util.Queries;

/**
* User service implementation class.
*
* @uml.dependency supplier="javax.persistence.EntityManager"
*/
@Named("userService")
Expand All @@ -59,7 +61,8 @@ public UserRelationship findRelationshipToUser(User user1, User user2) {

@Override
public User findUser(String username, String password) {
TypedQuery<User> query = em.createNamedQuery(Queries.USER_FIND_BY_USERNAME_PASSWORD, User.class);
TypedQuery<User> query = em.createNamedQuery(Queries.USER_FIND_BY_USERNAME_PASSWORD,
User.class);
query.setParameter(1, username);
query.setParameter(2, password);
List<User> users = query.getResultList();
Expand Down Expand Up @@ -103,7 +106,8 @@ public List<User> findUsersByName(String suggest) {

@Override
public List<User> findUsersByType(RelationshipType type, User user) {
TypedQuery<User> query = em.createNamedQuery(Queries.USER_FIND_BY_RELATIONSHIP_TYPE, User.class);
TypedQuery<User> query = em.createNamedQuery(Queries.USER_FIND_BY_RELATIONSHIP_TYPE,
User.class);
query.setParameter(1, type);
query.setParameter(2, user);
return query.getResultList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
import com.mycompany.model.Venue;
import com.mycompany.service.VenueService;

/**
* Venue service implementation class.
*
* @author Ian Hlavats ([email protected])
*
*/
@Named("venueService")
@Stateless
public class VenueServiceImpl extends AbstractService implements VenueService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1b8aad9

Please sign in to comment.