===================================================================
191050
public DbDatum getClassPipeProperty(String className, String pipeName, String propertyName) throws DevFailed {
        DbPipe dbPipe = databaseDAO.getClassPipeProperties(this, className, pipeName);
        DbDatum datum = dbPipe.getDatum(propertyName);
        if (datum==null)
            Except.throw_exception("TangoApi_PropertyNotFound",
                    "Property " + propertyName + " not found for pipe " + pipeName);
        return datum;
    }
3823
public function init()
    {
        $this->_init();

        if ($this->id_field) {
            $this->addField($this->id_field, [
                'system'    => true,
            ]);
        }
    }
364348
public function build()
    {
        /** @var Buildable[] $delayed */
        $delayed = [];

        foreach ($this->getQueued() as $buildable) {
            if ($buildable instanceof Delay) {
                $delayed[] = $buildable;
            } else {
                $buildable->build();
            }
        }

        foreach ($delayed as $buildable) {
            $buildable->build();
        }
    }
152362
public function update()
    {
        if (!$this->exists()) {
            throw new \RuntimeException('Cannot update a table that doesn\'t exist!');
        }

        // update table
        foreach ($this->getPendingColumns() as $column) {
            $this->getAdapter()->addColumn($this, $column);
        }

        foreach ($this->getIndexes() as $index) {
            $this->getAdapter()->addIndex($this, $index);
        }

        foreach ($this->getForeignKeys() as $foreignKey) {
            $this->getAdapter()->addForeignKey($this, $foreignKey);
        }

        $this->saveData();
        $this->reset(); // reset pending changes
    }
1174745
public function onBeforeWrite()
    {
        if (!$this->isInDB()) {
            $this->CreatorID = Member::currentUserID();
        }

        if (!$this->VersionNumber) {
            $versions = DataObject::get(
                'FileVersion', sprintf('"FileID" = %d', $this->FileID)
            );

            if ($versions) {
                $this->VersionNumber = $versions->Count() + 1;
            } else {
                $this->VersionNumber = 1;
            }
        }

        if (!$this->Filename) {
            $this->Filename = $this->saveCurrentVersion();
        }

        parent::onBeforeWrite();
    }
412516
public function modifyTable()
    {
        if (!$this->getTable()->containsColumn($this->getParameter('create_column'))) {
            $this->getTable()->addColumn(array(
                'name' => $this->getParameter('create_column'),
                'type' => 'TIMESTAMP'
            ));
        }

        if ($this->withUpdatedAt()) {
            if (!$this->getTable()->containsColumn($this->getParameter('update_column'))) {
                $this->getTable()->addColumn(array(
                    'name' => $this->getParameter('update_column'),
                    'type' => 'TIMESTAMP'
                ));
            }
        }
    }
683787
public function initialize()
    {
        if ($this->all()->count() < 1) {
            return;
        }

        $this->all()->each(function (ActionInterface $action) {
            $action->initialize();
        });

        $this->setHtmlAttribute('data-type', 'display-actions');

        if (! $this->hasHtmlAttribute('class')) {
            $this->setHtmlAttribute('class', 'panel-footer');
        }
    }
1373143
public static void initPoolConf() throws DevFailed {
        polledDevices.clear();
        final Map<String, String[]> prop = PropertiesUtils.getDeviceProperties(ServerManager.getInstance()
                .getAdminDeviceName());
        if (prop.containsKey(POLLING_THREADS_POOL_CONF)) {
            final String[] pollingThreadsPoolConf = prop.get(POLLING_THREADS_POOL_CONF);
            for (int i = 0; i < pollingThreadsPoolConf.length; i++) {
                if (cacheList.containsKey(pollingThreadsPoolConf[i]) && !pollingThreadsPoolConf[i].isEmpty()
                        && !polledDevices.contains(pollingThreadsPoolConf[i])) {
                    polledDevices.add(pollingThreadsPoolConf[i]);
                }
            }
        }
    }
277510
public function create()
    {
        $autoIncrementField = $this->getAutoIncrementField();
        if ($autoIncrementField && $this->$autoIncrementField === null) {
            $this->$autoIncrementField = $this->getNextAutoIncrementId();
        }

        $fields = $this->getFields();
        foreach ($this->getAutoFilledData(self::OP_CREATE) as $field => $value) {
            /** @noinspection NotOptimalIfConditionsInspection */
            if (!in_array($field, $fields, true) || $this->$field !== null) {
                continue;
            }
            $this->$field = $value;
        }

        $this->validate($fields);

        $this->eventsManager->fireEvent('model:beforeSave', $this);
        $this->eventsManager->fireEvent('model:beforeCreate', $this);

        $fieldValues = [];
        $defaultValueFields = [];
        foreach ($fields as $field) {
            if ($this->$field !== null) {
                $fieldValues[$field] = $this->$field;
            } elseif ($field !== $autoIncrementField) {
                $defaultValueFields[] = $field;
            }
        }

        foreach ($this->getJsonFields() as $field) {
            if (is_array($this->$field)) {
                $fieldValues[$field] = json_encode($this->$field, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
            }
        }

        /**
         * @var \ManaPHP\DbInterface $connection
         */
        $connection = $this->_di->getShared($this->getDb($this));

        if ($autoIncrementField && $this->$autoIncrementField === null) {
            $this->$autoIncrementField = (int)$connection->insert($this->getSource($this), $fieldValues, true);
        } else {
            $connection->insert($this->getSource($this), $fieldValues);
        }

        if ($defaultValueFields) {
            if ($r = static::query(null, $this)->select($defaultValueFields)->where($this->_getPrimaryKeyValuePairs())->fetch(true)) {
                foreach ($r[0] as $field => $value) {
                    $this->$field = $value;
                }
            }
        }

        $this->_snapshot = $this->toArray();

        $this->eventsManager->fireEvent('model:afterCreate', $this);
        $this->eventsManager->fireEvent('model:afterSave', $this);

        return $this;
    }
701641
public void init(final Connection connection, final String devname, final String param,
	    	final int src) throws DevFailed {
		connection.devname = devname;
		connection.setDevice_is_dbase(false);
		if (src == FROM_IOR) {
	    	connection.ior = param;
	    	connection.url = new TangoUrl();
	    	connection.url.protocol = TANGO;
		} else {
	    	Except.throw_wrong_syntax_exception(
                    "TangoApi_INVALID_ARGS", "Invalid argument", "Connection.Connection()");
		}
    }
132156
public function initialize()
    {
        if ($this->initialized === false) {
            $this->data = $this->cursor->toArray();
        }
        $this->initialized = true;
    }
242138
public synchronized void initDevice() {
        MDC.setContextMap(contextMap);
        xlogger.entry();
        if (stateImpl == null) {
            stateImpl = new StateImpl(businessObject, null, null);
        }
        if (statusImpl == null) {
            statusImpl = new StatusImpl(businessObject, null, null);
        }
        if (initImpl == null) {
            buildInit(null, false);
        }
        doInit();
        try {
            pushInterfaceChangeEvent(true);
        } catch (final DevFailed e) {
            // ignore
            logger.error("error pushing event", e);
        }
        logger.debug("device init done");
        xlogger.exit();
    }
91524
public function init() {
        parent::init();
        $this->db = Instance::ensure($this->db, Connection::className());
        $this->db->getCollection($this->itemTable)->createIndex(['name' => 1], ['unique' => true]);
        $this->db->getCollection($this->ruleTable)->createIndex(['name' => 1], ['unique' => true]);
    }
674812
public void put_device_property(String name, DbDatum[] properties) throws DevFailed {
		databaseDAO.put_device_property(this, name, properties);
	}
1336043
public function commit()
  {
    if (!is_null($this->_changes)) {
      $this->_commit($this->_changes);

      $this->_changes = null;
    }
  }
880638
private void putProperties(Database database) throws DevFailed {
        for (TangoClass clazz : classes) {
            clazz.putProperties(database);
            clazz.putAttributeProperties(database);
            clazz.putPipeProperties(database);
            for (TangoDevice device : clazz) {
                device.putProperties(database);
                device.putAttributeProperties(database);
                device.putPipeProperties(database);
            }
        }
    }
1000705
public void put_device_attribute_property(Database database, String deviceName, DbAttribute[] attr)
            throws DevFailed {
        if (!database.isAccess_checked()) checkAccess(database);

        DeviceData argIn = new DeviceData();
        try {
            //	value is an array
            argIn.insert(ApiUtil.toStringArray(deviceName, attr, 2));
            command_inout(database, "DbPutDeviceAttributeProperty2", argIn);
        } catch (DevFailed e) {
            if (e.errors[0].reason.equals("API_CommandNotFound")) {
                //	Value is just one element
                argIn.insert(ApiUtil.toStringArray(deviceName, attr, 1));
                command_inout(database, "DbPutDeviceAttributeProperty", argIn);
            } else
                throw e;
        }
    }