Source code: mill/a3/Module.java
1 package mill.a3;
2
3 import java.sql.ResultSet;
4 import mill.tools.RsetTools;
5
6 public class Module
7 {
8 /**
9 module - название модуля
10 */
11 public String module = "";
12 /**
13 url - url доступа к модулю
14 */
15 public String url = "";
16 /**
17 order - значение для порядка вывода модуля
18 */
19 public int order = 0;
20 public int isNew = -1;
21 public int modRecordNumber = 0;
22 public int applRecordNumber = 0;
23
24 public Module(String m, String u, int o)
25 {
26 module = m;
27 url = u;
28 order = o;
29 }
30
31 public Module(ResultSet rs)
32 throws AuthException
33 {
34 try
35 {
36 module = RsetTools.getRsetString(rs, "NAME_OBJECT_ARM");
37 url = RsetTools.getRsetString(rs, "url");
38 order = RsetTools.getRsetInt(rs, "order_field");
39 isNew = RsetTools.getRsetInt(rs, "is_new");
40 }
41 catch( Exception e )
42 {
43 throw new AuthException( e.toString() );
44 }
45 }
46 }