psdi.app.contract

Class ContractLine

  • java.lang.Object
  • All Implemented Interfaces:
    java.rmi.Remote, ContractLineRemote, MboConstants, MboRemote, MaxRemoteProxy
    Direct Known Subclasses:
    LeaseViewLine, SFWLine, SFWViewLine, WarrantyLine, WarrantyViewLine


    public class ContractLine
    extends Mbo
    implements ContractLineRemote
    MBO to represent a Purchase Contract Line in the MAXIMO System. The key attributes for this object are ContractNum, RevisionNum and OrgId. This is an orgainzation level object.

    Attribute Name Description
    CatalogCode Vendor's catalog or product list number.
    ChgPriceOnUseCan price be changed on the line with contract reference.
    ChgQtyOnUseCan quantity be changed on line with contract reference.
    Commodity
    ConditionCode
    ContractLineId Unique identifier for every ContractLine in the database. Every ContractLine has a unique ContractLineID.
    ContractLineNum The line number of the Contract Line. This is unique to every line in a set of Contract Lines that belong to a Contract.
    ContractNum Contract Number. This is one of the key fields. Each ContractNum need not be unique. Every new revision of the same contract will carry the same contract number.
    ContractType Indicates whether the type of the contract is Labor or Lease or Maintenance or Purchase or Rental or Software License or Warranty.
    Description Description of the item or service of the Contract Line. Also accomodates a long description.
    EnterBy, EnterDate Name of the user who entered the Contract Line and the date the Contract Line was entered.
    HasPaymentSched Does the ContractLine have a Payment Schedule associated with it?
    InspectionRequired Indicates wheteher this item requires inspection upon receipt.
    ItemNum Identifier for the item number on the Contract Line.
    ItemSetIDIdentifier of the itemset identifier for this object.
    LeadTime Delivery Time.
    LineCost Cost of the line item calculated as qty * unitcost. For service lines, this field is directly entered by the user.
    LDKey Long Description Key. This is a link to text stored in the LongDescription table.
    LineCost2 LineCost in Base Currency2.
    LineStatusStatus of the line. Can be approved, waiting for approval, draft, canceled, closed.
    LineTypeThe type of Contract Line. It could be ITEM, MATERIAL, SERVICE, TOOL, STDSERVICE or EXTERNAL type.
    Manufacturer Code for the manufacturer who manufactures the item.
    ModelNum Manufacturer's model number for the item.
    OrderQty The number of units of the item that have been ordered.
    OrderUnit Standard unit by which this item is ordered. If you are requisitioning an item that has an orderunit, that unit(such as dozen or box) is copied from the corresponding inventory record.
    OrgId Identifier of the organization for this Contract Line.
    PORequired Will a PO be required for this contract?
    Remark Any additional description, remarks that need to be specified for this Contract Line.
    RevisionNum Revision number of the contract.
    RevStatus The revision status of the Contract Line. This field mainly applies to contract revisions. If a change is made in one of the lines of the revision, the revstatus is set to CHANGED.
    UnitCost Cost of each unit on the Contract Line.
    Last Update: Tuesday, April 13, 2002 - Ganesh - javadocs
    • Constructor Detail

      • ContractLine

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

      • init

        public void init()
                  throws MXException
        Description copied from class: Mbo
        Called by the framework when the Mbo has been constructed and the MboValues have been initialized. This can be overridden by the programmer to provide any custom initialization they would like to do.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Defaults certain fields on the ContractLine Object.
        Specified by:
        add in interface MboRemote
        Overrides:
        add 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. The following is a list of fields that are not copied from the source POLine to the target POLine.
        1. contractlinenum
        2. orgid
        3. contractlineid
        4. contractnum
        5. enterby
        6. enterdate
        7. requestedby
        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
      • getInternalContractType

        public java.lang.String getInternalContractType()
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        Internal method that marks the record as modified. Called whenever a field is modified so we can update the REVSTATUS.
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getInternalRevStatus

        public java.lang.String getInternalRevStatus()
                                              throws MXException,
                                                     java.rmi.RemoteException
        Get the internal representation of the CONTRACTLINE.REVSTATUS
        Returns:
        - The internal REVSTATUS.
        Throws:
        MXException
        java.rmi.RemoteException
      • copy

        public MboRemote copy(MboSetRemote mboset)
                       throws MXException,
                              java.rmi.RemoteException
        Over-ride the copy method of the Mbo. This copy would copy all the POCost Mbos related to the POLine.
        Specified by:
        copy in interface MboRemote
        Overrides:
        copy in class Mbo
        Parameters:
        mboset - The set into which the new mbo will be added.
        Returns:
        The new mbo, with values copied from this mbo.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.copy(MboSetRemote, long)
      • propagateKeyValue

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

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Cannot delete a ContractLine that has been canceled.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Several conditions are checked before the line can be saved.
        • The line must have at least an item number or description
        • If the line is not a service line, a quantity is required.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • isServiceType

        public boolean isServiceType()
                              throws MXException,
                                     java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Delete the contract line record. It will also delete associated payment schedule records.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        Undelete the contract line record. It will also undelete associated payment schedule records.
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Parameters:
        accessModifier -
        Throws:
        MXException
        java.rmi.RemoteException
      • getInvVendorRemote

        public MboRemote getInvVendorRemote()
                                     throws MXException,
                                            java.rmi.RemoteException
        Returns the invVendor record on the following conditions.
        • Tries to get the INVVENDOR record with the most recent last date. If it found this INVVENDOR record. It returns the record.
        • If the previous step did not yield any record, it searches the database for INVVENDOR records with no last date and picks the cheapest cost from those lines.
        • INVVENDORs must always have the same item, vendor, itemsetid combination as the current ContractLine.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Set the attribute haspaymentsched on contract line based on whether it has any payment schedules or not.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • initRelationship

        public void initRelationship(java.lang.String relationName,
                                     MboSetRemote mboSet)
                              throws MXException,
                                     java.rmi.RemoteException
        Called whenever a relationship is initialized or reset from this Mbo to another MboSet. Set the editibility of the Mbos related to the contract line. In this case the target MboSet is SchPurchView.
        Overrides:
        initRelationship in class Mbo
        Parameters:
        relationName - the relationship name
        mboSet - the mboset
        Throws:
        MXException
        java.rmi.RemoteException
      • setEditibilityFlags

        protected void setEditibilityFlags(boolean flag)
                                    throws MXException,
                                           java.rmi.RemoteException
        sets the editibility flags for fields in Contract.
        Throws:
        MXException
        java.rmi.RemoteException
      • setVendorItem

        public void setVendorItem(boolean value)
                           throws MXException,
                                  java.rmi.RemoteException
        Set fromVendorItem variable. fromVendorItem indicates if the action is from Vendor Item page or not.
        Throws:
        MXException
        java.rmi.RemoteException
      • getVendorItem

        public boolean getVendorItem()
                              throws MXException,
                                     java.rmi.RemoteException
        Return true if the action is from Vendor Item page. Otherwise return false.
        Throws:
        MXException
        java.rmi.RemoteException
      • isContractReferencedOnPOLine

        public boolean isContractReferencedOnPOLine()
                                             throws MXException,
                                                    java.rmi.RemoteException
        Checks to see if the contract was referenced on any poline. Will return true if the contract is indeed referenced on POLine, false otherwise.
        Throws:
        MXException
        java.rmi.RemoteException
      • getValidateOrder

        public java.lang.String[] getValidateOrder()
        Validates the Order for contract line attributes.
        Overrides:
        getValidateOrder in class Mbo