psdi.app.system

Class Condition

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


    public class Condition
    extends Mbo
    implements ConditionRemote
    Mbo object to represent Condition.

    This is a system level object.

    The key attribute for this object is ConditionNum.

    The attributes in this object are as follows:

    Attribute NameDescription
    ClassNameJava class for generating a condition expression. This is used when Expression is not specified.
    ConditionNumThe autokeyed identifier for this condition.
    DescriptionDescription of the condition.
    ExpressionThe condition expression. If desired, a ClassName can be used instead.
    RefCountThe number of references to this condition. If references are maintained via the back end, this will have an unreliable value.
    TypeIndicates whether this condition uses a ClassName or an Expression. Must be valid on CONDTYPE domain.
    • Constructor Detail

      • Condition

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

      • 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
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Condition cannot be deleted if there are places referencing it
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • hasReference

        public boolean hasReference()
                             throws MXException,
                                    java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Make sure the combination is unique
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Description copied from class: Mbo
        Mark the object to be deleted depending on the access modifier. This will usually be overridden in the subclass of Mbo as there may be application specific rules as to if and when an object can be deleted. Object is not actually deleted in the database until save() is called. This method will also mark all associated Long Description and Translation Mbos for deletion.
        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)
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        Description copied from class: Mbo
        Unmark the Mbo for deletion. Can only be called after a delete() and before the save() has been performed. This method will also unmark associated Long Description and Translation Mbos.
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getSameAs

        public java.lang.String[][] getSameAs()
                                       throws MXException,
                                              java.rmi.RemoteException
        Get the same as object and fields to the conditionnum.
        Returns:
        Array of object and first element and attributename as second element.
        Throws:
        MXException
        java.rmi.RemoteException
      • commit

        protected void commit()
        Overrides:
        commit in class Mbo
      • initFieldFlagsOnMbo

        public void initFieldFlagsOnMbo(java.lang.String attrName)
                                 throws MXException
        Description copied from class: Mbo
        The logic of setting the readonly and required field flags to the mbo. Any setting of the field flags that require expensive operation, such as database query should be moved from init() to this method. However, those which don't require steps such as fetching Mbos can be left in init(). You can group the logic for a few attributes together if logic of deciding their flag is the same, or in other words, can be handled at once.
        Overrides:
        initFieldFlagsOnMbo in class Mbo
        Throws:
        MXException