<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */


class DBWorkHLDatenschutzWeg extends DBWorkGenerated
{
  public function __construct($pDBTyp = 1, $pNewInstance = false)
  {
    parent::__construct($pDBTyp, $pNewInstance);
    $this->select = 'id, schluessel, text';
    $this->_dataModulFields = array('id', 'schluessel', 'text');
  }

  
  public function getNewObject()
  {
    return new HLDatenschutzWeg();
  }

  public function getTableName(): string
  {
    return 'hldatenschutzweg';
  }

  
  public function getBySchluessel($pSchluessel)
  {
    $schluessel = $this->dboperation->getString4Sql($pSchluessel);
    $sql = 'SELECT ' . $this->select . ' FROM ' . $this->getTableName()
           . ' WHERE schluessel = \'' . $schluessel . '\'';
    $this->dboperation->clear();
    $this->dboperation->query($sql);

    return $this->getFirstRow();
  }
}