このファイルは実際に使われている
Slim3のデータ格納定義クラスのJavaファイルをtxtにしたもの


package jp.ifrog.grauge.dao.account;

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

import jp.ifrog.genbuframework.util.CalendarUtil;
import jp.ifrog.genbuframework.util.DateUtil;
import jp.ifrog.genbuframework.util.TextUtil;
import jp.ifrog.genbuframework.validation.StringChecker;

import org.slim3.datastore.Attribute;
import org.slim3.datastore.Model;
import org.slim3.datastore.ModificationDate;

import com.google.appengine.api.datastore.Key;

/**
 * アカウント 定義
 * 
 * @author AutoGenerator
 * 
 */
@Model(schemaVersion = 1)
public class Account implements Serializable {

	private static final long serialVersionUID = 1L;

	/** アカウント プライマリキー (E) */
	@Attribute(primaryKey = true)
	private Key key;

	/** アカウント名 [なし] */
	@Attribute(unindexed = true)
	private String accountName;

	/** アカウント名かな [ひらがな] */
	private String accountNameKana;

	/** パソコンEメール [なし] */
	@Attribute(unindexed = true)
	private Boolean pcEmailFlg = Boolean.FALSE;

	/** ケータイEメール [なし] */
	@Attribute(unindexed = true)
	private Boolean mobileEmailFlg = Boolean.FALSE;

	/** パスワード [なし] */
	@Attribute(unindexed = true)
	private Boolean passwdFlg = Boolean.FALSE;

	/** 写真フラグ [なし] */
	@Attribute(unindexed = true)
	private Boolean photoFlg = Boolean.FALSE;

	/** 携帯識別番号 [なし] */
	@Attribute(unindexed = true)
	private Boolean phoneDevice = Boolean.FALSE;

	/** 操作レベル [半角数値] 10スタイリスト 30アシスタント */
	@Attribute(unindexed = true)
	private Integer grade = new Integer(30);

	/** 表示順序 [半角数値] */
	private Integer viewSeq = new Integer(10);

	/** レコード更新時間 [なし] */
	@Attribute(listener = ModificationDate.class, unindexed = true)
	private Date updateTs;

	/** 有効レコードフラグ [なし] */
	private Boolean validFlg = Boolean.TRUE;


	/**
	 * Blodを除く全メンバのコンストラクタ
	 */
	public Account(String accountName, String accountNameKana, String pcEmailFlg, String mobileEmailFlg, String passwdFlg, String photoFlg, String phoneDevice, String grade, String viewSeq, String updateTs, String validFlg) {
		setAccountName(accountName);
		setAccountNameKana(accountNameKana);
		setPcEmailFlg(pcEmailFlg);
		setMobileEmailFlg(mobileEmailFlg);
		setPasswdFlg(passwdFlg);
		setPhotoFlg(photoFlg);
		setPhoneDevice(phoneDevice);
		setGrade(grade);
		setViewSeq(viewSeq);
		setUpdateTs(updateTs);
		setValidFlg(validFlg);
	}


	/**
	 * デフォルトコンストラクタ
	 */
	public Account() {
	}


	public Key getKey() {
		return key;
	}


	public void setKey(Key key) {
		this.key = key;
	}


	public final String getAccountName() {
		return TextUtil.guardNull(accountName);
	}


	public final void setAccountName(String accountName) {
		if (StringChecker.isNotNullOrLengthZero(accountName)) {
			this.accountName = accountName;
		}
	}


	public final String getAccountNameKana() {
		return TextUtil.guardNull(accountNameKana);
	}


	public final void setAccountNameKana(String accountNameKana) {
		if (StringChecker.isNotNullOrLengthZero(accountNameKana)) {
			this.accountNameKana = accountNameKana;
		}
	}


	public Boolean getPcEmailFlg() {
		return pcEmailFlg;
	}


	public String getPcEmailFlg(String tVal, String fVal) {
		if (null == pcEmailFlg) {
			return fVal;
		} else if (pcEmailFlg) {
			return tVal;
		}
		return fVal;
	}


	public void setPcEmailFlg(Boolean pcEmailFlg) {
		this.pcEmailFlg = pcEmailFlg;
	}


	public void setPcEmailFlg(String pcEmailFlg) {
		if (StringChecker.isNotNullOrLengthZero(pcEmailFlg)) {
			setPcEmailFlg(Boolean.valueOf(pcEmailFlg));
		}
	}


	public Boolean getMobileEmailFlg() {
		return mobileEmailFlg;
	}


	public String getMobileEmailFlg(String tVal, String fVal) {
		if (null == mobileEmailFlg) {
			return fVal;
		} else if (mobileEmailFlg) {
			return tVal;
		}
		return fVal;
	}


	public void setMobileEmailFlg(Boolean mobileEmailFlg) {
		this.mobileEmailFlg = mobileEmailFlg;
	}


	public void setMobileEmailFlg(String mobileEmailFlg) {
		if (StringChecker.isNotNullOrLengthZero(mobileEmailFlg)) {
			setMobileEmailFlg(Boolean.valueOf(mobileEmailFlg));
		}
	}


	public Boolean getPasswdFlg() {
		return passwdFlg;
	}


	public String getPasswdFlg(String tVal, String fVal) {
		if (null == passwdFlg) {
			return fVal;
		} else if (passwdFlg) {
			return tVal;
		}
		return fVal;
	}


	public void setPasswdFlg(Boolean passwdFlg) {
		this.passwdFlg = passwdFlg;
	}


	public void setPasswdFlg(String passwdFlg) {
		if (StringChecker.isNotNullOrLengthZero(passwdFlg)) {
			setPasswdFlg(Boolean.valueOf(passwdFlg));
		}
	}


	public Boolean getPhotoFlg() {
		return photoFlg;
	}


	public String getPhotoFlg(String tVal, String fVal) {
		if (null == photoFlg) {
			return fVal;
		} else if (photoFlg) {
			return tVal;
		}
		return fVal;
	}


	public void setPhotoFlg(Boolean photoFlg) {
		this.photoFlg = photoFlg;
	}


	public void setPhotoFlg(String photoFlg) {
		if (StringChecker.isNotNullOrLengthZero(photoFlg)) {
			setPhotoFlg(Boolean.valueOf(photoFlg));
		}
	}


	public Boolean getPhoneDevice() {
		return phoneDevice;
	}


	public String getPhoneDevice(String tVal, String fVal) {
		if (null == phoneDevice) {
			return fVal;
		} else if (phoneDevice) {
			return tVal;
		}
		return fVal;
	}


	public void setPhoneDevice(Boolean phoneDevice) {
		this.phoneDevice = phoneDevice;
	}


	public void setPhoneDevice(String phoneDevice) {
		if (StringChecker.isNotNullOrLengthZero(phoneDevice)) {
			setPhoneDevice(Boolean.valueOf(phoneDevice));
		}
	}


	public final Integer getGrade() {
		if (null == grade) {
			return 0;
		} else {
			return grade;
		}
	}


	public final String getGrade(String defVal) {
		if (null == grade) {
			return defVal;
		} else {
			return String.valueOf(grade);
		}
	}


	public final void setGrade(Integer grade) {
		this.grade = grade;
	}


	public final void setGrade(String grade) {
		if (StringChecker.isNotNullOrLengthZero(grade)) {
			setGrade(Integer.valueOf(grade));
		}
	}


	public final Integer getViewSeq() {
		if (null == viewSeq) {
			return 0;
		} else {
			return viewSeq;
		}
	}


	public final String getViewSeq(String defVal) {
		if (null == viewSeq) {
			return defVal;
		} else {
			return String.valueOf(viewSeq);
		}
	}


	public final void setViewSeq(Integer viewSeq) {
		this.viewSeq = viewSeq;
	}


	public final void setViewSeq(String viewSeq) {
		if (StringChecker.isNotNullOrLengthZero(viewSeq)) {
			setViewSeq(Integer.valueOf(viewSeq));
		}
	}


	public final Date getUpdateTs() {
		return CalendarUtil.toJST(updateTs);
	}


	public final String getUpdateTs(String format) {
		if (null == updateTs) {
			return "";
		} else {
			return TextUtil.toDateStr(this.getUpdateTs(), format);
		}
	}


	public final void setUpdateTs(Date updateTs) {
		this.updateTs = updateTs;
	}


	public final void setUpdateTs(String updateTs) {
		if (StringChecker.isNotNullOrLengthZero(updateTs)) {
			this.updateTs = DateUtil.toDate(updateTs);
		}
	}


	public Boolean getValidFlg() {
		return validFlg;
	}


	public String getValidFlg(String tVal, String fVal) {
		if (null == validFlg) {
			return fVal;
		} else if (validFlg) {
			return tVal;
		}
		return fVal;
	}


	public void setValidFlg(Boolean validFlg) {
		this.validFlg = validFlg;
	}


	public void setValidFlg(String validFlg) {
		if (StringChecker.isNotNullOrLengthZero(validFlg)) {
			setValidFlg(Boolean.valueOf(validFlg));
		}
	}

}
