psdi.app.po

Class PDSpec

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


    public class PDSpec
    extends SpecificationMbo
    implements PDSpecRemote
    Mbo object to represent PDSpec Specification. See PDSpec Package description for details.

    This is a system level object.

    The key attributes in this object are as follows: RefObjectD, AssetAttrID, Section, RefObjectName.

    The attributes in this object are as follows:

    Attribute NameDescription
    ALNValueAlphanumeric(text) value in entered units for the attribute specified. Editable only when the attribute is of ALN type. Defaults from ClassSpec.DefaultALNValue.
    AssetAttrIDAsset attribute identifier.
    ChangeDateName of the user who last modified this object. This attribute defaults to the current user unless another value is provided.
    ChangeDateThe date and time when this object was last modified. This attribute defaults to the MXServer date/time unless another value is provided.
    ClassSpecIDThe identifier of the classification specification from which the attributes are copied.
    ClassStructureIDIdentifier of the class structure associated with this item specification.Class structures are the hierarchies of classifications (for example, centrifugal or rotarty pumps) around which assets can be organized.
    DisplaySequenceA number to indicate this object's display sequence in the job task's specification. Value is copied from corresponding class specification when the job task specificition is created.
    PDSpecIDSystem generated unique identification of this object.
    LinkedToAttributeThe attribute to which this object is linked.
    LinkedToSectionThe section to which this object is linked.
    MandatoryIndicates whether value is needed.
    MeasureUnitIDUnit of Measure for the AlnValue or NumValue entered. Value is initially copied from ClassSpec but can be edited after the copy.
    NUMValueNumeric value in entered units for the attribute specified. Editable only when the attribute is of NUMERIC type.
    OrgIDIdentifier of the organization for this specification.
    RefObjectIDIdentifier of the Purchasing app to which this PDSpec is linked.
    RefObjectNameThe name or object (POLine) to which this PDSpec is linked.
    SectionSection for a group of attributes.
    SiteIDIdentifier of the site for this specification.espectively
    PDOwnerIDReference Object Owner ID. *
    • Constructor Detail

      • PDSpec

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

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Set default values for a new PDSpec object. The table below shows the default values for each of the attributes listed.
        pdowneridCurrent pdownerid
        refobjectidCurrent refobjectid
        reobjectnameCurrent reobjectname
        changebyCurrent username
        changedateCurrent date
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class SpecificationMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        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 by using the data from the static HashSet. If this field does not need to be copied return true. The following are the PDSpec fields will be skipped without being copied to the newly duplicated record:
        1. PDOWNERID
        2. REFOBJECTID CHANGEBY CHANGEDATE
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        mvi - The MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        true If the field does not need to be copied return true, in all other cases return false.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        PDSpec.loadSkipFieldCopyHashSet()
      • updateDesc

        public void updateDesc()
                        throws MXException,
                               java.rmi.RemoteException
        IV42077/89697: override here to handle pdspec's description.set the description field to be the generated value obtained from the setup of the classstructureid (in asset catalog setup) and the values/measureunits in the pdspec set - The PDSpecSet contains different polines with different classstructureid..
        Overrides:
        updateDesc in class SpecificationMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • sortThisSetByRefObjectLineNum

        public MboRemote[] sortThisSetByRefObjectLineNum(MboSetRemote thisSet)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        IV42077/89697: This spec set may be new mbos, need to sort in mboset
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        IJ15883: if the system property mxe.app.assetcat.mandatoryPerClassSpecUseWith, even if the current PDSpec.mandatory is false, still checks the associated classspecusewith record for the mandatory flag for objects POLINE, PRLINE
        Overrides:
        appValidate in class SpecificationMbo
        Throws:
        MXException
        java.rmi.RemoteException