psdi.mbo.iterator

Class MboRelationPath

  • java.lang.Object
    • psdi.mbo.iterator.MboRelationPath


  • public class MboRelationPath
    extends java.lang.Object
    Stores the relationship name and any attached conditions. This class is used to setup MboSetIterators that visit every Mbo in the set
    See Also:
    MboSetIterator, RelatedMboFetcher
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected java.lang.String condition
      Condition.
      protected java.lang.String relationship
      The name of the related set, minus any parameters.
      protected java.lang.Integer specificMbo
      Specific Mbo position.
      protected java.lang.String whereFilter
      Extra where clause.
    • Constructor Summary

      Constructors 
      Constructor and Description
      MboRelationPath(java.lang.String relationship)
      Constructor
    • Field Detail

      • specificMbo

        protected java.lang.Integer specificMbo
        Specific Mbo position. If set, the iterator will only return the specific Mbo, then no other.
      • condition

        protected java.lang.String condition
        Condition. If set, the iterator will only return Mbos where the condition returns true. The Condition refers to a record in the condition table.
      • whereFilter

        protected java.lang.String whereFilter
        Extra where clause. If set, the iterator will be set with this where clause and'ed with the relationship's where clause. When this is used, a temporary set is used instead of the related set.
      • relationship

        protected java.lang.String relationship
        The name of the related set, minus any parameters.
    • Constructor Detail

      • MboRelationPath

        public MboRelationPath(java.lang.String relationship)
        Constructor
    • Method Detail

      • getRelationship

        public java.lang.String getRelationship()
        Return the base relationship name.
      • getSpecificMbo

        public java.lang.Integer getSpecificMbo()
        Get the specific Mbo position to return.
      • setSpecificMbo

        public void setSpecificMbo(java.lang.Integer specificMbo)
        Give a value for the specific Mbo.
      • setCondition

        public void setCondition(java.lang.String condition)
        Set the condition id.
      • setWhereFilter

        public void setWhereFilter(java.lang.String whereFilter)
        Set the addition where filter. Ignored if empty.
      • isOnTheFly

        public boolean isOnTheFly()
        Setting the whereFilter will mean an on-the-fly relationship will be created. One that is based on the relationship given, combine with the whereFilter.
        Returns:
        true, if whereFilter was given.
      • getOnTheFlySet

        public MboSetRemote getOnTheFlySet(MboRemote mbo)
                                    throws java.rmi.RemoteException,
                                           MXException
        Get the on-the-fly set. Used when the whereFilter is set.
        Throws:
        java.rmi.RemoteException
        MXException
      • parseRelationshipPath

        public static java.util.List parseRelationshipPath(java.lang.String relationshipChain)
        Convert a String chain of relationships into a list of MRP's
        Parameters:
        relationshipChain - I.e. 'poline[cond:cond1].pocost[3]'
        Returns:
        The list of MRP's, the first MRP is the leftmost segment in the string.
      • getDiscardable

        public java.lang.Boolean getDiscardable()