psdi.app.system

Class NumRangeDomain

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


    public class NumRangeDomain
    extends DomainValueMbo
    implements NumRangeDomainRemote
    Mbo object to represent RangeDomSegment.

    One of the ways that field validation can be attached to an attribute at a customer site is via domains. The maxsyscolumns2.domainid would be set to a value that exists in the MaxDomain table. If the domain is to include ranges of numeric values, then the domain type will be NUMRANGE (from valuelist DOMTYPE) and each valid range for the domain will be specified in RANGEDOMSEGMENT. A listener is automatically attached to the Mbo instance to perform the appropriate field validations.

    The maxsyscolumns2.domainid is generally for use by customers.

    This is a system level object.

    The key attributes for this object are DomainID and RangeSegment.

    The attributes in this object are as follows:

    Attribute NameDescription
    DomainIDForeign key to MaxDomain.
    RangeMinimumThe minimum valid value in the range.
    RangeMaximumThe maximum valid value in the range.
    RangeIntervalThe difference between each valid value in the range.
    RangeSegmentAn arbitrary unique identifier for a range within the domain.
    See Also:
    NumRangeDomain, NUMRANGEDomainInfo, MaximoDD.loadMboValuesInfo(java.sql.Connection), Mbo.generateMboValueInstance(psdi.mbo.MboValueInfo)
    • Constructor Detail

      • NumRangeDomain

        public NumRangeDomain(MboSet ms)
                       throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a mbo, defaulting the attributes shown below.
        Attribute NameAttribute Value
        DomainIDOwner's DomainID
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        1. MIN, MAX can be null, but cannot be null at the same time. If both are null, it means any number is OK, there is really no need to create a numrangdomain at all. If both are null, an error message will be thrown. If MIN is null, it means the min is -infinity (negative of whatever java's largest number), if MAX is null, it means infinity (the largest java number). 2. The interval can be null. If the interval is null or 0, it simply means the number has to be smaller than the max and larger than the min. If either MIN or MAX is null, it simply means it is open ended. 3. If interval is specified and one of MIN or MAX is null, the interval works its way from the number specified. For example, if MAX is 100, and MIN is null, interval is 10, 90 is a valid number and so is -1000. 4. min has to be smaller or equal than max Just a note that overlapping segment is allowed. This is useful to support multiple valid intervals in a range.
        Overrides:
        appValidate in class DomainValueMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • init

        public void init()
                  throws MXException
        If the domain is internal, set the mbo to be readonly
        Overrides:
        init in class Mbo
        Throws:
        MXException