Java クラスの変更
新しいリレーションシップを実装するには、 PlusDutyStationPlanRound Java™クラスを拡張する必要があります。
パラメータを以前に定義したリレーションシップに合わせるには、Javaクラスの以下の部分を、コードをハイライトして、要件に合うように変更する必要があります:
コード例
PlusDutyStationPlanRound
public MboSetRemote getSUM_MULTI8_READING() throws MXException, RemoteException
{
return getVX_DutyRoundReading("SUM_MULTI8_READING");
}
public MboSetRemote getV1_SUM_MULTI8() throws MXException, RemoteException
{
return getVX_DutyRoundReading("V1_SUM_MULTI8");
}
public MboSetRemote getV1_SUM_MULTI8_S() throws MXException, RemoteException
{
return getVX_PlusDutyPLRound("V1_SUM_MULTI8_S");
}
PlusDutyStationPlanRoundRemote Javaクラスを継承するJavaインターフェース・クラスの命名規則は以下の通り:
- RELATIONSHIP_VX_FORMULANAME_BASE
- RELATIONSHIP_VX_FORMULANAME_S_BASE
public static String RELATIONSHIP_V1_DUTYROUNDREADING_BASE =
"readingvalue is not null and shiftid=:plusdutyroundreading.shiftid" +
" and exists (select 1 from plusdutyplround" +
" where plusdutyplroundid=plusdutyroundreading.plusdutyplroundid and siteid=:siteid and stationid=:stationid and revisionnum=:revisionnum" +
" and (unit=:unit or unit is null and (:unit='' or :unit is null))" +
" and location in" +
" (case when :plusdutycalcparam1.paramvalue is null then 'NULL' else :plusdutycalcparam1.paramvalue end)" +
" and metername=:metername)" +
" and exists (select 1 from plusduty" +
" where siteid=:siteid and stationid=:stationid and revisionnum=:revisionnum and (unit=:unit or unit is null and (:unit='' or :unit is null))" +
" and shiftid=plusdutyroundreading.shiftid and shiftid=:plusdutyroundreading.shiftid)" +
" and not exists (select 1 from plusdutyroundreading x" +
" where x.readingvalue is not null and x.plusdutyplroundid=plusdutyroundreading.plusdutyplroundid" +
" and exists (select 1 from plusduty" +
" where (siteid=:siteid and stationid=:stationid and revisionnum=:revisionnum" +
" and (unit=:unit or unit is null and (:unit='' or :unit is null))" +
" and shiftid=plusdutyroundreading.shiftid and shiftid=:plusdutyroundreading.shiftid))" +
" and x.plusdutyroundreadingid > plusdutyroundreading.plusdutyroundreadingid)";
public static String RELATIONSHIP_SUM_MULTI8_READING_BASE = RELATIONSHIP_AVGREADING_BASE;
public static String RELATIONSHIP_V1_SUM_MULTI8_BASE = RELATIONSHIP_V1_DUTYROUNDREADING_BASE;
public static String RELATIONSHIP_V2_SUM_MULTI8_BASE = RELATIONSHIP_V1_SUM_MULTI8_BASE.replace("plusdutycalcparam1", "plusdutycalcparam2");
…
public static String RELATIONSHIP_V1_SUM_MULTI8_S_BASE = RELATIONSHIP_V1_SPCIFIED_LOCATION_SAVING_PARAM_CHECK;
public static String RELATIONSHIP_V2_SUM_MULTI8_S_BASE = RELATIONSHIP_V1_SUM_MULTI8_S_BASE.replace("param1value", "param2value");