psdi.app.ticket

Class RelatedRecord

  • java.lang.Object
  • All Implemented Interfaces:
    java.rmi.Remote, RelatedRecordRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class RelatedRecord
    extends Mbo
    implements RelatedRecordRemote
    MBO to represent a RelatedRecord See the Ticket package description for details.

    This is a system level object.

    There are no key attributes for this object.

    The attributes in this object are as follows:

    CLASS Type of the ticket
    ORGID Constraint Identifier of the organization
    RECORDKEY Key for the Record
    Type of the related record
    Related Record Key
    RELATEDRECORDID Unique Identifier
    RELATEDRECORGID Organization Identifier for Related Record
    RELATEDRECSITEID Site Identifier for Related Record
    Related work order's woclass'
    Related Record wonum
    RELATETYPE Relationship for the related record
    SITEID Unique Identifier of the Site

    • Constructor Detail

      • RelatedRecord

        public RelatedRecord(MboSet ms)
                      throws MXException,
                             java.rmi.RemoteException
        Construct the RelatedRecord object
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Sets default values for a new RelatedRecord
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Method that checks whether a relatedRecord can be deleted or not.
        Overrides:
        canDelete in class Mbo
        Throws:
        java.rmi.RemoteException
        MXException
      • canEdit

        public void canEdit()
                     throws MXException,
                            java.rmi.RemoteException
        Method that checks whether a relatedRecord can be deleted or not.
        Throws:
        java.rmi.RemoteException
        MXException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        checks for the duplicated related records for a given ticket.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accesscheck)
                    throws MXException,
                           java.rmi.RemoteException
        checks for the for the other way
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accesscheck - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • checkOwnRelatedRec

        protected void checkOwnRelatedRec(java.lang.String relRecKey,
                                          java.lang.String relRecclass,
                                          java.lang.String relRecSite)
                                   throws MXException,
                                          java.rmi.RemoteException
        /** A ticket cannot relate to itself
        Parameters:
        relRecKey - relatedRecKey for the new related record
        relRecclass - realtedRecclass for the new related record
        Throws:
        MXException - If related record key and class are same as owner's key and class, MXApplicationException("ticket", "NoOwnParent")
        java.rmi.RemoteException
      • checkDuplicateRelatedRec

        protected void checkDuplicateRelatedRec(boolean relatedTicket,
                                                java.lang.String relRecKey,
                                                java.lang.String relRecclass,
                                                java.lang.String relRecSite)
                                         throws MXException,
                                                java.rmi.RemoteException
        checks for the duplicated related records.
        Parameters:
        relRecKey - relatedRecKey for the new related record
        relRecclass - realtedRecclass for the new related record
        Throws:
        MXException - If same related record is listed more than one time for a given ticket, MXApplicationException("ticket", "NoDupRelRecord")
        java.rmi.RemoteException
      • copyRelatedRecSiteOrg

        protected void copyRelatedRecSiteOrg(MboRemote relatedRecordMbo)
                                      throws MXException,
                                             java.rmi.RemoteException
        copies the siteid and orgid of the related ticket or workorder to the RelatedRecord's "relatedrecsiteid" and "relatedrecorgid".
        Throws:
        MXException
        java.rmi.RemoteException
      • validateRelTkIdAndRelTkClass

        protected MboRemote validateRelTkIdAndRelTkClass(boolean relatedTicket,
                                                         java.lang.String relRecKey,
                                                         java.lang.String relRecclass,
                                                         java.lang.String relRecSite)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        Checks whether the entered combination of relatedreckey and relatedrecclass exists or not. If the combination doesnot exist, throws an exception.
        Returns:
        retMbo RelatedRecordMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getMatchingRelateType

        public java.lang.String getMatchingRelateType()
                                               throws MXException,
                                                      java.rmi.RemoteException
        IV75923: the RELATETYPE to be used when this RELATEDRECORD is creating another RELATEDRECORD, copying the logic from the add() method.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException