psdi.app.assetcatalog

Class ClassSpecUseWith

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


    public class ClassSpecUseWith
    extends Mbo
    implements ClassSpecUseWithRemote
    MBO to represent ClassSpecUsewith.

    See Assetcatalog Package description.

    This is a system level object.

    The key attributes for this object are: classspecid,objectname

    The attributes in this object are as follows:

    Attribute NameDescription
    ClassStructureidForeign key identifier to a ClassStructure object
    ClassSpecIdForeign key identifier to a ClassSpec object One of the two key attributes for this object.
    ObjectNameThe MAXVALUE of the domain "CLASSUSEWITH" One of the two key attributes for this object.
    ObjectValueThe Value of the domain "CLASSUSEWITH"
    assetattridThe attribute of the related CLASSSPEC record
    sectionThe section of the related CLASSSPEC record
    orgidThe orgid of the related CLASSSPEC record
    siteidThe site of the related CLASSSPEC record
    mandatoryIf the value is mandatory when the classification is applied.
    mandatoryIf the value is mandatory when the classification is applied.
    useinspecIf the related CLASSSPEC is to be included when the classification is applied.
    useindescIf the related CLASSSPEC is to be included in the description generation when the classification is applied.
    sequenceThe sequence to be copied into displaysequence when the classification is applied.
    defaultalnvalueDefault alphanumeric value. This value can be added or modified on this object before it is saved. This value is copied to the AlnValue of the Specifications when the classification is applied. DefaultALNValue is read-only and null if DataType is NUMERIC OR TABLE.
    defaultnumvalueDefaultnumeric value. This value can be added or modified on this object before it is saved. This value is copied to the NumValue of the Specifications when the classification is applied. DefaultNUMValue is read-only and null if DataType is ALN OR TABLE.
    defaulttablelueDefaultnumeric value. This value can be added or modified on this object before it is saved. This value is copied to the NumValue of the Specifications when the classification is applied. DefaultTableValue is read-only and null if DataType is ALN OR NUMERIC.
    See Also:
    ClassUseWith, ClassStructure, ClassSpec
    • Field Detail

      • numValueBeforeFormat

        public java.lang.String numValueBeforeFormat
        08-22576: remember the defaultnumvalue as string before MAXTYPE
      • parentClassSpecUseWithFound

        public boolean parentClassSpecUseWithFound
        IV44918/97775: this CLASSSPECUSEWITH records for the newClassSpec have been created due to apply down hierarchy. But it was created based on the parent classstructure's CLASSUSEWITH records. User may have deleted the CLASSPSECUSEWITH records for the paretClassSpec. initial value is false. It is an issue only when user deleted the parent classspecusewith that has apply down checked.
    • Constructor Detail

      • ClassSpecUseWith

        public ClassSpecUseWith(MboSet ms)
                         throws MXException,
                                java.rmi.RemoteException
        Constructs the ClassUseWith object
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Creates an ClassUseWith object.

        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. The object cannot be deleted if it is referenced by a item, asset, locations, etc..

        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - assetattributenodelete
        GROUPKEYREASON
        assetcatalogassetattributenodeleteif the asset exists on a ClassSpec, AssetSpec, ItemSpec or LocationSpec
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long access)
                    throws MXException,
                           java.rmi.RemoteException
        Also deletes children's objectname setup
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        access - the access
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • 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
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Check before save()
        Overrides:
        appValidate in class Mbo
        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 not. 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 AssetSpec to the target AssetSpec.
        1. ASSETNUM
        2. CHANGEBY
        3. CHANGEDATE
        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, otherwise return false.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        Asset.loadSkipFieldCopyHashSet()
      • setAlnNumTableReadOnly

        public void setAlnNumTableReadOnly(MboRemote classSpec)
                                    throws MXException,
                                           java.rmi.RemoteException
        07-20719: only one value of the defaultalnvalue,defaultnumvalue,defaulttable value should be editable per one classspecusewith record
        Parameters:
        classSpec -
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        08-12066: if this is a new record, then check if there is a matching
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • copyValuesFromApplyDownHierUseWith

        public void copyValuesFromApplyDownHierUseWith(MboSetRemote originalSpecUseWithSet)
                                                throws MXException,
                                                       java.rmi.RemoteException
        08-18363
        Parameters:
        originalSpecUseWithSet -
        Throws:
        MXException
        java.rmi.RemoteException
      • setValue

        public void setValue(java.lang.String attributeName,
                             java.lang.String val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        08-22576: if the attributename is NUMVALUE, then get the val
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK. "Invalid Data Type" exception will be thrown for datatype mismatch. For example, setting a string value of characters to an attribute which has datatype of YORN.
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,String,long)
      • getNumValueBeforeFormat

        public java.lang.String getNumValueBeforeFormat()
                                                 throws MXException,
                                                        java.rmi.RemoteException
        08-22576
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • copyValuesToChildClassSpecUseWith

        public void copyValuesToChildClassSpecUseWith(MboSetRemote childSpecUseWithSet)
                                               throws MXException,
                                                      java.rmi.RemoteException
        11-14583: when the value is changed on the existing ClassSpecUseWith that has applyDown hierarchy copy the values of the parent(current) classspecusewith to the child classSpecUseWith records if the parent classspec is applydownhier
        Parameters:
        classSpecUseSet -
        classSpec -
        Throws:
        MXException
        java.rmi.RemoteException
      • IsParentClassSpecUseWithFound

        public boolean IsParentClassSpecUseWithFound()
                                              throws MXException,
                                                     java.rmi.RemoteException
        IV90786: method to access the boolean parentClassSpecUseWithFound by ClassSpec
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • setParentClassSpecUseWithFound

        public void setParentClassSpecUseWithFound(boolean toSet)
                                            throws MXException,
                                                   java.rmi.RemoteException
        IV90786
        Parameters:
        toSet -
        Throws:
        MXException
        java.rmi.RemoteException