EmailKey.java 919 Bytes
Newer Older
Kim Gyeongeun committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
package jp.agentec.sinaburocast.vo;

import java.util.Date;

import jp.agentec.sinaburocast.common.SinaburoConstant.Formats;
import jp.agentec.sinaburocast.common.util.SinaburoUtil;

import org.apache.commons.lang.builder.StandardToStringStyle;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * ユーザ登録用Emailキー保存用データオブジェクト
 * 
 * @author tsukada
 *
 */
public class EmailKey {
	public String email;
	public Date expired;
	
	public EmailKey(String email, Date expired) {
		this.email = email;
		this.expired = expired;
	}

	public EmailKey(String commaSeperated) {
		String[] val = commaSeperated.split(",");
		this.email = val[0];
		this.expired = SinaburoUtil.convertStringToTimestamp(val[1], Formats.DATE_TIME);
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, StandardToStringStyle.SHORT_PREFIX_STYLE).toString();
	}

}