1 package de.webman.acl.db; 2 3 import java.sql.ResultSet ; 4 import java.sql.SQLException ; 5 import com.teamkonzept.db.TKQuery; 6 import de.webman.acl.Context; 7 8 17 public class ContextDBData 18 extends ObjectDBData 19 { 20 21 23 26 private String name = null; 27 28 31 private String shortcut = null; 32 33 34 36 43 public ContextDBData (Integer id, 44 String name, 45 String shortcut) 46 { 47 super(id); 48 49 this.name = name; 50 this.shortcut = shortcut; 51 52 super.setIgnore(true); 53 } 54 55 60 public ContextDBData (Context context) 61 { 62 super(context); 63 64 this.name = context.getName(); 65 this.shortcut = context.getShortcut(); 66 } 67 68 69 71 76 public final ObjectDBInterface getDBInterface () 77 { 78 return ContextDBInterface.getInstance(); 79 } 80 81 89 public void insertInitialIntoQuery (TKQuery query) 90 throws SQLException 91 { 92 super.insertInitialIntoQuery(query); 93 94 query.setQueryParams("NAME", this.name); 95 query.setQueryParams("SHORTCUT", this.shortcut); 96 } 97 98 107 public void fill (ResultSet result) 108 throws SQLException 109 { 110 this.name = result.getString("NAME"); 111 this.shortcut = result.getString("SHORTCUT"); 112 113 super.fill(result); 114 } 115 116 121 public final String getName () 122 { 123 return this.name; 124 } 125 126 131 public final String getShortcut () 132 { 133 return this.shortcut; 134 } 135 136 } 137 | Popular Tags |