3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Db\Metadata\
Object;
18 protected $name = null;
24 protected $tableName = null;
30 protected $schemaName = null;
36 protected $ordinalPosition = null;
42 protected $columnDefault = null;
48 protected $isNullable = null;
54 protected $dataType = null;
60 protected $characterMaximumLength = null;
66 protected $characterOctetLength = null;
72 protected $numericPrecision = null;
78 protected $numericScale = null;
84 protected $numericUnsigned = null;
90 protected $errata = array();
96 * @param string $tableName
97 * @param string $schemaName
99 public function __construct($name, $tableName, $schemaName = null)
101 $this->setName($name);
102 $this->setTableName($tableName);
103 $this->setSchemaName($schemaName);
109 * @param string $name
111 public function setName($name)
121 public function getName()
131 public function getTableName()
133 return $this->tableName
;
139 * @param string $tableName
140 * @return ColumnObject
142 public function setTableName($tableName)
144 $this->tableName
= $tableName;
151 * @param string $schemaName
153 public function setSchemaName($schemaName)
155 $this->schemaName
= $schemaName;
163 public function getSchemaName()
165 return $this->schemaName
;
169 * @return int $ordinalPosition
171 public function getOrdinalPosition()
173 return $this->ordinalPosition
;
177 * @param int $ordinalPosition to set
178 * @return ColumnObject
180 public function setOrdinalPosition($ordinalPosition)
182 $this->ordinalPosition
= $ordinalPosition;
187 * @return null|string the $columnDefault
189 public function getColumnDefault()
191 return $this->columnDefault
;
195 * @param mixed $columnDefault to set
196 * @return ColumnObject
198 public function setColumnDefault($columnDefault)
200 $this->columnDefault
= $columnDefault;
205 * @return bool $isNullable
207 public function getIsNullable()
209 return $this->isNullable
;
213 * @param bool $isNullable to set
214 * @return ColumnObject
216 public function setIsNullable($isNullable)
218 $this->isNullable
= $isNullable;
223 * @return bool $isNullable
225 public function isNullable()
227 return $this->isNullable
;
231 * @return null|string the $dataType
233 public function getDataType()
235 return $this->dataType
;
239 * @param string $dataType the $dataType to set
240 * @return ColumnObject
242 public function setDataType($dataType)
244 $this->dataType
= $dataType;
249 * @return int|null the $characterMaximumLength
251 public function getCharacterMaximumLength()
253 return $this->characterMaximumLength
;
257 * @param int $characterMaximumLength the $characterMaximumLength to set
258 * @return ColumnObject
260 public function setCharacterMaximumLength($characterMaximumLength)
262 $this->characterMaximumLength
= $characterMaximumLength;
267 * @return int|null the $characterOctetLength
269 public function getCharacterOctetLength()
271 return $this->characterOctetLength
;
275 * @param int $characterOctetLength the $characterOctetLength to set
276 * @return ColumnObject
278 public function setCharacterOctetLength($characterOctetLength)
280 $this->characterOctetLength
= $characterOctetLength;
285 * @return int the $numericPrecision
287 public function getNumericPrecision()
289 return $this->numericPrecision
;
293 * @param int $numericPrecision the $numericPrevision to set
294 * @return ColumnObject
296 public function setNumericPrecision($numericPrecision)
298 $this->numericPrecision
= $numericPrecision;
303 * @return int the $numericScale
305 public function getNumericScale()
307 return $this->numericScale
;
311 * @param int $numericScale the $numericScale to set
312 * @return ColumnObject
314 public function setNumericScale($numericScale)
316 $this->numericScale
= $numericScale;
323 public function getNumericUnsigned()
325 return $this->numericUnsigned
;
329 * @param bool $numericUnsigned
330 * @return ColumnObject
332 public function setNumericUnsigned($numericUnsigned)
334 $this->numericUnsigned
= $numericUnsigned;
341 public function isNumericUnsigned()
343 return $this->numericUnsigned
;
347 * @return array the $errata
349 public function getErratas()
351 return $this->errata
;
355 * @param array $erratas
356 * @return ColumnObject
358 public function setErratas(array $erratas)
360 foreach ($erratas as $name => $value) {
361 $this->setErrata($name, $value);
367 * @param string $errataName
370 public function getErrata($errataName)
372 if (array_key_exists($errataName, $this->errata
)) {
373 return $this->errata
[$errataName];
379 * @param string $errataName
380 * @param mixed $errataValue
381 * @return ColumnObject
383 public function setErrata($errataName, $errataValue)
385 $this->errata
[$errataName] = $errataValue;