FileDocCategorySizeDatePackage
Subscriber.javaAPI DocExample1208Tue Jun 08 11:26:42 BST 2004com.mycompany.newsservice.models

Subscriber

public class Subscriber extends Object
This class is an example of a JSF-independent business logic class. It represents a Subscriber of a fictitious newsletter subscription service.
author
Hans Bergsten, Gefion Software
version
1.0

Fields Summary
private String
emailAddr
private String[]
subscriptionIds
Constructors Summary
Methods Summary
public java.lang.StringgetEmailAddr()

        return emailAddr;
    
public java.lang.String[]getSubscriptionIds()

        return subscriptionIds;
    
public voidsave()

        StringBuffer subscriptions = new StringBuffer();
        if (subscriptionIds != null) {
            for (int i = 0; i < subscriptionIds.length; i++) {
                subscriptions.append(subscriptionIds[i]).append(" ");
            }
        }
        System.out.println("Subscriber Email Address: " + emailAddr +
                           "\nSubscriptions: " + subscriptions);
    
public voidsetEmailAddr(java.lang.String emailAddr)

        this.emailAddr = emailAddr;
    
public voidsetSubscriptionIds(java.lang.String[] subscriptionIds)

        this.subscriptionIds = subscriptionIds;