modificaciones de clase Java
Para implementar las nuevas relaciones, debe ampliar la clase PlusDutyStationPlanRound Java™.
Para que un parámetro se alinee con las relaciones que definió previamente, el siguiente fragmento de la clase Java con el código resaltado debe modificarse para cumplir sus requisitos:
Código de ejemplo
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");
}
La convención de nomenclatura para la clase de interfaz Java que extiende la clase Java PlusDutyStationPlanRoundRemote es:
- 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");