psdi.app.site

Class Organization

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


    public class Organization
    extends Mbo
    implements OrganizationRemote
    MBO to represent an organization.

    See Site description.

    The key attribute for this object is OrgId.

    The attributes in this object are as follows:

    Attribute NameDescription
    ActiveY/N field indicates whether or not this site is active.
    BaseCurrency1Primary currency code.
    BaseCurrency2Secondary currency code.
    CompanySetIdUnique identifier of the company set.
    DescriptionDescription of the organization. Long description enabled.
    EnterBy, EnterDateUser who created this organization and the date it was created.
    ItemSetIdUnique identifier of the item set.
    LDKeyLong Description Key. This is a link to text stored in the LongDescription table.
    OrgIdUnique identifier of the organization.
    • Constructor Detail

      • Organization

        public Organization(MboSet ms)
                     throws MXException,
                            java.rmi.RemoteException
        Constructs the Organization object.

        Parameters:
        ms -
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Initialization routine. If this record is not a new record and there are associated sites for this orgid, the basecurrency1 attribute is set to readonly. If the basecurrency2 field is not null, set the basecurrency2 field to readonly regardless of whether there are associated sites. If this is a new record, clearing account is read only.

        Overrides:
        init in class Mbo
        Throws:
        MXException
      • initFieldFlagsOnMbo

        public void initFieldFlagsOnMbo(java.lang.String attrName)
                                 throws MXException
        The logic of setting the readonly and required field flags to the mbo. Any setting of the field flags that require expensive operation, such as database query should be moved from init() to this method. However, those which don't require steps such as fetching Mbos can be left in init(). You can group the logic for a few attributes together if logic of deciding their flag is the same, or in other words, can be handled at once.
        Overrides:
        initFieldFlagsOnMbo in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a new Organization object. Sets field defaults to:

        Attribute NameAttribute Value
        activeYes
        enterbyCurrent User
        enterdateSystem date/time
        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
        Determines if the object can be deleted. An organization can only be deleted if there are no sites associated with it.

        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - cannotDelete
        GROUPKEYREASON
        sitecannotDeleteif there are sites associated with this organization
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Deletes the Organization and all related records. When the Organization is deleted, associated records in the following tables will also be deleted:
        • FINANCIALPERIODS
        • FINCNTRL
        • GLCOMPONENTS
        • ACCOUNTDEFAULTS
        • ADDRESS
        • AUTOKEY
        • CHARTOFACCOUNTS
        • DESKTOPDFLTS
        • HAZARD
        • INVHAZARD
        • INVTAXCODE
        • TAX
        • TAXTYPE
        • WPEDITSETTING
        • WORKTYPE
        • MAXVARS
        • LIMITTOLERANCE
        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)
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        Undeletes the Organization and all related records. When the Organization is undeleted, associated records in the following tables will also be undeleted:
        • FINANCIALPERIODS
        • FINCNTRL
        • GLCOMPONENTS
        • ACCOUNTDEFAULTS
        • ADDRESS
        • AUTOKEY
        • CHARTOFACCOUNTS
        • DESKTOPDFLTS
        • HAZARD
        • INVTAXCODE
        • INVHAZARD
        • TAX
        • TAXTYPE
        • WPEDITSETTING
        • WORKTYPE
        • MAXVARS
        • LIMITTOLERANCE
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • addWpEditSettingRows

        public void addWpEditSettingRows(MboSetRemote wpEditSettingSet)
                                  throws MXException,
                                         java.rmi.RemoteException
        Create the WP edit settings for this organization.

        Parameters:
        wpEditSettingSet - The set to which edit settings will be added.
        Throws:
        MXException
        java.rmi.RemoteException
      • addTaxTypeRows

        public void addTaxTypeRows(MboSetRemote taxTypeSet)
                            throws MXException,
                                   java.rmi.RemoteException
        Create the tax types for this organization. Tax types are literally '1', '2', '3', '4' to number of tax codes.

        Parameters:
        wpEditSettingSet - The set to which edit settings will be added.
        Throws:
        MXException
        java.rmi.RemoteException
      • addTaxOrderRows

        public void addTaxOrderRows(MboSetRemote taxOrderSet)
                             throws MXException,
                                    java.rmi.RemoteException
        Create tax order for this organization.
        Throws:
        MXException
        java.rmi.RemoteException
      • initRelationship

        public void initRelationship(java.lang.String relationName,
                                     MboSetRemote mboSet)
                              throws MXException,
                                     java.rmi.RemoteException
        Specially treat the relationtionship MAXVARINPUTINVENTORYDEFAULTS. Set the object classpath of the maxvarinput MboSet obtained from this relationship. The reason to do so is not to create a seperated non persistent table for the breakpoints maxvars.
        Overrides:
        initRelationship in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • addAccountDefaultsRows

        public void addAccountDefaultsRows(MboSetRemote accountDefaultsSet)
                                    throws MXException,
                                           java.rmi.RemoteException
        Add rows for account defaults when a new organization is added.
        Parameters:
        accountDefaultsSet -
        Throws:
        MXException
        java.rmi.RemoteException
      • addWorkTypeRows

        public void addWorkTypeRows(MboSetRemote workTypeSet)
                             throws MXException,
                                    java.rmi.RemoteException
        Add rows for account defaults when a new organization is added.
        Parameters:
        accountDefaultsSet -
        Throws:
        MXException
        java.rmi.RemoteException
      • addCraftRows

        public void addCraftRows(MboSetRemote craftSet)
                          throws MXException,
                                 java.rmi.RemoteException
        Add rows for account defaults when a new organization is added.
        Parameters:
        accountDefaultsSet -
        Throws:
        MXException
        java.rmi.RemoteException
      • addContractTypeRows

        public void addContractTypeRows(MboSetRemote contractTypeSet)
                                 throws MXException,
                                        java.rmi.RemoteException
        Add rows for contract type and property default when a new organization is added.
        Parameters:
        contractTypeSet -
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Save cretes ItemOrgInfo records before calling super.save().
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • addItemGroupInfoRows

        public void addItemGroupInfoRows()
                                  throws MXException,
                                         java.rmi.RemoteException
        09-15604
        Throws:
        MXException
        java.rmi.RemoteException
      • isCalibrationInstalled

        public boolean isCalibrationInstalled()
                                       throws MXException,
                                              java.rmi.RemoteException
        Return true if License Key CALIBRATION is installed.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • isValidChar

        public static boolean isValidChar(java.lang.String checkString)
        IV78202 Do not allow these characters in the organization name : U+0027 ' ' Apostrophe 0008