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.Property; 7 8 17 public class PropertyDBData 18 extends ObjectDBData 19 { 20 21 23 26 private Integer login = null; 27 28 31 private String name = null; 32 33 36 private String value = null; 37 38 39 41 47 public PropertyDBData (Integer id, 48 Integer login, 49 String name, 50 String value) 51 { 52 super(id); 53 54 this.login = login; 55 this.name = name; 56 this.value = value; 57 58 super.setIgnore(true); 59 } 60 61 66 public PropertyDBData (Property property) 67 { 68 super(property); 69 70 this.login = property.getLoginID(); 71 this.name = property.getName(); 72 this.value = property.getValue(); 73 } 74 75 76 78 83 public final ObjectDBInterface getDBInterface () 84 { 85 return PropertyDBInterface.getInstance(); 86 } 87 88 96 public void insertInitialIntoQuery (TKQuery query) 97 throws SQLException 98 { 99 super.insertInitialIntoQuery(query); 100 101 query.setQueryParams("WM_USER_ID", this.login); 102 query.setQueryParams("NAME", this.name); 103 query.setQueryParams("VALUE", this.value); 104 } 105 106 115 public void fill (ResultSet result) 116 throws SQLException 117 { 118 this.login = new Integer (result.getInt(LoginDBInterface.getInstance().getPrimaryKeyName())); 119 this.name = result.getString("NAME"); 120 this.value = result.getString("VALUE"); 121 122 super.fill(result); 123 } 124 125 130 public final Integer getLogin () 131 { 132 return this.login; 133 } 134 135 140 public final String getName () 141 { 142 return this.name; 143 } 144 145 150 public final String getValue () 151 { 152 return this.value; 153 } 154 155 } 156 | Popular Tags |