accountmodel.java~

来自「J2EE & Tomcat books published by hope」· JAVA~ 代码 · 共 64 行

JAVA~
64
字号
/*
 * $Id: AccountModel.java~,v 1.3 2002/04/26 00:52:05 jc123804 Exp $
 * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
 * Copyright 2001 Sun Microsystems, Inc. Tous droits r閟erv閟.
 */

package com.sun.j2ee.blueprints.customer.account.model;

import java.rmi.RemoteException;

import com.sun.j2ee.blueprints.customer.util.ContactInformation;

/**
 * This class provides methods to view and modify account
 * information for a particular account.
 */
public class AccountModel implements java.io.Serializable {

    protected String userId;
    private String status;
    private ContactInformation info;

    public AccountModel(String userId, String status,
                        ContactInformation info) {
        this.userId = userId;
        this.status = status;
        this.info = info;
    }

    /**
     * Class constructor with no arguments, used by the web tier.
     */
    public AccountModel() {}

    // get and set methods for the instance variables

    public String getUserId() {
        return userId;
    }

    public String getStatus() {
        return status;
    }

    public ContactInformation getContactInformation() {
        return info;
    }

    public String toString() {
        String ret = null;
        ret = "userId = " + userId + "\n";
        ret += "status = " + status + "\n";
        ret += "contact info = " + info.toString() + "\n";
        return ret;
    }

    /** shallow copy */
    public void copy(AccountModel other) {
        this.userId = other.userId;
        this.status = other.status;
        this.info = other.info;
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?