/branches/messigdp/include/Object/AziendaCoordinateBancarie.class.php
PHP | 453 lines | 222 code | 16 blank | 215 comment | 0 complexity | 80069481bf77ca4666764cd62ea7a2c8 MD5 | raw file
Possible License(s): LGPL-2.1, LGPL-3.0, GPL-3.0
- <?php
- /**
- * File AziendaCoordinateBancarie.class.php
- *
- * This file contains the definition of the class object
- * type AziendaCoordinateBancarie and at the end of the file,
- * a way to test the class (simply passing sending test = 1
- * via GET or POST ).
- * @author Marco Novo <mnovo@ncfsistemi.com>
- * @version 1.0
- */
- /**
- * This class defines fields and methods of AziendaCoordinateBancarie
- */
- class AziendaCoordinateBancarie {
- /**
- * $resourceLinkID
- * @access private
- * @var resource
- */
- private $resourceLinkID;
-
- /**
- * id
- * @access private
- * @var integer
- */
- private $id;
- /**
- * idAzienda
- * @access private
- * @var integer
- */
- private $idAzienda;
- /**
- * idAzienda_ragioneSociale
- * @access private
- * @var string
- */
- private $idAzienda_ragioneSociale;
- /**
- * idBanca
- * @access private
- * @var integer
- */
- private $idBanca;
- /**
- * idBanca_descrizione
- * @access private
- * @var string
- */
- private $idBanca_descrizione;
- /**
- * idBanca_filiale
- * @access private
- * @var string
- */
- private $idBanca_filiale;
- /**
- * iban
- * @access private
- * @var string
- */
- private $iban;
- /**
- * intestatario
- * @access private
- * @var string
- */
- private $intestatario;
- /**
- * note
- * @access private
- * @var string
- */
- private $note;
- /**
- * active
- * @access private
- * @var integer
- */
- private $active;
- /**
- * deleted
- * @access private
- * @var integer
- */
- private $deleted;
-
- /**
- * Set the value of resourceLinkID
- * @param resource $resourceLinkID
- */
- function setResourceLinkID($resourceLinkID){
- $this->resourceLinkID=$resourceLinkID;
- }
- /**
- * Get the value of resourceLinkID
- * @return resource
- */
- function getResourceLinkID(){
- return $this->resourceLinkID;
- }
- /**
- * Sets the value of field id
- * @param integer $id
- */
- function setId($id){
- $this->id=$id;
- }
- /**
- * Gets the value of field id
- * @return integer
- */
- function getId(){
- return $this->id;
- }
- /**
- * Sets the value of field idAzienda
- * @param integer $idAzienda
- */
- function setIdAzienda($idAzienda){
- $this->idAzienda=$idAzienda;
- }
- /**
- * Gets the value of field idAzienda
- * @return integer
- */
- function getIdAzienda(){
- return $this->idAzienda;
- }
- /**
- * Sets the value of foreign field idAzienda_ragioneSociale
- * @param string $idAzienda_ragioneSociale
- */
- function setIdAzienda_ragioneSociale($idAzienda_ragioneSociale){
- $this->idAzienda_ragioneSociale=$idAzienda_ragioneSociale;
- }
- /**
- * Gets the value of foreign field idAzienda_ragioneSociale
- * @return string
- */
- function getIdAzienda_ragioneSociale(){
- return $this->idAzienda_ragioneSociale;
- }
- /**
- * Sets the value of field idBanca
- * @param integer $idBanca
- */
- function setIdBanca($idBanca){
- $this->idBanca=$idBanca;
- }
- /**
- * Gets the value of field idBanca
- * @return integer
- */
- function getIdBanca(){
- return $this->idBanca;
- }
- /**
- * Sets the value of foreign field idBanca_descrizione
- * @param string $idBanca_descrizione
- */
- function setIdBanca_descrizione($idBanca_descrizione){
- $this->idBanca_descrizione=$idBanca_descrizione;
- }
- /**
- * Gets the value of foreign field idBanca_descrizione
- * @return string
- */
- function getIdBanca_descrizione(){
- return $this->idBanca_descrizione;
- }
- /**
- * Sets the value of foreign field idBanca_filiale
- * @param string $idBanca_filiale
- */
- function setIdBanca_filiale($idBanca_filiale){
- $this->idBanca_filiale=$idBanca_filiale;
- }
- /**
- * Gets the value of foreign field idBanca_filiale
- * @return string
- */
- function getIdBanca_filiale(){
- return $this->idBanca_filiale;
- }
- /**
- * Sets the value of field iban
- * @param string $iban
- */
- function setIban($iban){
- $this->iban=$iban;
- }
- /**
- * Gets the value of field iban
- * @return string
- */
- function getIban(){
- return $this->iban;
- }
- /**
- * Sets the value of field intestatario
- * @param string $intestatario
- */
- function setIntestatario($intestatario){
- $this->intestatario=$intestatario;
- }
- /**
- * Gets the value of field intestatario
- * @return string
- */
- function getIntestatario(){
- return $this->intestatario;
- }
- /**
- * Sets the value of field note
- * @param string $note
- */
- function setNote($note){
- $this->note=$note;
- }
- /**
- * Gets the value of field note
- * @return string
- */
- function getNote(){
- return $this->note;
- }
- /**
- * Sets the value of field active
- * @param integer $active
- */
- function setActive($active){
- $this->active=$active;
- }
- /**
- * Gets the value of field active
- * @return integer
- */
- function getActive(){
- return $this->active;
- }
- /**
- * Sets the value of field deleted
- * @param integer $deleted
- */
- function setDeleted($deleted){
- $this->deleted=$deleted;
- }
- /**
- * Gets the value of field deleted
- * @return integer
- */
- function getDeleted(){
- return $this->deleted;
- }
-
- /**
- * Constructor of the class
- */
- function __construct($resourceLinkID='',
- $id='',
- $idAzienda='',
- $idAzienda_ragioneSociale='',
- $idBanca='',
- $idBanca_descrizione='',
- $idBanca_filiale='',
- $iban='',
- $intestatario='',
- $note='',
- $active='',
- $deleted='') {
- $this->resourceLinkID = $resourceLinkID;
- $this->id = $id;
- $this->idAzienda = $idAzienda;
- $this->idAzienda_ragioneSociale = $idAzienda_ragioneSociale;
- $this->idBanca = $idBanca;
- $this->idBanca_descrizione = $idBanca_descrizione;
- $this->idBanca_filiale = $idBanca_filiale;
- $this->iban = $iban;
- $this->intestatario = $intestatario;
- $this->note = $note;
- $this->active = $active;
- $this->deleted = $deleted;
- }
-
- /**
- * Destructor of the class
- */
- function __destruct() {
- }
-
- /**
- * Get the value of descriptive field
- * @return string
- */
- function getDescriptiveFields(){
- return trim($this->getIban().' '.' (id: '.$this->getId().')');
- }
-
- /**
- * Get the name and the value of mail fields
- * @return string
- */
- function getMailFields(){
- return trim("Id: ".$this->getId()."\n"."Azienda: ".$this->getIdAzienda()."\n"."Banca: ".$this->getIdBanca()."\n"."Iban: ".$this->getIban()."\n"."Intestatario: ".$this->getIntestatario()."\n"."Note: ".$this->getNote()."\n"."Active: ".$this->getActive()."\n"."Deleted: ".$this->getDeleted()."\n"."");
- }
-
-
- /**
- * Persistence selectById method (try to select)
- * @return true|false
- */
- function selectById(){
- $query="SELECT ant_AziendaCoordinateBancarie.*,
- ant_Azienda_idAzienda.ragioneSociale AS idAzienda_ragioneSociale,
- ant_BancaAbiCab_idBanca.descrizione AS idBanca_descrizione,
- ant_BancaAbiCab_idBanca.filiale AS idBanca_filiale
- FROM ant_AziendaCoordinateBancarie
- LEFT JOIN ant_Azienda AS ant_Azienda_idAzienda ON ant_Azienda_idAzienda.id = ant_AziendaCoordinateBancarie.idAzienda
- LEFT JOIN ant_BancaAbiCab AS ant_BancaAbiCab_idBanca ON ant_BancaAbiCab_idBanca.id = ant_AziendaCoordinateBancarie.idBanca
- WHERE ant_AziendaCoordinateBancarie.id = ".$this->getId()."";
- $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during selection in table `ant_AziendaCoordinateBancarie`: '.var_dump(oci_error()));
- oci_execute($result, OCI_DEFAULT);
- while($aziendaCoordinateBancarie_array=oci_fetch_array($result)){
- $this->id = $aziendaCoordinateBancarie_array['id'];
- $this->idAzienda = $aziendaCoordinateBancarie_array['idAzienda'];
- $this->idAzienda_ragioneSociale = $aziendaCoordinateBancarie_array['idAzienda_ragioneSociale'];
- $this->idBanca = $aziendaCoordinateBancarie_array['idBanca'];
- $this->idBanca_descrizione = $aziendaCoordinateBancarie_array['idBanca_descrizione'];
- $this->idBanca_filiale = $aziendaCoordinateBancarie_array['idBanca_filiale'];
- $this->iban = $aziendaCoordinateBancarie_array['iban'];
- $this->intestatario = $aziendaCoordinateBancarie_array['intestatario'];
- $this->note = $aziendaCoordinateBancarie_array['note'];
- $this->active = $aziendaCoordinateBancarie_array['active'];
- $this->deleted = $aziendaCoordinateBancarie_array['deleted'];
- }
- }
-
- /**
- * Persistence selectByIdAzienda method (try to select)
- * @return list/array
- */
- function selectByIdAzienda($idAzienda){
- $query="SELECT ant_AziendaCoordinateBancarie.*,
- ant_Azienda_idAzienda.ragioneSociale AS idAzienda_ragioneSociale,
- ant_BancaAbiCab_idBanca.descrizione AS idBanca_descrizione,
- ant_BancaAbiCab_idBanca.filiale AS idBanca_filiale
- FROM ant_AziendaCoordinateBancarie
- LEFT JOIN ant_Azienda AS ant_Azienda_idAzienda ON ant_Azienda_idAzienda.id = ant_AziendaCoordinateBancarie.idAzienda
- LEFT JOIN ant_BancaAbiCab AS ant_BancaAbiCab_idBanca ON ant_BancaAbiCab_idBanca.id = ant_AziendaCoordinateBancarie.idBanca
- WHERE ant_AziendaCoordinateBancarie.idAzienda = ".$idAzienda."
- AND ant_AziendaCoordinateBancarie.active=1
- AND ant_AziendaCoordinateBancarie.deleted=0";
- $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during selection in table `ant_AziendaCoordinateBancarie`: '.var_dump(oci_error()));
- oci_execute($result, OCI_DEFAULT);
- $list=array();
- while($aziendaCoordinateBancarie_array=oci_fetch_array($result)){
- array_push($list,$aziendaCoordinateBancarie_array);
- }
- return $list;
- }
-
- /**
- * Persistence selectFiles method (try to select)
- * @return array
- */
- function selectFiles(){
- $query="SELECT ant_AziendaCoordinateBancarie_File.*
- FROM ant_AziendaCoordinateBancarie_File
- WHERE ant_AziendaCoordinateBancarie_File.idTableObject= ".$this->getId()."
- AND ant_AziendaCoordinateBancarie_File.tableObject='ant_AziendaCoordinateBancarie'";
- $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during selection in table `ant_AziendaCoordinateBancarie_File`: '.var_dump(oci_error()));
- oci_execute($result, OCI_DEFAULT);
- $filesList=array();
- while($aziendaCoordinateBancarie_File_array=oci_fetch_array($result)){
- array_push($filesList, $aziendaCoordinateBancarie_File_array);
- }
- return $filesList;
- }
-
- /**
- * Persistence selectFileById method (try to select)
- * @return array
- */
- function selectFileById($fileId){
- $query="SELECT ant_AziendaCoordinateBancarie_File.*
- FROM ant_AziendaCoordinateBancarie_File
- WHERE ant_AziendaCoordinateBancarie_File.id='$fileId'";
- $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during selection file in table `ant_AziendaCoordinateBancarie_File`: '.var_dump(oci_error()));
- oci_execute($result, OCI_DEFAULT);
- $aziendaCoordinateBancarie_File_array=oci_fetch_array($result);
- return $aziendaCoordinateBancarie_File_array;
- }
-
- /**
- * Persistence selectCountFiles method (try to select)
- * @return array
- */
- function selectCountFiles(){
- $query="SELECT COUNT(*)
- FROM ant_AziendaCoordinateBancarie_File
- WHERE ant_AziendaCoordinateBancarie_File.idTableObject= ".$this->getId()."
- AND ant_AziendaCoordinateBancarie_File.tableObject='ant_AziendaCoordinateBancarie'";
- $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during selection in table `ant_AziendaCoordinateBancarie_File`: '.var_dump(oci_error()));
- oci_execute($result, OCI_DEFAULT);
- $aziendaCoordinateBancarie_File_array=oci_fetch_array($result);
- return $aziendaCoordinateBancarie_File_array[0];
- }
-
- /**
- * Persistence selectCountLogs method (try to select count)
- * @return integer
- */
- function selectCountLogs(){
- $query="SELECT COUNT(*)
- FROM ant_AziendaCoordinateBancarie_Log";
- $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during select count from table `ant_AziendaCoordinateBancarie_Log`: '.var_dump(oci_error()));
- oci_execute($result, OCI_DEFAULT);
- $aziendaCoordinateBancarie_Log_array=oci_fetch_array($result);
- return $aziendaCoordinateBancarie_Log_array[0];
- }
-
- /**
- * Persistence selectCountTrashes method (try to select count)
- * @return integer
- */
- function selectCountTrashes(){
- $query="SELECT COUNT(*)
- FROM ant_AziendaCoordinateBancarie
- WHERE deleted = 1";
- $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during select count from table `ant_AziendaCoordinateBancarie`: '.var_dump(oci_error()));
- oci_execute($result, OCI_DEFAULT);
- $aziendaCoordinateBancarie_array=oci_fetch_array($result);
- return $aziendaCoordinateBancarie_array[0];
- }
-
- /**
- * Persistence selectByFileId method (try to select)
- * @return true|false
- */
- function selectByFileId($idFile){
- $query="SELECT ant_AziendaCoordinateBancarie_File.*
- FROM ant_AziendaCoordinateBancarie_File
- WHERE ant_AziendaCoordinateBancarie_File.id = '$idFile'";
- $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during selection in table `ant_AziendaCoordinateBancarie_File`: '.var_dump(oci_error()));
- oci_execute($result, OCI_DEFAULT);
- return oci_fetch_array($result);
- }
-
- }
- ?>