psdi.mbo

Class DomainInfo

  • java.lang.Object
    • psdi.mbo.DomainInfo
  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    NewDomainInfo


    public abstract class DomainInfo
    extends java.lang.Object
    implements java.io.Serializable
    Base class used for all domain info classes. This is used to capture all the information that is need to be used by a validation domain. The class is created by the data dictionary and is held in memory until needed. This technique is used to speed up the instanciation of the validation domains. All implementatins of a domain info must implement the method init() which has been declared abstract.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected java.util.HashMap allInfo
      A HashMap data structure to maintain the domain information for all the site and org.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DomainInfo(java.lang.String name)
      Construct giving name
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean canSignatureChangeAfterInit(MboValue value)
      Can signature of the object be modified after the MBO value is initialized.
      boolean contains(java.lang.String site, java.lang.String org)
      Check if a site level or org level domain values exists as detail.
      java.lang.Object getDetail(java.lang.Object[] signature) 
      abstract MboValueListener getDomainObject(MboValue mbv)
      Return an object that will actually perform the validation
      static java.lang.String getKey(java.lang.String site, java.lang.String org) 
      java.lang.String getName()
      Get the name of the domain
      boolean getNeverCache()
      Getter method for Never Cache
      java.lang.Object[] getSignature(MboValue value)
      Get the signature of the passed in MboValue.
      static java.util.Vector init(java.sql.Connection con, java.lang.String sqlExpr)
      All subclasses need to override this method.
      boolean isDifferentSignature(java.lang.Object[] lastSignature, java.lang.Object[] newSignature)
      Compare the two signatures.
      boolean needToConsiderSiteOrg()
      Returns a true if there are any site or org specific values in this domain.
      void setDetail(java.lang.String site, java.lang.String org, java.lang.Object detail) 
      void setNeverCache(boolean neverCacheParam)
      Setter method for Never Cache
      java.lang.String toString()
      Dump the domain info to a string for debugging purposes
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • allInfo

        protected java.util.HashMap allInfo
        A HashMap data structure to maintain the domain information for all the site and org. The key is the combination of site and org, the value is Detail object.
    • Constructor Detail

      • DomainInfo

        public DomainInfo(java.lang.String name)
        Construct giving name
    • Method Detail

      • init

        public static java.util.Vector init(java.sql.Connection con,
                                            java.lang.String sqlExpr)
        All subclasses need to override this method. The method will initilize all the domains of its type and return them in a vector. For example, a ValueListDomainInfo init() will return all the valuelistdomaininfo obects that need to be instanciated.
      • getName

        public java.lang.String getName()
        Get the name of the domain
      • setNeverCache

        public void setNeverCache(boolean neverCacheParam)
        Setter method for Never Cache
        Parameters:
        neverCacheParam - Never Cache value
      • getNeverCache

        public boolean getNeverCache()
        Getter method for Never Cache
        Returns:
        Is this domain never cached
      • getDomainObject

        public abstract MboValueListener getDomainObject(MboValue mbv)
        Return an object that will actually perform the validation
      • toString

        public java.lang.String toString()
        Dump the domain info to a string for debugging purposes
        Overrides:
        toString in class java.lang.Object
      • getDetail

        public java.lang.Object getDetail(java.lang.Object[] signature)
      • contains

        public boolean contains(java.lang.String site,
                                java.lang.String org)
        Check if a site level or org level domain values exists as detail.
        Parameters:
        site -
        org -
        Returns:
      • getKey

        public static final java.lang.String getKey(java.lang.String site,
                                                    java.lang.String org)
      • setDetail

        public void setDetail(java.lang.String site,
                              java.lang.String org,
                              java.lang.Object detail)
      • needToConsiderSiteOrg

        public boolean needToConsiderSiteOrg()
        Returns a true if there are any site or org specific values in this domain. If there are none, site org related where clause are not need to present in the selction of the domain values.
        Returns:
      • getSignature

        public java.lang.Object[] getSignature(MboValue value)
                                        throws MXException,
                                               java.rmi.RemoteException
        Get the signature of the passed in MboValue. The signature can be cached by the domain object. If the signature is different than its previous signature, the domain value will need to be reset. If null is returned, that means the signature does not need to be fetched because the domain value once decided will not need to be reset.
        Parameters:
        mbo -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • canSignatureChangeAfterInit

        public boolean canSignatureChangeAfterInit(MboValue value)
        Can signature of the object be modified after the MBO value is initialized. If the factor to contribute to the signature will never change, this returns false.
        Parameters:
        value -
        Returns:
      • isDifferentSignature

        public boolean isDifferentSignature(java.lang.Object[] lastSignature,
                                            java.lang.Object[] newSignature)
        Compare the two signatures. True if they are considered different.
        Parameters:
        lastSignature -
        newSignature -
        Returns: