psdi.app.assetcatalog

Class AssetAttribute

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


    public class AssetAttribute
    extends Mbo
    implements AssetAttributeRemote
    MBO to represent AssetAttribute.

    See Asset Catalog description.

    This is an organization level object.

    The keys attributes for this object are: AssetAttrId

    The attributes in this object are as follows:

    Attribute NameDescription
    AssetAttrIdIdentifier for this asset attribute. One of the two key attributes for this object.
    AttrDescPrefixDefault prefix used with this attribute in generated asset descriptions.
    DataTypeMAXIMO Data type for attribute value. Valid values are ALN and NUMERIC.
    DescriptionDescription of the asset attribute.
    DomainIdDefault domain for the attribute. The domain limits what is a valid value for the attribute. This constraint can be a particular alphanumeric or numeric value, or it can be a value list. The domain's type must match the attribute's datatype. If the data type is ALN, the domain type has to be ALN. If the datatype is NUMERIC, the domain has to be NUMERIC. Asset attributes are not neccessarily constrained by a domain. Consequently, the domain identifier can be null.
    MeasureUnitIdDefault unit of measure for the attribute.
    OrgIdIdentifier of the organization. One of the two key attributes for this object.
    See Also:
    MeasureUnit, MaxDomain
    • Constructor Detail

      • AssetAttribute

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

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Creates an AssetAttribute object for a ClassSpec object. When ClassSpec object allows a creation of AssetAttribute object for its assetAttrId column, an AssetAttribute has the ClassSpec as owner.

        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        ClassSpec.save()
      • 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 ClassSpec, AssetSpec, ItemSpec or LocationSpec.

        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
        Deletes the related objects when the AssetAttribute object is deleted. If the AssetAttribute is deleted, the related ClassSpec, ItemSpec, LocationSpec and AssetSpec objects are also deleted.

        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
        added this appValidate() for index change of ASSETATTRIBUTE
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • validateNewAttribute

        public void validateNewAttribute(MboRemote mbo)
                                  throws MXException,
                                         java.rmi.RemoteException
        defect117050: same code used in appValidate() by two sections-checking existing and checking new mbos
        Throws:
        MXException
        java.rmi.RemoteException
      • getNewOrgSiteSql

        public java.lang.String getNewOrgSiteSql(MboSetRemote specSet)
                                          throws MXException,
                                                 java.rmi.RemoteException
        IJ18416:the specSet passed is ASSETSPEC, or LOCATIONSPEC for now. The relationship of assetattribute to ASSETSPEC and LOCATIONSPEC is assetattrid=:assetattrid out of box. There may be multiple assetattribute records with same assetattrid but different org/site. This method checks org or site on the assetattribute record and re-get ASSETSPEC or LOCATIONSPEC. The code was coded since rel 52 so it did not do other specifications introduced such as workorderspec,
        Parameters:
        specSet -
        Throws:
        MXException
        java.rmi.RemoteException