## ---------------------------------------------------------------
## Beanクラスの設定
## ---------------------------------------------------------------

package ${propertyList.pkgName}.bean;

## ---------------------------------------------------------------
## 外部参照定義 
## ---------------------------------------------------------------
#foreach($fkPropertyList in $fkPropertyListMap)
#if ( ${fkPropertyList.pkgName} != ${propertyList.pkgName} )
import ${fkPropertyList.pkgName}.${fkPropertyList.className};
#end
#end

// ----------------------------------------------------------------
// DB-MAP-TOOLが生成したクラスです
// ----------------------------------------------------------------
/**
 * $propertyList.note
 * @author $propertyList.author
 * 作成日 ${propertyList.date}
*/
public class $propertyList.className {
	//テーブルマッピング情報の定義
    public static final String TABLE = "${propertyList.tableName}";
	//フィールドマッピング情報の定義
#foreach($property in $propertyList)
#if (${property.primary} == true)
    public static final String PK_COLUM_${property.propertyName} = "${property.fieldName}";
#else
    public static final String COLUM_${property.propertyName} = "${property.fieldName}";
#end
#end

## ---------------------------------------------------------------
## 外部参照定義
## ---------------------------------------------------------------
#foreach($fkPropertyList in $fkPropertyListMap)
	public static final String FK_TABLE_${fkPropertyList.refName} = "${fkPropertyList.tableName}";
#foreach($property in $fkPropertyList)
	public static final String FK_COLUM_${property.foreignPropertyName}_${property.propertyName} = "${property.fieldName}";
#end
#end


## ---------------------------------------------------------------
## プロパティの設定
## ---------------------------------------------------------------
#foreach($property in $propertyList)
	/** ${property.note} */
#if(${property.fieldDef} != "")
	protected ${property.propertyType} ${property.propertyName} = ${property.fieldDefBean};
#else
    protected ${property.propertyType} ${property.propertyName};
#end
#end

## ---------------------------------------------------------------
##外部参照プロパティの定義
## ---------------------------------------------------------------
#foreach($fkPropertyList in $fkPropertyListMap)
#foreach($property in $fkPropertyList)
	protected ${fkPropertyList.className} ${property.foreignPropertyName};
#end
#end

#foreach($property in $propertyList)
## ---------------------------------------------------------------
## getterメソッドの設定
## ---------------------------------------------------------------
    /**
     * ${property.note}を取得します
     * @return ${property.propertyName}を返します
    */
    public ${property.propertyType} ${property.getterString}(){
        return ${property.propertyName};
    }
    
## ---------------------------------------------------------------
## setterメソッドの設定
## ---------------------------------------------------------------
    /**
     * ${property.note}を設定します
     * @return ${property.propertyName}を設定します
    */
    public void ${property.setterString}( $property.propertyType $property.propertyName ){
        this.${property.propertyName} = ${property.propertyName};
    }
    
#end

## ---------------------------------------------------------------
##外部参照プロパティのあく切磋メソッドの定義
## ---------------------------------------------------------------
#foreach($fkPropertyList in $fkPropertyListMap)
#foreach($property in $fkPropertyList)
	
## ---------------------------------------------------------------
## getterメソッドの設定
## ---------------------------------------------------------------
    /**
     * 外部参照プロパティのセットメソッドを定義します<BR>
     * ${property.propertyName}を取得します
     * @return ${fkPropertyList.className}を返します
    */
    public ${fkPropertyList.className} ${property.fkGetterString}(){
        return ${property.foreignPropertyName};
    }
    
## ---------------------------------------------------------------
## setterメソッドの設定
## ---------------------------------------------------------------
    /**
     * 外部参照プロパティのゲットメソッドを定義します<BR>
     * ${property.propertyName}を設定します
     * @return ${property.propertyName}を設定します
    */
    public void ${property.fkSetterString}( ${fkPropertyList.className} ${property.foreignPropertyName} ){
        this.${property.foreignPropertyName} = ${property.foreignPropertyName};
    }
    
#end
#end

}
