home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Java / Java.zip / mqaoad21.zip / LogData.java < prev    next >
Encoding:
Java Source  |  2002-12-19  |  2.5 KB  |  128 lines

  1. package com.ibm.extricity.adapters.mqseries.mqak;
  2.  
  3. import com.ibm.epic.adapters.eak.mcs.*;
  4. import com.ibm.epic.adapters.eak.nativeadapter.*;
  5.  
  6. /**
  7.  * Insert the type's description here.
  8.  * Creation date: (6/1/00 9:38:41 AM)
  9.  * @author: Administrator
  10.  */
  11. public class LogData
  12. {
  13.    public static final int STATE_NOCHANGE = -1;
  14.    public static final int STATE_INIT = 0;
  15.    public static final int STATE_POLOOSE1ST = 1;
  16.    public static final int STATE_POLOOSEALL = 2;
  17.    public static final int STATE_POACKLOOSE1ST = 3;
  18.    public static final int STATE_POACKLOOSEALL = 4;
  19.    public static final int STATE_POACCLOOSE1ST = 5;
  20.    public static final int STATE_POACCLOOSEALL = 6;
  21.    public static final int STATE_OTHERACKLOOSE1ST = 7;
  22.    public static final int STATE_OTHERACKLOOSEALL = 8;
  23.    public static final int STATE_POREJECT = 9;
  24.  
  25.    public  EpicMessage msgout;
  26.  
  27.    public String RealKey = null;
  28.    public String Data = null;
  29.    public int State = STATE_INIT;
  30.  
  31. /**
  32.  * LogData constructor comment.
  33.  */
  34. public LogData()
  35. {
  36.    super();
  37.    RealKey = null;
  38.    Data = null;
  39.    State = STATE_INIT;
  40. }
  41.  
  42. /**
  43.  * LogData constructor comment.
  44.  */
  45. public LogData(int newState)
  46. {
  47.    super();
  48.    RealKey = null;
  49.    Data = null;
  50.    State = newState;
  51. }
  52.  
  53. /**
  54.  * LogData constructor comment.
  55.  */
  56. public LogData(String theData)
  57. {
  58.    super();
  59.    RealKey = null;
  60.    Data = theData;
  61.    State = STATE_INIT;
  62. }
  63.  
  64. /**
  65.  * LogData constructor comment.
  66.  */
  67. public LogData(String theData,int newState)
  68. {
  69.    super();
  70.    RealKey = null;
  71.    Data = theData;
  72.    State = newState;
  73. }
  74.  
  75. /**
  76.  * LogData constructor comment.
  77.  */
  78. public LogData(String theRealKey,String theData)
  79. {
  80.    super();
  81.    RealKey = theRealKey;
  82.    Data = theData;
  83.    State = STATE_INIT;
  84. }
  85.  
  86. /**
  87.  * LogData constructor comment.
  88.  */
  89. public LogData(String theRealKey,String theData,int newState)
  90. {
  91.    super();
  92.    RealKey = theRealKey;
  93.    Data = theData;
  94.    State = newState;
  95. }
  96.  
  97. /**
  98.  * Insert the method's description here.
  99.  * Creation date: (6/16/00 10:04:55 AM)
  100.  * @return java.lang.String
  101.  * @param str java.lang.String
  102.  * @param Ix int
  103.  * @param Len int
  104.  */
  105. public static String mySubString(String str, int Ix, int Len)
  106. {
  107.    if(str == null)
  108.    {
  109.       return null;
  110.    }
  111.    try
  112.    {
  113.       if(Ix > 0)
  114.       {
  115.          str = str.substring(Ix);
  116.       }
  117.       if(str.length() > Len)
  118.       {
  119.          str = str.substring(0,Len);
  120.       }
  121.    }
  122.    catch(StringIndexOutOfBoundsException e)
  123.    {
  124.       str = "";
  125.    }
  126.    return str;
  127. }
  128. }