1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.sf.asterisk.manager.action;
18
19 /***
20 * Adds or updates an entry in the Asterisk database for a given family, key,
21 * and value.<br>
22 * Available since Asterisk 1.2
23 *
24 * @author srt
25 * @version $Id: DBPutAction.java,v 1.3 2005/08/07 00:09:42 srt Exp $
26 * @since 0.2
27 */
28 public class DBPutAction extends AbstractManagerAction
29 {
30 /***
31 * Serial version identifier
32 */
33 private static final long serialVersionUID = 921037572305993779L;
34 private String family;
35 private String key;
36 private String val;
37
38 /***
39 * Creates a new empty DBPutAction.
40 */
41 public DBPutAction()
42 {
43
44 }
45
46 /***
47 * Creates a new DBPutAction that sets the value of the database entry with
48 * the given key in the given family.
49 *
50 * @param family the family of the key
51 * @param key the key of the entry to set
52 * @param val the value to set
53 * @since 0.2
54 */
55 public DBPutAction(String family, String key, String val)
56 {
57 this.family = family;
58 this.key = key;
59 this.val = val;
60 }
61
62 public String getAction()
63 {
64 return "DBPut";
65 }
66
67 /***
68 * Returns the family of the key to set.
69 *
70 * @return the family of the key to set.
71 */
72 public String getFamily()
73 {
74 return family;
75 }
76
77 /***
78 * Sets the family of the key to set.
79 *
80 * @param family the family of the key to set.
81 */
82 public void setFamily(String family)
83 {
84 this.family = family;
85 }
86
87 /***
88 * Returns the the key to set.
89 *
90 * @return the key to set.
91 */
92 public String getKey()
93 {
94 return key;
95 }
96
97 /***
98 * Sets the key to set.
99 *
100 * @param key the key to set.
101 */
102 public void setKey(String key)
103 {
104 this.key = key;
105 }
106
107 /***
108 * Returns the value to set.
109 *
110 * @return the value to set.
111 */
112 public String getVal()
113 {
114 return val;
115 }
116
117 /***
118 * Sets the value to set.
119 *
120 * @param val the value to set.
121 */
122 public void setVal(String val)
123 {
124 this.val = val;
125 }
126 }