<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */



class DBWorkHLBeruf extends DBWorkHLBasis
{
  
  public function getNewObject()
  {
    return new Beruf();
  }

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

  
  public function getCurrentRow($pRefreshCache = false)
  {
    $tmp = $this->getNewObject();
    $tmp->id = $this->getDatamodulValue('id');
    $tmp->beruf = $this->getDatamodulValue('beruf');

    return $tmp;
  }

  
  public function getAll()
  {
    $this->dboperation->clear();
    $this->dboperation->query('SELECT * FROM hlberuf ORDER BY beruf');

    return $this->getAllRows();
  }

  
  public function getOne($pId)
  {
    $id = $this->dboperation->getInt4Sql($pId);
    $this->dboperation->clear();
    $this->dboperation->query("SELECT * FROM hlberuf WHERE id='" . $id . "'");

    return $this->getFirstRow();
  }
}