動的htmlページの生成(一)
4454 ワード
需要:以下の3つのModelクラスに基づいてhtmlページを動的に生成し、ユーザーにパラメータを設定させ、データストアデータベースを取得する.
public class Policy implements Serializable
{
//
private static final long serialVersionUID = -3934515492869305972L;
private String name;
private String level;
private String display;
private List<PolicyParam> params;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getLevel()
{
return level;
}
public void setLevel(String level)
{
this.level = level;
}
public String getDisplay()
{
return display;
}
public void setDisplay(String display)
{
this.display = display;
}
public List<PolicyParam> getParams()
{
return params;
}
public void setParams(List<PolicyParam> params)
{
this.params = params;
}
}
public class PolicyParam implements Serializable
{
//
private static final long serialVersionUID = 1L;
private String name;
private String policyName;
private String valueRange;
private String display;
private String type;
private String tips;
private List<Unit> units;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getPolicyName()
{
return policyName;
}
public void setPolicyName(String policyName)
{
this.policyName = policyName;
}
public String getValueRange()
{
return valueRange;
}
public void setValueRange(String valueRange)
{
this.valueRange = valueRange;
}
public String getType()
{
return type;
}
public void setType(String type)
{
this.type = type;
}
public String getDisplay()
{
return display;
}
public void setDisplay(String display)
{
this.display = display;
}
public String getTips()
{
return tips;
}
public void setTips(String tips)
{
this.tips = tips;
}
public List<Unit> getUnits()
{
return units;
}
public void setUnits(List<Unit> units)
{
this.units = units;
}
}
public class Unit implements Serializable
{
//
private static final long serialVersionUID = 1L;
private String name;
private String policyName;
private String paramName;
private String display;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getPolicyName()
{
return policyName;
}
public void setPolicyName(String policyName)
{
this.policyName = policyName;
}
public String getParamName()
{
return paramName;
}
public void setParamName(String paramName)
{
this.paramName = paramName;
}
public String getDisplay()
{
return display;
}
public void setDisplay(String display)
{
this.display = display;
}
}