psdi.app.relation

Class Relation

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


    public class Relation
    extends Mbo
    implements RelationRemote
    MBO object to represent Relation.

    This is a system level object.

    The key attribute for this object is: RELATIONNUM.

    The attributes in this object are as follows:

    Attribute NameDescription
    RELATIONNUMUnique ID
    DESCRIPTIONDescription of the relation
    TYPERelation type. A relation can be uniderectional or bidirectional.
    CLASSSTRUCTUREIDclassification of the relation
    COMPRELATIONIdentifier of the relation that is complementary to the current relation
    LINEARindicate whether the relation is exclusively for linear assets.
    • Field Detail

      • skipFieldCopy

        protected static java.util.HashSet skipFieldCopy
        This is a static HashSet that contains the names of the fields whose values need not be copied from the source Mbo to the target Mbo and is used only for duplication the relation Mbo. This HashSet is loaded in the loadSkipFieldCopyHashSet.
        See Also:
        Relation.loadSkipFieldCopyHashSet(), Relation.skipFieldCopy
    • Constructor Detail

      • Relation

        public Relation(MboSet ms)
                 throws MXException,
                        java.rmi.RemoteException
        Constructs the Relation object.

        Parameters:
        ms - MboSet
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
    • Method Detail

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Adds a new Relation object.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Parameters:
        none -
        Throws:
        MXException, - RemoteException
        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 skipped by using the data from the static HashSet. If this field does not need to be copied return true.
        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.In all other cases return false.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        Relation.loadSkipFieldCopyHashSet()
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        Duplicates relation and related objects.
        The duplicated relation's cinum will be an autokeyed value if autokey is enabled. If autokey is not enabled, the cinum will need to be provided through the UI.

        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Returns:
        the newly duplicated Relation MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mbo.Mbo#isAutoKeyed.
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        RELATION cannot be deleted for many reasons. RELATION should not be under change control.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        override delete to delete this and records associated with RELATION
        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, - RemoteException
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Actions that occur when a relation object is saved.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException