/*
 * Copyright 2006 Takahiro Nakamura.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package woolpack.samples.crud;

import java.io.Serializable;

public class SampleBean implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private int userId;
	private String name;
	private int sex;
	private int address;
	private int age;
	private String[] hobby;
	private String comment;
	
	public SampleBean() {
		userId = -1;
		name = null;
		sex = -1;
		address = -1;
		age = -1;
		hobby = null;
		comment = null;
	}
	
	public int getUserId() {
		return userId;
	}
	public void setUserId(final int userId) {
		this.userId = userId;
	}
	public String getName() {
		return name;
	}
	public void setName(final String name) {
		this.name = name;
	}
	public int getSex() {
		return sex;
	}
	public void setSex(final int sex) {
		this.sex = sex;
	}

	public int getAddress() {
		return address;
	}

	public void setAddress(final int address) {
		this.address = address;
	}

	public int getAge() {
		return age;
	}

	public void setAge(final int age) {
		this.age = age;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(final String comment) {
		this.comment = comment;
	}

	public String[] getHobby() {
		return (String[]) hobby.clone();
	}

	public void setHobby(final String[] hobby) {
		this.hobby = (String[]) hobby.clone();
	}

	public void setHobby(final String hobby) {
		this.hobby = new String[]{hobby};
	}
}
