jp.co.ctc_g.jse.amqp.showcase.business.domain.UserProfile.java Source code

Java tutorial

Introduction

Here is the source code for jp.co.ctc_g.jse.amqp.showcase.business.domain.UserProfile.java

Source

/*
 * Copyright (c) 2013 ITOCHU Techno-Solutions Corporation.
 *
 * 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 jp.co.ctc_g.jse.amqp.showcase.business.domain;

import java.io.Serializable;
import java.util.Date;

import jp.co.ctc_g.jse.core.validation.constraints.MaxLength;
import jp.co.ctc_g.jse.core.validation.constraints.Required;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.deser.std.DateDeserializer;
import org.codehaus.jackson.map.ser.std.DateSerializer;

/**
 * <p>
 * ????????
 * </p>
 * @author ITOCHU Techno-Solutions Corporation.
 */
public class UserProfile implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ?UID
     */
    private String uid;

    /**
     * ID
     */
    private Integer id;

    /**
     * ??
     */
    @Required
    @MaxLength(10)
    private String name;

    /**
     * 
     */
    @Required
    @JsonSerialize(using = DateSerializer.class)
    @JsonDeserialize(using = DateDeserializer.class)
    private Date birthday;

    /**
     * ??
     */
    public UserProfile() {
    }

    /**
     * ?UID???
     * @return ?UID
     */
    public String getUid() {
        return uid;
    }

    /**
     * ?UID???
     * @param uid ?UID
     */
    public void setUid(String uid) {
        this.uid = uid;
    }

    /**
     * id ???
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * id ???
     * @param id id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * ?? ???
     * @return ??
     */
    public String getName() {
        return name;
    }

    /**
     * ?? ???
     * @param name ??
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     *  ???
     * @return 
     */
    public Date getBirthday() {
        return birthday;
    }

    /**
     *  ???
     * @param birthday 
     */
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SIMPLE_STYLE);
    }

}