Changeset 246
- Timestamp:
- 02/10/07 00:28:44 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/rdbms/persistence/annotations/stubDBColumnAnnotation.php
r242 r246 66 66 */ 67 67 protected $isKey = false; 68 /** 69 * the name of the setter method to use for restoring the value from database 70 * 71 * @var string 72 */ 73 protected $setterMethod = null; 68 74 69 75 /** … … 74 80 public function getAnnotationTarget() 75 81 { 76 return stubAnnotation::TARGET_ PROPERTY + stubAnnotation::TARGET_METHOD;82 return stubAnnotation::TARGET_METHOD; 77 83 } 78 84 … … 252 258 return (false == $this->isPrimaryKey && true == $this->isKey); 253 259 } 260 261 /** 262 * set the name of the setter method 263 * 264 * @param string $setterMethod 265 */ 266 public function setSetterMethod($setterMethod) 267 { 268 $this->setterMethod = $setterMethod; 269 } 270 271 /** 272 * checks whether the name of the setter method is known 273 * 274 * @return bool 275 */ 276 public function hasSetterMethod() 277 { 278 return (null !== $this->setterMethod); 279 } 280 281 /** 282 * returns the name of the setter method 283 * 284 * @return string 285 */ 286 public function getSetterMethod() 287 { 288 return $this->setterMethod; 289 } 254 290 } 255 291 ?> trunk/src/main/php/net/stubbles/rdbms/persistence/annotations/stubDBTableAnnotation.php
r242 r246 30 30 */ 31 31 protected $type; 32 /** 33 * the character set to use for this table 34 * 35 * @var string 36 */ 37 protected $characterSet = null; 38 /** 39 * the collation to use for this table 40 * 41 * @var string 42 */ 43 protected $collation = null; 44 /** 45 * an optional comment for this table 46 * 47 * @var string 48 */ 49 protected $comment = null; 32 50 33 51 /** … … 38 56 public function getAnnotationTarget() 39 57 { 40 return stubAnnotation::TARGET_CLASS + stubAnnotation::TARGET_ PROPERTY + stubAnnotation::TARGET_METHOD;58 return stubAnnotation::TARGET_CLASS + stubAnnotation::TARGET_METHOD; 41 59 } 42 60 … … 62 80 63 81 /** 64 * sets the type of the column82 * sets the type of the table 65 83 * 66 84 * @param string $type … … 72 90 73 91 /** 74 * returns the type of the column92 * returns the type of the table 75 93 * 76 94 * @return string … … 80 98 return $this->type; 81 99 } 100 101 /** 102 * sets the character set of the table 103 * 104 * @param string $characterSet 105 */ 106 public function setCharacterSet($characterSet) 107 { 108 $this->characterSet = $characterSet; 109 } 110 111 /** 112 * check if a character set is set 113 * 114 * @return bool 115 */ 116 public function hasCharacterSet() 117 { 118 return (null !== $this->characterSet); 119 } 120 121 /** 122 * returns the character set of the table if set, else null 123 * 124 * @return string 125 */ 126 public function getCharacterSet() 127 { 128 return $this->characterSet; 129 } 130 131 /** 132 * sets the collation of the table 133 * 134 * @param string $collation 135 */ 136 public function setCollation($collation) 137 { 138 $this->collation = $collation; 139 } 140 141 /** 142 * check if a collation is set 143 * 144 * @return bool 145 */ 146 public function hasCollation() 147 { 148 return (null !== $this->collation); 149 } 150 151 /** 152 * returns the collation of the table if set, else null 153 * 154 * @return string 155 */ 156 public function getCollation() 157 { 158 return $this->collation; 159 } 160 161 /** 162 * sets the comment of the table 163 * 164 * @param string $comment 165 */ 166 public function setComment($comment) 167 { 168 $this->comment = $comment; 169 } 170 171 /** 172 * check if a comment is set 173 * 174 * @return bool 175 */ 176 public function hasComment() 177 { 178 return (null !== $this->comment); 179 } 180 181 /** 182 * returns the comment of the table if set, else null 183 * 184 * @return string 185 */ 186 public function getComment() 187 { 188 return $this->comment; 189 } 82 190 } 83 191 ?>
