psdi.app.asset

Class AssetFeatureSpec

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


    public class AssetFeatureSpec
    extends SpecificationMbo
    implements AssetFeatureSpecRemote, SpecHistoryInterface
    MBO object to represent an attribute and value of a specifiation. See Work Order package description for details.

    This is a site level object.

    The key attributes for this object are as follows: SiteId, Wonum, Section, AssetAttrId.

    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 plan's specification. Value is copied from corresponding class specification when the job plan specificition is created.
    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 Ticket to which this TicketSpec is linked.
    RefObjectNameThe name or object (Ticket) to which this TicketSpec is linked.
    SectionSection for a group of attributes.
    SiteIDIdentifier of the site for this specification.espectively
    WONumIdentifier for the work order.
    WorkOrderSpecIDSystem generated unique identification of this object.
    See Also:
    ClassStructure, MeasureUnit
    • Constructor Detail

      • AssetFeatureSpec

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

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Set default values for a new JobPlanSpec object. The table below shows the default values for each of the attributes listed.
        Attribute NameAttribute Value
        changebyCurrent username
        changedateCurrent date
        classstructureidOwner classstructureid
        orgidOwner organization identifier
        refobjectidOwner unique identifier
        refobjectnameOwner object name
        siteidOwner site identifier
        wonumOwner work order identifier
        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 WorkOrderSpec fields will be skipped without being copied to the newly duplicated object:
        1. WONUM
        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:
        WO.loadSkipFieldCopyHashSet()
      • propagateKeyValue

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

        public boolean isChangeByUserWhenSetFromLookup(java.lang.String lookupAttrName,
                                                       java.lang.String attributeName)
        Indicates whether the CHANGEDBY_USER flag should be set for attributes on this Mbo when their values are set (along with other key fields) via lookup.
        Overrides:
        isChangeByUserWhenSetFromLookup in class Mbo
        Parameters:
        lookupAttrName - the attribute whose lookup is being called.
        attributeName - the attribute that is not the lookup attribute.
        Returns:
      • updateSpecHistory

        public void updateSpecHistory()
                               throws MXException,
                                      java.rmi.RemoteException
        Description copied from interface: SpecHistoryInterface
        Update the history object for the impelementing object. The update could happen if the specification record is deleted or modified.
        Specified by:
        updateSpecHistory in interface SpecHistoryInterface
        Throws:
        MXException
        java.rmi.RemoteException
      • setLinearInfo

        protected void setLinearInfo()
                              throws MXException,
                                     java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Issue#08-23894 override delete to delete this record.
        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
        Linear Asset Feature-Attribuate must have a start and end measure.
        Overrides:
        appValidate in class SpecificationMbo
        Throws:
        MXException
        java.rmi.RemoteException