psdi.mbo

Class FldMboKeyAsMAXTableDomain

  • All Implemented Interfaces:
    MboConstants, MboValueListener
    Direct Known Subclasses:
    FldPMChild, PlusCFldDataSheetDSPlanNum


    public class FldMboKeyAsMAXTableDomain
    extends MAXTableDomain
    Used to validate primary keys of a Mbo. Different than FldMboKey, it supports validation, smartfill, and setValueFromLookup as a MaxTableDomain. To set the names of the key fields, the setKeyAttribtes method is called. When the setValue of any of those specified fields is called it is validated to make sure the value does not exist. This validate does NOT take place if any of the fields in the key are null, or the field is being set as an autokey (which is guarenteed to be unique).
    • Constructor Detail

      • FldMboKeyAsMAXTableDomain

        public FldMboKeyAsMAXTableDomain(MboValue mv)
        Construct and attach to the MboValue
    • Method Detail

      • setKeyAttributes

        public void setKeyAttributes(java.lang.String[] keys,
                                     java.lang.String relationship)
        Set the names of the key fields
      • validate

        public void validate()
                      throws MXException,
                             java.rmi.RemoteException
        Validation routine which will check for uniqueness In the case of hierarchical Mbos, this method will set the child's HierarchyLink flag. Any sub-classes must clear this flag if they throw an exception.
        Specified by:
        validate in interface MboValueListener
        Overrides:
        validate in class MAXTableDomain
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        This is a sub-class.
      • findRecord

        public boolean findRecord(java.lang.String tbName,
                                  MboRemote enteredMbo,
                                  java.util.ArrayList keyArray)
                           throws java.rmi.RemoteException,
                                  MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • getMboSetForKey

        public MboSetRemote getMboSetForKey()
                                     throws MXException,
                                            java.rmi.RemoteException
        Get the mboset used to validate that the value(s) entered are unique.
        Throws:
        MXException
        java.rmi.RemoteException
      • action

        public void action()
                    throws MXException,
                           java.rmi.RemoteException
        When an existing record is made a child of another record, the action makes the entered Mbo child the same as the existing Mbo. This means once the action is done, the Mbo's keys will become read/only and the only way to remove the child is to delete the row.
        Specified by:
        action in interface MboValueListener
        Overrides:
        action in class MAXTableDomain
        Throws:
        MXException
        java.rmi.RemoteException