ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilTableLock.php
Go to the documentation of this file.
1<?php
2require_once('./Services/Database/interfaces/interface.ilTableLockInterface.php');
3
10
14 protected $table_name = '';
18 protected $lock_sequence = false;
22 protected $alias = '';
30 protected $checked = false;
34 protected $ilDBInstance;
35
36
42 public function __construct($table_name, ilDBInterface $ilDBInterface) {
43 $this->table_name = $table_name;
44 $this->ilDBInstance = $ilDBInterface;
45 }
46
47
51 public function check() {
52 if (!in_array($this->getLockLevel(), array( ilAtomQuery::LOCK_READ, ilAtomQuery::LOCK_WRITE ))) {
54 }
55 if (!$this->getTableName() || !$this->ilDBInstance->tableExists($this->getTableName())) {
57 }
58
59 $this->setChecked(true);
60 }
61
62
67 public function lockSequence($lock_bool) {
68 $this->setLockSequence($lock_bool);
69
70 return $this;
71 }
72
73
78 public function aliasName($alias_name) {
79 $this->setAlias($alias_name);
80
81 return $this;
82 }
83
84
88 public function getTableName() {
89 return $this->table_name;
90 }
91
92
96 public function setTableName($table_name) {
97 $this->table_name = $table_name;
98 }
99
100
104 public function isLockSequence() {
106 }
107
108
113 $this->lock_sequence = $lock_sequence;
114 }
115
116
120 public function getAlias() {
121 return $this->alias;
122 }
123
124
128 public function setAlias($alias) {
129 $this->alias = $alias;
130 }
131
132
136 public function getLockLevel() {
137 return $this->lock_level;
138 }
139
140
144 public function setLockLevel($lock_level) {
145 $this->lock_level = $lock_level;
146 }
147
148
152 public function isChecked() {
153 return $this->checked;
154 }
155
156
160 public function setChecked($checked) {
161 $this->checked = $checked;
162 }
163}
164
An exception for terminatinating execution or to throw for unit testing.
Class ilAtomQueryException.
Class ilTableLock.
aliasName($alias_name)
__construct($table_name, ilDBInterface $ilDBInterface)
ilTableLock constructor.
lockSequence($lock_bool)
setChecked($checked)
setLockSequence($lock_sequence)
setTableName($table_name)
setLockLevel($lock_level)
Interface ilDBInterface.
Class ilTableLockInterface.