KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > knowgate > acl > UserLoader


1 /*
2   Copyright (C) 2005 Know Gate S.L. All rights reserved.
3                       C/Oņa, 107 1š2 28050 Madrid (Spain)
4
5   Redistribution and use in source and binary forms, with or without
6   modification, are permitted provided that the following conditions
7   are met:
8
9   1. Redistributions of source code must retain the above copyright
10      notice, this list of conditions and the following disclaimer.
11
12   2. The end-user documentation included with the redistribution,
13      if any, must include the following acknowledgment:
14      "This product includes software parts from hipergate
15      (http://www.hipergate.org/)."
16      Alternately, this acknowledgment may appear in the software itself,
17      if and wherever such third-party acknowledgments normally appear.
18
19   3. The name hipergate must not be used to endorse or promote products
20      derived from this software without prior written permission.
21      Products derived from this software may not be called hipergate,
22      nor may hipergate appear in their name, without prior written
23      permission.
24
25   This library is distributed in the hope that it will be useful,
26   but WITHOUT ANY WARRANTY; without even the implied warranty of
27   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28
29   You should have received a copy of hipergate License with this code;
30   if not, visit http://www.hipergate.org or mail to info@hipergate.org
31 */

32
33 package com.knowgate.acl;
34
35 import java.util.Map JavaDoc;
36 import java.util.Date JavaDoc;
37 import java.util.Arrays JavaDoc;
38 import java.util.Iterator JavaDoc;
39
40 import java.sql.Types JavaDoc;
41 import java.sql.Timestamp JavaDoc;
42 import java.sql.Connection JavaDoc;
43 import java.sql.SQLException JavaDoc;
44 import java.sql.PreparedStatement JavaDoc;
45
46 import com.knowgate.acl.ACLUser;
47 import com.knowgate.acl.ACLGroup;
48 import com.knowgate.misc.Gadgets;
49 import com.knowgate.debug.DebugFile;
50 import com.knowgate.hipergate.datamodel.ImportLoader;
51 import com.knowgate.hipergate.datamodel.ColumnList;
52
53 /**
54  * <p>Load user data from a single source</p>
55  * @author Sergio Montoro Ten
56  * @version 1.0
57  */

58 public class UserLoader implements ImportLoader {
59
60   private Object JavaDoc[] aValues;
61
62   private PreparedStatement JavaDoc oUserUpdt, oUserInsr, oGroupInsr;
63   private int iLastDomainId;
64   private String JavaDoc sLastGroupId, sLastGroupNm;
65
66   public UserLoader() {
67     aValues = new Object JavaDoc[ColumnNames.length];
68     for (int c = aValues.length - 1; c >= 0; c--) aValues[c] = null;
69     iLastDomainId = 0;
70     sLastGroupId = "";
71     sLastGroupNm = "";
72   }
73
74   // ---------------------------------------------------------------------------
75

76   /**
77    * Set all column values to null
78    */

79   public void setAllColumnsToNull() {
80     if (DebugFile.trace) {
81       DebugFile.writeln("Begin ContactLoader.setAllColumnsToNull()");
82       DebugFile.incIdent();
83     }
84
85     for (int c=aValues.length-1; c>=0; c--)
86       aValues[c] = null;
87
88     if (DebugFile.trace) {
89       DebugFile.decIdent();
90       DebugFile.writeln("End ContactLoader.setAllColumnsToNull()");
91     }
92   } // setAllColumnsToNull
93

94   // ---------------------------------------------------------------------------
95

96   /**
97    * <p>Get column index at ColumnNames array given its name</p>
98    * This method performs binary search assuming that ColumnNames is sorted in
99    * ascending order
100    * @param sColumnName String Column name (case insensitive)
101    * @return int Column index or -1 if not found
102    */

103    public int getColumnIndex(String JavaDoc sColumnName) {
104     int iIndex = Arrays.binarySearch(ColumnNames, sColumnName, String.CASE_INSENSITIVE_ORDER);
105     if (iIndex<0) iIndex=-1;
106     return iIndex;
107   }
108
109   // ---------------------------------------------------------------------------
110

111   public int columnCount() {
112     return aValues.length;
113   }
114
115   // ---------------------------------------------------------------------------
116

117   public String JavaDoc[] columnNames() throws IllegalStateException JavaDoc {
118     return ColumnNames;
119   }
120
121   // ---------------------------------------------------------------------------
122

123    /**
124     * Put value for a given column
125     * @param iColumnIndex Column index [0..getColumnCount()-1]
126     * @param oValue Value for column
127     * @throws ArrayIndexOutOfBoundsException
128     */

129    public void put(int iColumnIndex, Object JavaDoc oValue)
130      throws ArrayIndexOutOfBoundsException JavaDoc {
131      aValues[iColumnIndex] = oValue;
132    }
133
134    // ---------------------------------------------------------------------------
135

136    /**
137     * <p>Put value for a given column</p>
138     * If a previous value already exists then it is replaced
139     * @param sColumnName Column name (case sensitive)
140     * @param oValue Value for column
141     * @throws ArrayIndexOutOfBoundsException
142     */

143    public void put(String JavaDoc sColumnName, Object JavaDoc oValue)
144      throws ArrayIndexOutOfBoundsException JavaDoc {
145      int iColumnIndex = getColumnIndex(sColumnName.toLowerCase());
146      if (-1==iColumnIndex) throw new ArrayIndexOutOfBoundsException JavaDoc("Cannot find column named "+sColumnName);
147      aValues[iColumnIndex] = oValue;
148    }
149
150    // ---------------------------------------------------------------------------
151

152    /**
153     * Put all values from a map on their corresponding columns matching by name
154     * @param oValues Map
155     */

156    public void putAll(Map JavaDoc oValues) {
157      int iColumnIndex;
158      String JavaDoc sColumnName;
159      if (DebugFile.trace) {
160        DebugFile.writeln("Begin UserLoader.putAll()");
161        DebugFile.incIdent();
162      }
163      Iterator JavaDoc oIter = oValues.keySet().iterator();
164      while (oIter.hasNext()) {
165        sColumnName = (String JavaDoc) oIter.next();
166        iColumnIndex = getColumnIndex(sColumnName.toLowerCase());
167        if (iColumnIndex>0) {
168          Object JavaDoc oVal = oValues.get(sColumnName);
169          if (oVal==null)
170            aValues[iColumnIndex] = null;
171          else if (oVal.getClass().getName().startsWith("[L")) {
172            aValues[iColumnIndex] = java.lang.reflect.Array.get(oVal,0);
173          } else {
174            aValues[iColumnIndex] = oVal;
175          }
176          if (DebugFile.trace) DebugFile.writeln(sColumnName.toLowerCase()+"="+aValues[iColumnIndex]);
177        } else {
178          if (DebugFile.trace) DebugFile.writeln(sColumnName + " not found");
179        }// fi (iColumnIndex)
180
} // wend
181
if (DebugFile.trace) {
182        DebugFile.decIdent();
183        DebugFile.writeln("End UserLoader.putAll()");
184      }
185    } // putAll
186

187    // ---------------------------------------------------------------------------
188

189    /**
190     * Get column by index
191     * @param iColumnIndex int Colunm index [0..getColumnCount()-1]
192     * @return Object Column value
193     * @throws ArrayIndexOutOfBoundsException
194     */

195    public Object JavaDoc get(int iColumnIndex)
196      throws ArrayIndexOutOfBoundsException JavaDoc {
197      return aValues[iColumnIndex];
198    } // get
199

200    // ---------------------------------------------------------------------------
201

202    /**
203     * Get column by name
204     * @param sColumnName String Column name (case sensitive)
205     * @return Object Column value
206     * @throws ArrayIndexOutOfBoundsException If no column with sucjh name was found
207     */

208    public Object JavaDoc get(String JavaDoc sColumnName)
209      throws ArrayIndexOutOfBoundsException JavaDoc {
210      int iColumnIndex = getColumnIndex(sColumnName.toLowerCase());
211      if (-1==iColumnIndex) throw new ArrayIndexOutOfBoundsException JavaDoc("Cannot find column named "+sColumnName);
212      return aValues[iColumnIndex];
213    }
214
215    // ---------------------------------------------------------------------------
216

217    private String JavaDoc getColNull (int iColIndex)
218      throws ArrayIndexOutOfBoundsException JavaDoc,ClassCastException JavaDoc {
219      if (DebugFile.trace) {
220        if (iColIndex<0 || iColIndex>=aValues.length)
221          throw new ArrayIndexOutOfBoundsException JavaDoc("UserLoader.getColNull() column index "+String.valueOf(iColIndex)+" must be in the range between 0 and "+String.valueOf(aValues.length));
222        DebugFile.writeln("UserLoader.getColNull("+String.valueOf(iColIndex)+") : "+aValues[iColIndex]);
223      }
224      String JavaDoc sRetVal;
225      if (null==aValues[iColIndex])
226        sRetVal = null;
227      else {
228        try {
229          sRetVal = aValues[iColIndex].toString();
230        } catch (ClassCastException JavaDoc cce){
231          if (aValues[iColIndex]==null)
232            throw new ClassCastException JavaDoc("UserLoader.getColNull("+String.valueOf(iColIndex)+") could not cast null to String");
233          else
234            throw new ClassCastException JavaDoc("UserLoader.getColNull("+String.valueOf(iColIndex)+") could not cast "+aValues[iColIndex].getClass().getName()+" "+aValues[iColIndex]+" to String");
235        }
236        if (sRetVal.length()==0 || sRetVal.equalsIgnoreCase("null"))
237          sRetVal = null;
238      }
239      return sRetVal;
240   } // getColNull
241

242    // ---------------------------------------------------------------------------
243

244    private static boolean test(int iInputValue, int iBitMask) {
245      return (iInputValue&iBitMask)!=0;
246    } // test
247

248    // ---------------------------------------------------------------------------
249

250    /**
251     * <p>Prepare statements for execution</p>
252     * This method needs to be called only once if the default constructor was used.<br>
253     * If ContactLoader(Connection) constructor was used, there is no need to call prepare()
254     * and a SQLException will be raised if the attempt is made.<br>
255     * It is neccesary to call close() always for prepared instances as a failure
256     * to do so will leave open cursors on the database causing it eventually to stop.
257     * @param oConn Connection Open JDBC database connection
258     * @param oColList ColumnList This parameter is ignored
259     * @throws SQLException
260     */

261    public void prepare(Connection JavaDoc oConn, ColumnList oColList)
262      throws SQLException JavaDoc {
263
264      if (DebugFile.trace) {
265        DebugFile.writeln("Begin UserLoader.prepare()");
266        DebugFile.incIdent();
267      }
268
269      oUserInsr = oConn.prepareStatement("INSERT INTO k_users (dt_created,id_domain,tx_nickname,tx_pwd,tx_pwd_sign,bo_change_pwd,bo_searchable,bo_active,len_quota,max_quota,tp_account,id_account,dt_last_update,dt_last_visit,dt_cancel,tx_main_email,tx_alt_email,nm_user,tx_surname1,tx_surname2,tx_challenge,tx_reply,dt_pwd_expires,gu_category,gu_workarea,nm_company,de_title,id_gender,dt_birth,ny_age,marital_status,tx_education,icq_id,sn_passport,tp_passport,tx_comments,gu_user) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
270      oUserUpdt = oConn.prepareStatement("UPDATE k_users SET id_domain=?,tx_nickname=?,tx_pwd=?,tx_pwd_sign=?,bo_change_pwd=?,bo_searchable=?,bo_active=?,len_quota=?,max_quota=?,tp_account=?,id_account=?,dt_last_update=?,dt_last_visit=?,dt_cancel=?,tx_main_email=?,tx_alt_email=?,nm_user=?,tx_surname1=?,tx_surname2=?,tx_challenge=?,tx_reply=?,dt_pwd_expires=?,gu_category=?,gu_workarea=?,nm_company=?,de_title=?,id_gender=?,dt_birth=?,ny_age=?,marital_status=?,tx_education=?,icq_id=?,sn_passport=?,tp_passport=?,tx_comments=? WHERE gu_user=?");
271      oGroupInsr= oConn.prepareStatement("INSERT INTO k_x_group_user (gu_user,gu_acl_group) VALUES(?,?)");
272
273      if (DebugFile.trace) {
274        DebugFile.decIdent();
275        DebugFile.writeln("End UserLoader.prepare()");
276      }
277    }
278
279    // ---------------------------------------------------------------------------
280

281    public void close() throws SQLException JavaDoc {
282      if (null!=oGroupInsr) { oGroupInsr.close(); oGroupInsr=null; }
283      if (null!=oUserUpdt ) { oUserUpdt.close(); oUserUpdt=null; }
284      if (null!=oUserInsr ) { oUserInsr.close(); oUserInsr=null; }
285    }
286
287    // ---------------------------------------------------------------------------
288

289    public void store(Connection JavaDoc oConn, String JavaDoc sWorkArea, int iFlags)
290      throws SQLException JavaDoc,IllegalArgumentException JavaDoc,NullPointerException JavaDoc,
291             ClassCastException JavaDoc,NumberFormatException JavaDoc {
292
293      if (oUserInsr==null || oUserUpdt==null)
294        throw new SQLException JavaDoc("Invalid command sequece. Must call UserLoader.prepare() before UserLoader.store()");
295
296      if (!test(iFlags,MODE_APPEND) && !test(iFlags,MODE_UPDATE))
297        throw new IllegalArgumentException JavaDoc("UserLoader.store() Flags bitmask must contain either MODE_APPEND, MODE_UPDATE or both");
298
299      if (null==getColNull(id_domain))
300        throw new NullPointerException JavaDoc("UserLoader.store() id_domain cannot be null");
301
302      if (DebugFile.trace) {
303        DebugFile.writeln("Begin UserLoader.store([Connection],"+sWorkArea+","+String.valueOf(iFlags)+")");
304        DebugFile.incIdent();
305        StringBuffer JavaDoc oRow = new StringBuffer JavaDoc();
306        oRow.append('{');
307        oRow.append(ColumnNames[0]+"=");
308        oRow.append(aValues[0]==null ? "null" : aValues[0]);
309        for (int d=1; d<aValues.length; d++) {
310          oRow.append(","+ColumnNames[d]+"=");
311          oRow.append(aValues[d]==null ? "null" : aValues[d]);
312        } // next
313
oRow.append('}');
314        DebugFile.writeln(oRow.toString());
315      }
316
317      int iAffected = 0;
318      Timestamp JavaDoc tsNow = new Timestamp JavaDoc(new Date JavaDoc().getTime());
319      int iDomainId = Integer.parseInt(get(id_domain).toString());
320
321      if (null==get(gu_workarea)) {
322        if (DebugFile.trace) DebugFile.writeln("setting workarea to "+sWorkArea);
323        put(gu_workarea, sWorkArea);
324      } else {
325        if (DebugFile.trace) DebugFile.writeln("workarea for current record is "+getColNull(gu_workarea));
326      }
327
328      if (null==getColNull(gu_user) && null!=getColNull(tx_nickname)) {
329        put(gu_user, ACLUser.getIdFromNick(oConn, iDomainId, getColNull(tx_nickname)));
330      }
331
332      if (test(iFlags,MODE_UPDATE) && null!=getColNull(gu_user)) {
333         oUserUpdt.setInt(1, iDomainId);
334         oUserUpdt.setObject(2, get(tx_nickname), Types.VARCHAR);
335         oUserUpdt.setObject(3, get(tx_pwd), Types.VARCHAR);
336         oUserUpdt.setObject(4, get(tx_pwd_sign), Types.VARCHAR);
337         oUserUpdt.setObject(5, get(bo_change_pwd), Types.SMALLINT);
338         oUserUpdt.setObject(6, get(bo_searchable), Types.SMALLINT);
339         oUserUpdt.setObject(7, get(bo_active), Types.SMALLINT);
340         oUserUpdt.setObject(8, get(len_quota), Types.DECIMAL);
341         oUserUpdt.setObject(9, get(max_quota), Types.DECIMAL);
342         oUserUpdt.setObject(10, get(tp_account), Types.CHAR);
343         oUserUpdt.setObject(11, get(id_account), Types.CHAR);
344         if (aValues[dt_last_update]==null)
345           oUserUpdt.setTimestamp(12, tsNow);
346         else
347           oUserUpdt.setObject(12, aValues[dt_last_update], Types.TIMESTAMP);
348         if (aValues[dt_last_visit]==null)
349           oUserUpdt.setNull(13, Types.TIMESTAMP);
350         else
351           oUserUpdt.setObject(13, aValues[dt_last_visit], Types.TIMESTAMP);
352         if (aValues[dt_cancel]==null)
353           oUserUpdt.setNull(14, Types.TIMESTAMP);
354         else
355           oUserUpdt.setObject(14, aValues[dt_cancel], Types.TIMESTAMP);
356         oUserUpdt.setObject(15, get(tx_main_email), Types.VARCHAR);
357         oUserUpdt.setObject(16, get(tx_alt_email), Types.VARCHAR);
358         oUserUpdt.setObject(17, get(nm_user), Types.VARCHAR);
359         oUserUpdt.setObject(18, get(tx_surname1), Types.VARCHAR);
360         oUserUpdt.setObject(19, get(tx_surname2), Types.VARCHAR);
361         oUserUpdt.setObject(20, get(tx_challenge), Types.VARCHAR);
362         oUserUpdt.setObject(21, get(tx_reply), Types.VARCHAR);
363         if (aValues[dt_pwd_expires]==null)
364           oUserUpdt.setNull(22, Types.TIMESTAMP);
365         else
366           oUserUpdt.setObject(22, aValues[dt_pwd_expires], Types.TIMESTAMP);
367         oUserUpdt.setObject(23, get(gu_category), Types.CHAR);
368         oUserUpdt.setObject(24, get(gu_workarea), Types.CHAR);
369         oUserUpdt.setObject(25, get(nm_company), Types.VARCHAR);
370         oUserUpdt.setObject(26, get(de_title), Types.VARCHAR);
371         oUserUpdt.setObject(27, get(id_gender), Types.CHAR);
372         if (aValues[dt_birth]==null)
373           oUserUpdt.setNull(28, Types.TIMESTAMP);
374         else
375           oUserUpdt.setObject(28, aValues[dt_birth], Types.TIMESTAMP);
376         oUserUpdt.setObject(29, get(ny_age), Types.SMALLINT);
377         oUserUpdt.setObject(30, get(marital_status), Types.CHAR);
378         oUserUpdt.setObject(31, get(tx_education), Types.VARCHAR);
379         oUserUpdt.setObject(32, get(icq_id), Types.VARCHAR);
380         oUserUpdt.setObject(33, get(sn_passport), Types.VARCHAR);
381         oUserUpdt.setObject(34, get(tp_passport), Types.VARCHAR);
382         oUserUpdt.setObject(35, get(tx_comments), Types.VARCHAR);
383         oUserUpdt.setString(36, getColNull(gu_user));
384         iAffected = oUserUpdt.executeUpdate();
385       }
386
387       if (0==iAffected && test(iFlags,MODE_APPEND)) {
388         aValues[gu_user] = Gadgets.generateUUID();
389         oUserInsr.setTimestamp(1, tsNow);
390         oUserInsr.setInt(2, iDomainId);
391         oUserInsr.setObject(3, get(tx_nickname), Types.VARCHAR);
392         oUserInsr.setObject(4, get(tx_pwd), Types.VARCHAR);
393         oUserInsr.setObject(5, get(tx_pwd_sign), Types.VARCHAR);
394         oUserInsr.setObject(6, get(bo_change_pwd), Types.SMALLINT);
395         oUserInsr.setObject(7, get(bo_searchable), Types.SMALLINT);
396         oUserInsr.setObject(8, get(bo_active), Types.SMALLINT);
397         oUserInsr.setObject(9, get(len_quota), Types.DECIMAL);
398         oUserInsr.setObject(10, get(max_quota), Types.DECIMAL);
399         oUserInsr.setObject(11, get(tp_account), Types.CHAR);
400         oUserInsr.setObject(12, get(id_account), Types.CHAR);
401         if (aValues[dt_last_update]==null)
402           oUserInsr.setTimestamp(13, tsNow);
403         else
404           oUserInsr.setObject(13, aValues[dt_last_update], Types.TIMESTAMP);
405         if (aValues[dt_last_visit]==null)
406           oUserInsr.setNull(14, Types.TIMESTAMP);
407         else
408           oUserInsr.setObject(14, aValues[dt_last_visit], Types.TIMESTAMP);
409         if (aValues[dt_cancel]==null)
410           oUserInsr.setNull(15, Types.TIMESTAMP);
411         else
412           oUserInsr.setObject(15, aValues[dt_cancel], Types.TIMESTAMP);
413         oUserInsr.setObject(16, get(tx_main_email), Types.VARCHAR);
414         oUserInsr.setObject(17, get(tx_alt_email), Types.VARCHAR);
415         oUserInsr.setObject(18, get(nm_user), Types.VARCHAR);
416         oUserInsr.setObject(19, get(tx_surname1), Types.VARCHAR);
417         oUserInsr.setObject(20, get(tx_surname2), Types.VARCHAR);
418         oUserInsr.setObject(21, get(tx_challenge), Types.VARCHAR);
419         oUserInsr.setObject(22, get(tx_reply), Types.VARCHAR);
420         if (aValues[dt_pwd_expires]==null)
421           oUserInsr.setNull(23, Types.TIMESTAMP);
422         else
423           oUserInsr.setObject(23, aValues[dt_pwd_expires], Types.TIMESTAMP);
424         oUserInsr.setObject(24, get(gu_category), Types.CHAR);
425         oUserInsr.setObject(25, get(gu_workarea), Types.CHAR);
426         oUserInsr.setObject(26, get(nm_company), Types.VARCHAR);
427         oUserInsr.setObject(27, get(de_title), Types.VARCHAR);
428         oUserInsr.setObject(28, get(id_gender), Types.CHAR);
429         if (aValues[dt_birth]==null)
430           oUserInsr.setNull(29, Types.TIMESTAMP);
431         else
432           oUserInsr.setObject(29, aValues[dt_birth], Types.TIMESTAMP);
433         oUserInsr.setObject(30, get(ny_age), Types.SMALLINT);
434         oUserInsr.setObject(31, get(marital_status), Types.CHAR);
435         oUserInsr.setObject(32, get(tx_education), Types.VARCHAR);
436         oUserInsr.setObject(33, get(icq_id), Types.VARCHAR);
437         oUserInsr.setObject(34, get(sn_passport), Types.VARCHAR);
438         oUserInsr.setObject(35, get(tp_passport), Types.VARCHAR);
439         oUserInsr.setObject(36, get(tx_comments), Types.VARCHAR);
440         oUserInsr.setString(37, getColNull(gu_user));
441         oUserInsr.execute();
442       }
443
444       if (null==aValues[gu_acl_group] && null!=aValues[nm_acl_group]) {
445         if (iDomainId==iLastDomainId && sLastGroupNm.equals(aValues[nm_acl_group])) {
446           put (gu_acl_group, sLastGroupId);
447         } else {
448           put(gu_acl_group, ACLGroup.getIdFromName(oConn, iDomainId, getColNull(nm_acl_group)));
449           iLastDomainId=iDomainId;
450           sLastGroupNm=getColNull(nm_acl_group);
451           sLastGroupId=getColNull(gu_acl_group);
452         }
453       }
454
455       if (null!=aValues[gu_acl_group]) {
456         oGroupInsr.setString(1, getColNull(gu_user));
457         oGroupInsr.setString(1, getColNull(gu_acl_group));
458         try {
459           oGroupInsr.execute();
460         } catch (SQLException JavaDoc ignore) {
461           if (DebugFile.trace)
462             DebugFile.writeln("UserLoader.store() User "+getColNull(tx_nickname)+"("+getColNull(gu_user)+") already exists at group "+getColNull(nm_acl_group)+"("+getColNull(gu_acl_group)+")");
463         }
464       } // fi
465

466       if (DebugFile.trace) {
467         DebugFile.decIdent();
468         DebugFile.writeln("End UserLoader.store()");
469       }
470    } // store
471

472    // ---------------------------------------------------------------------------
473

474   // Keep this list sorted
475
private static final String JavaDoc[] ColumnNames = { "","bo_active","bo_change_pwd","bo_searchable","de_title","dt_birth","dt_cancel","dt_created","dt_last_update","dt_last_visit","dt_pwd_expires","gu_acl_group","gu_category","gu_user","gu_workarea","icq_id","id_account","id_domain","id_gender","len_quota","marital_status","max_quota","nm_acl_group","nm_company","nm_user","nm_workarea","ny_age","sn_passport","tp_account","tp_passport","tx_alt_email","tx_challenge","tx_comments","tx_education","tx_main_email","tx_nickname","tx_pwd","tx_pwd_sign","tx_reply","tx_surname1","tx_surname2"};
476
477   // Keep these column indexes in sync with ColumnNames array
478
public static int bo_active= 1;
479   public static int bo_change_pwd= 2;
480   public static int bo_searchable= 3;
481   public static int de_title= 4;
482   public static int dt_birth= 5;
483   public static int dt_cancel= 6;
484   public static int dt_created= 7;
485   public static int dt_last_update= 8;
486   public static int dt_last_visit= 9;
487   public static int dt_pwd_expires= 10;
488   public static int gu_acl_group= 11;
489   public static int gu_category= 12;
490   public static int gu_user= 13;
491   public static int gu_workarea= 14;
492   public static int icq_id= 15;
493   public static int id_account= 16;
494   public static int id_domain= 17;
495   public static int id_gender= 18;
496   public static int len_quota= 19;
497   public static int marital_status= 20;
498   public static int max_quota= 21;
499   public static int nm_acl_group= 22;
500   public static int nm_company= 23;
501   public static int nm_user= 24;
502   public static int nm_workarea= 25;
503   public static int ny_age= 26;
504   public static int sn_passport= 27;
505   public static int tp_account= 28;
506   public static int tp_passport= 29;
507   public static int tx_alt_email= 30;
508   public static int tx_challenge= 31;
509   public static int tx_comments= 32;
510   public static int tx_education= 33;
511   public static int tx_main_email= 34;
512   public static int tx_nickname= 35;
513   public static int tx_pwd= 36;
514   public static int tx_pwd_sign= 37;
515   public static int tx_reply= 38;
516   public static int tx_surname1= 39;
517   public static int tx_surname2= 40;
518
519 }
520
Popular Tags