/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.taglibs.standard.examples.beans;
import java.util.Date;
import java.text.*;
/**
* Object that represents a Customer.
*
* @author Pierre Delisle
* @version $Revision: 1.1.62.1 $ $Date: 2006/01/18 20:00:34 $
*/
public class Customer {
//*********************************************************************
// Instance variables
/** Holds value of property key. */
int key;
/** Holds value of property lastName. */
private String lastName;
/** Holds value of property firstName. */
private String firstName;
/** Holds value of property birthDate. */
private Date birthDate;
/** Holds value of property address. */
private Address address;
/** Holds value of property phoneHome. */
private String phoneHome;
/** Holds value of property phoneCell. */
private String phoneCell;
static DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
//*********************************************************************
// Constructors
public Customer() {}
public Customer(int key,
String lastName,
String firstName,
Date birthDate,
Address address,
String phoneHome,
String phoneCell) {
init(key, lastName, firstName, birthDate, address, phoneHome, phoneCell);
}
public void init(int key,
String lastName,
String firstName,
Date birthDate,
Address address,
String phoneHome,
String phoneCell) {
setKey(key);
setLastName(lastName);
setFirstName(firstName);
setBirthDate(birthDate);
setAddress(address);
setPhoneHome(phoneHome);
setPhoneCell(phoneCell);
}
//*********************************************************************
// Properties
/**
* Getter for property key.
* @return Value of property key.
*/
public int getKey() {
return key;
}
/**
* Setter for property key.
* @param key New value of property key.
*/
public void setKey(int key) {
this.key = key;
}
/**
* Getter for property lastName.
* @return Value of property lastName.
*/
public String getLastName() {
return lastName;
}
/**
* Setter for property lastName.
* @param lastName New value of property lastName.
*/
public void setLastName(String lastName) {
this.lastName = lastName;
}
/**
* Getter for property firstName.
* @return Value of property firstName.
*/
public String getFirstName() {
return firstName;
}
/**
* Setter for property firstName.
* @param firstName New value of property firstName.
*/
public void setFirstName(String firstName) {
this.firstName = firstName;
}
/**
* Getter for property birthDate.
* @return Value of property birthDate.
*/
public Date getBirthDate() {
return birthDate;
}
/**
* Setter for property birthDate.
* @param birthDate New value of property birthDate.
*/
public void setBirthDate(Date birthDate) {
this.birthDate = birthDate;
}
/**
* Getter for property address.
* @return Value of property address.
*/
public Address getAddress() {
return address;
}
/**
* Setter for property address.
* @param address New value of property address.
*/
public void setAddress(Address address) {
this.address = address;
}
/**
* Getter for property phoneHome.
* @return Value of property phoneHome.
*/
public String getPhoneHome() {
return phoneHome;
}
/**
* Setter for property phoneHome.
* @param phoneHome New value of property phoneHome.
*/
public void setPhoneHome(String phoneHome) {
this.phoneHome = phoneHome;
}
/**
* Getter for property phoneCell.
* @return Value of property phoneCell.
*/
public String getPhoneCell() {
return phoneCell;
}
/**
* Setter for property phoneCell.
* @param phoneCell New value of property phoneCell.
*/
public void setPhoneCell(String phoneCell) {
this.phoneCell = phoneCell;
}
//*********************************************************************
// Utility Methods
/**
* Return a String representation of this object.
*/
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("[").append(key).append("] ");
sb.append(getLastName()).append(", ");
sb.append(getFirstName()).append(" ");
sb.append(df.format(getBirthDate())).append(" ");
sb.append(getAddress()).append(" ");
if(getPhoneHome() != null) sb.append(getPhoneHome()).append(" ");
if(getPhoneCell() != null) sb.append(getPhoneCell());
return (sb.toString());
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
JSTLExample 例子
共120个文件
jsp:73个
java:22个
html:13个
需积分: 0 7 下载量 19 浏览量
2008-03-07
14:00:20
上传
评论
收藏 98KB RAR 举报
温馨提示
JSTLExample 例子
资源详情
资源评论
资源推荐
收起资源包目录
JSTLExample 例子 (120个子文件)
global.css 125B
ExamplesTemplate.dwt 2KB
execute.gif 1KB
return.gif 1KB
code.gif 292B
index.html 6KB
index.html 6KB
index.html 6KB
index.html 6KB
index.html 5KB
index.html 5KB
index.html 4KB
index.html 4KB
index.html 4KB
links.html 3KB
index.html 2KB
links.html 2KB
relativeLinks.html 757B
Customer.java 7KB
Init.java 7KB
Address.java 6KB
ResourceTag.java 6KB
EscapeHtmlTag.java 5KB
CustomerFmtTag.java 5KB
FileTag.java 5KB
UsCustomerTag.java 5KB
Customers.java 5KB
Functions.java 4KB
Util.java 4KB
ServletResponseWrapperForWriter.java 4KB
LocalesTag.java 4KB
OddTag.java 3KB
IOBean.java 3KB
EvenTag.java 3KB
DefaultLocaleTag.java 3KB
NullAttributeException.java 3KB
Resources_de.java 648B
Resources.java 631B
Resources_fr.java 628B
Resources_it.java 329B
SubstringContained.jsp 5KB
index.jsp 4KB
StringSubset.jsp 4KB
index.jsp 4KB
Demo.jsp 3KB
FormatDateTime.jsp 3KB
FormatDateTimeBrowserLocale.jsp 3KB
Update.jsp 3KB
QueryIterate.jsp 2KB
QueryDirect.jsp 2KB
ParametricReplacement.jsp 2KB
SplitJoin.jsp 2KB
ForEach.jsp 2KB
FormatNumberBrowserLocale.jsp 2KB
QueryParam.jsp 2KB
Out.jsp 2KB
Status.jsp 2KB
IteratorTest.jsp 2KB
Extensability.jsp 1KB
Transaction.jsp 1KB
Encode.jsp 1KB
FormatNumber.jsp 1KB
Replace.jsp 1KB
Trim.jsp 1KB
Transform.jsp 1KB
StringCapitalization.jsp 1KB
Out.jsp 1KB
ShowSource.jsp 1KB
When.jsp 1KB
Collaboration.jsp 1KB
session.jsp 1023B
DataTypes.jsp 1011B
Set.jsp 996B
CustomLogicTag.jsp 937B
EscapeXml.jsp 840B
PermittedTaglibsOk.jsp 836B
Length.jsp 761B
PermittedTaglibsError.jsp 760B
ScriptFreeOk.jsp 756B
MissingResourceBundle.jsp 744B
FailureLocal.jsp 737B
Choose.jsp 720B
TransformWithInclusion.jsp 703B
RequestEncoding.jsp 658B
EncodeContextRelative.jsp 650B
ForTokens.jsp 625B
GermanUmlautCorrect.jsp 544B
Filter.jsp 543B
ParseWithEntities.jsp 538B
Set2.jsp 526B
If.jsp 518B
Parse.jsp 507B
GermanUmlautIncorrect.jsp 506B
session.jsp 502B
ContextRelative.jsp 476B
If.jsp 453B
ItalianLocale.jsp 441B
Param.jsp 440B
Set.jsp 436B
PrefixAttribute.jsp 422B
共 120 条
- 1
- 2
kindy1022
- 粉丝: 30
- 资源: 32
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0