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 com.teamkonzept.lib.TKVector; 7 import de.webman.acl.Role; 8 9 18 public class RoleDBData 19 extends ObjectDBData 20 { 21 22 24 27 private String name = null; 28 29 30 32 38 public RoleDBData (Integer id, 39 String name) 40 { 41 super(id); 42 43 this.name = name; 44 } 45 46 51 public RoleDBData (Role role) 52 { 53 super(role); 54 55 this.name = role.getName(); 56 } 57 58 59 61 66 public final ObjectDBInterface getDBInterface () 67 { 68 return RoleDBInterface.getInstance(); 69 } 70 71 79 public void insertInitialIntoQuery (TKQuery query) 80 throws SQLException 81 { 82 super.insertInitialIntoQuery(query); 83 84 query.setQueryParams("NAME", this.name); 85 } 86 87 96 public void fill (ResultSet result) 97 throws SQLException 98 { 99 this.name = result.getString("NAME"); 100 101 super.fill(result); 102 } 103 104 109 public final String getName () 110 { 111 return this.name; 112 } 113 114 } 115 | Popular Tags |