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(); } }