psdi.app.compmaster

Class CompMaster

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


    public class CompMaster
    extends Mbo
    implements CompMasterRemote
    Mbo object to represent a company master.

    See Company Master Package description.

    The key attributes for this object are Company and CompanySetId.

    The attributes in this object are as follows:

    Attribute NameAttribute Description
    Address1Street address of the company.
    Address2City where the company is located.
    Address3State or province where the company is located.
    Address4Company's zip or postal code.
    APControlAccAccounts Payable Control Account. Used when an invoice is paid.
    APSuspenseAccAccounts Payable Suspense Account. Used when an invoice is approved.
    AutoApproveInvYes/No field indicates whether or not invoices should automatically be approved for the vendor upon receipt of the invoice.
    AutoRecieveOnASNYes/No field indicates whether or not the vendor should automatically process the receipts for an automated shipping notification.
    AutoSendPOCancelYes/No field indicates whether or not the vendor is sent a transaction when a purchase order is cancelled.
    BankAccountCompany's bank account for direct payments.
    BankNumCompany's bank and branch identification reference number. Used when transferring funds electronically.
    CatalogNameName of the catalog that will display when punching out.
    ChangeBy, ChangeDateName of the user who last updated this object and the date updated.
    CompanyIdentifier for the company.
    ContactName of the primary person to contact at the company.
    CurrencyCodeCurrency used by the company.
    CustomerNumNumber used by an outside company to identify your own company.
    DisabledYes/No field indicates whether or not the company is disabled.
    DUNSNumData Universal Numbering System Number. Used to uniquely identify a company and its location.
    EcomInterfaceE-Commerce supplier's catalog location.
    EcommerceEnabledYes/No field indicates whether or not the company has the capability of electronic commerce with MAXIMO.
    ExternalRefIdExternal Reference Identifier.
    FaxFax number of the company or contact.
    FOBFree On Board. The point where responsibility and liability are transferred.
    FreightTermsDescription of what is being shipped. Riders to the shipping agreement should be included here.
    HomePageURL for the company's World Wide Web page.
    Inclusive1 - Inclusive5Yes/No fields indicate whether or not tax1code - tax5code are included in the invoicing cost.
    LocationLocation of the company.
    MNetCompanyIdMNet assigned company identification number.
    NameName and/or description of the company. Long description enabled.
    OwnerSysIdOwner System Identifier.
    PaymentTermsTerms of payment for this vendor.
    PayOnReceiptYes/No field indicates whether or not a payment on receipt agrement exists with this company.
    PayVendorName of the person to whom payments should be sent.
    PhoneTelephone number of the company or contact.
    PunchOutEnabledYes/No field indicates whether this vendor's catalog can be accessed through punchout.
    RBNIAccAccount for receipts that have not been approved.
    Registeration1 - Registeration5Tax registration numbers for tax types 1 - 5 used by the company.
    RemitAddress1Street address of the remit to company.
    RemitAddress2City of the remit to company.
    RemitAddress3State or province of the remit to company.
    RemitAddress4Zip or postal code of the remit to company.
    RemitContactName of the person at the remit to company to contact for invoicing.
    ShipViaHow the goods should be shipped.
    SourceSysIdSource System Identifier.
    Tax1Code - Tax5CodeCountry or state tax codes of tax types 1 - 5 for this company.
    TaxExemptCodeIndicates whether the company is exempt from paying taxes.
    TaxExemptNumNational tax exemption number used for tax reporting purposes.
    VendorSendsASNYes/No field indicates whether or not the vendor should send automated shipping notification transactions.
    VendorSendsInvYes/No field indicates whether or not the vendor should send invoice transactions.
    VendorSendsStatusYes/No field indicates whether or not the vendor should send status transactions.
    TypeThe company's type.
    Co11 - Co18Extra fields.
    • Constructor Detail

      • CompMaster

        public CompMaster(MboSet ms)
                   throws java.rmi.RemoteException
        Construct the Company Master object.
        Parameters:
        ms -
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Initialization rountine. Sets company attribute read only if not a new Mbo.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Set default values for some of the fields of the new company master. The table below shows the default values for each of the attributes listed.
        Attribute NameAttribute Value
        autoapproveinvNo
        autoreceiveonasnNo
        autosendpocancelNo
        changebyCurrent username
        changedateCurrent date
        companysetidCompany set identifier for the current organization.
        currencycodeBaseCurrency1 if there is a base currency, else do not default.
        disabledNo
        ecommerceenabledNo
        payonreceiptNo
        punchoutenabledNo
        vendorsendsasnNo
        vendorsendsinvNo
        vendorsendsstatusNo
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        Modify() is called whenever a change is made to the attributes of company master. When any field related to company master is changed, changedate and changeby are updated.
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        Actions that occur when a company master object is saved.
        • If  "updaterelatedcos"  is selected and the company master is modified, corresponding company records are updated.
        • The company contact master records are always updated to match the company master.   If a newly added contact and remit contact are the same, only one can be saved because duplicates are not allowed.   There may be at most one primary contact and one remit contact therefore unused contacts must be deleted.
        • If  "updaterelatedcos"  is selected and a company contact is modified, corresponding company contact records are updated.
        • super.save() is called
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • updateRelatedCompanyContacts

        public void updateRelatedCompanyContacts()
                                          throws MXException,
                                                 java.rmi.RemoteException
        If this CompMaster has any CompContactMaster records that were modified, make the same updates to the corresponding company contact record, if it exists.
        Throws:
        MXException
        java.rmi.RemoteException
      • getAttributesToCopy

        public java.util.Vector getAttributesToCopy(boolean copyModifiedOnly)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Utility method returns a vector containing the names of all attributes that must be updated on a matching company Mbo. The vector will only contain modified attributes if the passed parameter modifiedOnly is true. The attributes updaterelatedcos, changeby, changedate, companysetid, compmasterid, and ldkey are always skipped.
        Specified by:
        getAttributesToCopy in interface CompMasterRemote
        Parameters:
        copyModifiedOnly - if true, copies only modified attributes
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        CompMaster.getAttributesToCopy(boolean copyModifiedOnly)
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        A company master record may not be deleted if any organization was a corresponding company record in use.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException -
        GROUPKEYREASON
        compmastercannotDeleteCompMasterCannot delete a company master that has been added to an organization.
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Deletes the Company Master and all related contact master. When the Company Master is deleted, associated records in the COMPCONTACTMSTR table will also be deleted.
        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)
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        If the punchoutenabled flag is set to 'Y' the catalogname field is required. Immitates logic of Company object.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXApplicationException - (compmaster, catalogNameRequired) Catalog name is required.
        MXException
        java.rmi.RemoteException