com.ibm.tivoli.maximo.amcrew.workman.beans

Class AMManageCrewQueriesBean

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.http.HttpSessionBindingListener, DataBeanListener


    public class AMManageCrewQueriesBean
    extends DataBean
    Manages the application of queries from the Crew app to the Crew List table in Assignment Manager; this serves the same function as ManageQueriesBean does for all other apps. The getMboSetRemote() and selectrecord() methods are modified versions of those same methods in ManageQueriesBean. There is no save() method here, however, because most of that method in ManageQueriesBean is concerned with updating the combo box. Since there is no equivalent control for the Crew List table, that part of the method did not need to be duplicated. All that remained was the call to super.save, which the framework will take care of without any explicit call here.
    • Constructor Detail

      • AMManageCrewQueriesBean

        public AMManageCrewQueriesBean()
    • Method Detail

      • getMboSetRemote

        public MboSetRemote getMboSetRemote()
                                     throws MXException,
                                            java.rmi.RemoteException
        This is identical to getMboSetRemote in ManageQueriesBean except that instead of fetching the ID of the current app, we pass the getQueriesForUser method the hard-coded name of the Crew app, because it's those queries that we wish to retrieve.
        Overrides:
        getMboSetRemote in class DataBean
        Throws:
        MXException
        java.rmi.RemoteException
      • selectrecord

        public int selectrecord()
                         throws MXException,
                                java.rmi.RemoteException
        In general structure this is similar to selectrecord in ManageQueriesBean except that AMCrewTableBean (the databean of the Crew List table) is being operated on rather than the results bean or the AppBean. However, a simple call to the useStoredQuery method wouldn't work because we retrieve queries created in the Crew app but the mboset bound to the table is a LaborCraftRateSet. It is thus necessary to intervene in the middle of the program flow to alter the query. All the code within the IF block is in lieu of a useStoredQuery call. The regular program flow is to call DataBean.useStoredQuery() which in turn calls MboSet.useStoredQuery(). Our intervention comes in the middle of the MboSet actions. All the code from both these methods has been copied or mimicked in this method, with the source of each block labeled for future reference.
        Overrides:
        selectrecord in class DataBean
        Throws:
        MXException
        java.rmi.RemoteException