psdi.app.pr

Class PRTerm

  • All Implemented Interfaces:
    java.rmi.Remote, PRTermRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class PRTerm
    extends Mbo
    implements PRTermRemote
    MBO to represent PR Terms and Conditions. The PRTERM object represents the terms and conditions for a PR. These terms and conditions are to be defined at the organization and site level.

    The key attributes for this object are OrgID and PONUM

    The attributes in this object are as follows:

    Attribute NameAttribute Description
    PRNUMPurchase Order Number
    SEQNUMSequence order of the terms
    TermIdTerm or Condition to which the Terms apply.
    DescriptionDescription of the Term.
    LDKEY Long Description Key
    SiteidSite Identifier
    OrgidOrganization Identifier
    Description_longdescription Long Description for Term Description
    • Method Detail

      • init

        public void init()
                  throws MXException
        Initialized PRTerm mbo. Set all PRTERM fields to readonly when fetched from database if the CANEDIT field is set to false
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        This is called when a new PRTERM object is added to the PRTERM MboSet collection. The field defaults and field flags are set here.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Validating that either TERM or TERM Description is entered.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        This method overrides the skipCopyField() in the Mbo.Since this method takes the MboValueInfo as its parameter just check to see if this field needs to be copied or skipped.If this field does not need to be copied return true.
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        - - The MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        - True,if the field does not need to be copied.In all other cases return false.
        Throws:
        java.rmi.RemoteException
        MXException
      • generateSeqNumID

        protected int generateSeqNumID()
                                throws MXException,
                                       java.rmi.RemoteException
        Generates a unique Seq ID with an interval.
        Throws:
        MXException
        java.rmi.RemoteException
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        Description copied from class: Mbo
        This called whenever a change is made to the attributes of a MBO. The programmer should override if interested in intercepting this event. An example of the use of this is to set the changeby/changedate of a work order whenever one of the attributes is set. If an MXException is thrown from this routine, the change of value is rolled back, this provides a mechanism to abort any changes. Default behavior is to do nothing. The derived method has to call super.modify().
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessmodifier)
                    throws MXException,
                           java.rmi.RemoteException
        Description copied from class: Mbo
        Mark the object to be deleted depending on the access modifier. This will usually be overridden in the subclass of Mbo as there may be application specific rules as to if and when an object can be deleted. Object is not actually deleted in the database until save() is called. This method will also mark all associated Long Description and Translation Mbos for deletion.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessmodifier - 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)
      • propagateKeyValue

        public void propagateKeyValue(java.lang.String keyName,
                                      java.lang.String keyValue)
                               throws MXException,
                                      java.rmi.RemoteException
        Set value for PRNUM.
        Specified by:
        propagateKeyValue in interface MboRemote
        Overrides:
        propagateKeyValue in class Mbo
        Parameters:
        keyName - Should equal "PRNUM" or else nothing will be propagated.
        keyValue - The new value of PRNUM.
        Throws:
        MXException
        java.rmi.RemoteException