psdi.mbo

Class AutoKey

  • java.lang.Object
    • psdi.mbo.AutoKey


  • public class AutoKey
    extends java.lang.Object
    Generate an autokey value for the autokey name. Must specify the name of the autokey value, If in the middle of a transaction, the new Autokey will not be committed until the whole transaction is completed, otherwise it is commited once the value is returned.

    This class should not be confused with the class of the same name in the psdi.app.system package, psdi.app.system.AutoKey, which represents the AutoKey Mbo and autokey database table.

    See Also:
    Mbo.generateAutoKey(), MboValue.autoKey()
    • Field Detail

      • NOLEVEL

        public static int NOLEVEL
      • ORGLEVEL

        public static int ORGLEVEL
      • SITELEVEL

        public static int SITELEVEL
      • SETLEVEL

        public static int SETLEVEL
    • Constructor Detail

      • AutoKey

        public AutoKey(java.sql.Connection conn,
                       MboValueInfo mvi,
                       UserInfo user,
                       MboRemote mbo,
                       MboSetInfo mbosetinfo)
                throws java.rmi.RemoteException,
                       MXException
        Construct an autokey, giving the name, connection , user and mbo
        Parameters:
        conn -
        mvi -
        user -
        mbo -
        mbosetinfo -
        Throws:
        java.rmi.RemoteException
        MXException
    • Method Detail

      • getSiteLevelWhere

        public java.lang.String getSiteLevelWhere()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getOrgLevelWhere

        public java.lang.String getOrgLevelWhere()
                                          throws MXException,
                                                 java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getSiteOrgId

        public java.lang.String[] getSiteOrgId()
                                        throws MXException,
                                               java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getSetLevelWhere

        public java.lang.String getSetLevelWhere()
                                          throws MXException,
                                                 java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getSetLevelWhereForUniqueCheck

        public java.lang.String getSetLevelWhereForUniqueCheck()
                                                        throws MXException,
                                                               java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getSetId

        public java.lang.String getSetId()
                                  throws MXException,
                                         java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setToUseMboSiteOrg

        public void setToUseMboSiteOrg(MboRemote mbo)
                                throws MXException,
                                       java.rmi.RemoteException
        Set the site and org where clause based on the passed in mbo instead of the insert site. The method is called when the autokey is set after duplicate.
        Parameters:
        mbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • nextValue

        public java.lang.String nextValue()
                                   throws MXException
        Give me the next value
        Returns:
        next autokey value
        Throws:
        MXException
      • nextValue

        public java.lang.String nextValue(int retryAttempt)
                                   throws MXException
        returns the next autokey value
        Parameters:
        retryAttempt -
        Returns:
        next autokey value
        Throws:
        MXException
      • getAutoKeyLevel

        public int getAutoKeyLevel()
                            throws MXException,
                                   java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException