PageRenderTime 47ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 1ms

/branches/messigdp/include/Object/AziendaCoordinateBancarie.class.php

http://antilophpe.googlecode.com/
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
  1. <?php
  2. /**
  3. * File AziendaCoordinateBancarie.class.php
  4. *
  5. * This file contains the definition of the class object
  6. * type AziendaCoordinateBancarie and at the end of the file,
  7. * a way to test the class (simply passing sending test = 1
  8. * via GET or POST ).
  9. * @author Marco Novo <mnovo@ncfsistemi.com>
  10. * @version 1.0
  11. */
  12. /**
  13. * This class defines fields and methods of AziendaCoordinateBancarie
  14. */
  15. class AziendaCoordinateBancarie {
  16. /**
  17. * $resourceLinkID
  18. * @access private
  19. * @var resource
  20. */
  21. private $resourceLinkID;
  22. /**
  23. * id
  24. * @access private
  25. * @var integer
  26. */
  27. private $id;
  28. /**
  29. * idAzienda
  30. * @access private
  31. * @var integer
  32. */
  33. private $idAzienda;
  34. /**
  35. * idAzienda_ragioneSociale
  36. * @access private
  37. * @var string
  38. */
  39. private $idAzienda_ragioneSociale;
  40. /**
  41. * idBanca
  42. * @access private
  43. * @var integer
  44. */
  45. private $idBanca;
  46. /**
  47. * idBanca_descrizione
  48. * @access private
  49. * @var string
  50. */
  51. private $idBanca_descrizione;
  52. /**
  53. * idBanca_filiale
  54. * @access private
  55. * @var string
  56. */
  57. private $idBanca_filiale;
  58. /**
  59. * iban
  60. * @access private
  61. * @var string
  62. */
  63. private $iban;
  64. /**
  65. * intestatario
  66. * @access private
  67. * @var string
  68. */
  69. private $intestatario;
  70. /**
  71. * note
  72. * @access private
  73. * @var string
  74. */
  75. private $note;
  76. /**
  77. * active
  78. * @access private
  79. * @var integer
  80. */
  81. private $active;
  82. /**
  83. * deleted
  84. * @access private
  85. * @var integer
  86. */
  87. private $deleted;
  88. /**
  89. * Set the value of resourceLinkID
  90. * @param resource $resourceLinkID
  91. */
  92. function setResourceLinkID($resourceLinkID){
  93. $this->resourceLinkID=$resourceLinkID;
  94. }
  95. /**
  96. * Get the value of resourceLinkID
  97. * @return resource
  98. */
  99. function getResourceLinkID(){
  100. return $this->resourceLinkID;
  101. }
  102. /**
  103. * Sets the value of field id
  104. * @param integer $id
  105. */
  106. function setId($id){
  107. $this->id=$id;
  108. }
  109. /**
  110. * Gets the value of field id
  111. * @return integer
  112. */
  113. function getId(){
  114. return $this->id;
  115. }
  116. /**
  117. * Sets the value of field idAzienda
  118. * @param integer $idAzienda
  119. */
  120. function setIdAzienda($idAzienda){
  121. $this->idAzienda=$idAzienda;
  122. }
  123. /**
  124. * Gets the value of field idAzienda
  125. * @return integer
  126. */
  127. function getIdAzienda(){
  128. return $this->idAzienda;
  129. }
  130. /**
  131. * Sets the value of foreign field idAzienda_ragioneSociale
  132. * @param string $idAzienda_ragioneSociale
  133. */
  134. function setIdAzienda_ragioneSociale($idAzienda_ragioneSociale){
  135. $this->idAzienda_ragioneSociale=$idAzienda_ragioneSociale;
  136. }
  137. /**
  138. * Gets the value of foreign field idAzienda_ragioneSociale
  139. * @return string
  140. */
  141. function getIdAzienda_ragioneSociale(){
  142. return $this->idAzienda_ragioneSociale;
  143. }
  144. /**
  145. * Sets the value of field idBanca
  146. * @param integer $idBanca
  147. */
  148. function setIdBanca($idBanca){
  149. $this->idBanca=$idBanca;
  150. }
  151. /**
  152. * Gets the value of field idBanca
  153. * @return integer
  154. */
  155. function getIdBanca(){
  156. return $this->idBanca;
  157. }
  158. /**
  159. * Sets the value of foreign field idBanca_descrizione
  160. * @param string $idBanca_descrizione
  161. */
  162. function setIdBanca_descrizione($idBanca_descrizione){
  163. $this->idBanca_descrizione=$idBanca_descrizione;
  164. }
  165. /**
  166. * Gets the value of foreign field idBanca_descrizione
  167. * @return string
  168. */
  169. function getIdBanca_descrizione(){
  170. return $this->idBanca_descrizione;
  171. }
  172. /**
  173. * Sets the value of foreign field idBanca_filiale
  174. * @param string $idBanca_filiale
  175. */
  176. function setIdBanca_filiale($idBanca_filiale){
  177. $this->idBanca_filiale=$idBanca_filiale;
  178. }
  179. /**
  180. * Gets the value of foreign field idBanca_filiale
  181. * @return string
  182. */
  183. function getIdBanca_filiale(){
  184. return $this->idBanca_filiale;
  185. }
  186. /**
  187. * Sets the value of field iban
  188. * @param string $iban
  189. */
  190. function setIban($iban){
  191. $this->iban=$iban;
  192. }
  193. /**
  194. * Gets the value of field iban
  195. * @return string
  196. */
  197. function getIban(){
  198. return $this->iban;
  199. }
  200. /**
  201. * Sets the value of field intestatario
  202. * @param string $intestatario
  203. */
  204. function setIntestatario($intestatario){
  205. $this->intestatario=$intestatario;
  206. }
  207. /**
  208. * Gets the value of field intestatario
  209. * @return string
  210. */
  211. function getIntestatario(){
  212. return $this->intestatario;
  213. }
  214. /**
  215. * Sets the value of field note
  216. * @param string $note
  217. */
  218. function setNote($note){
  219. $this->note=$note;
  220. }
  221. /**
  222. * Gets the value of field note
  223. * @return string
  224. */
  225. function getNote(){
  226. return $this->note;
  227. }
  228. /**
  229. * Sets the value of field active
  230. * @param integer $active
  231. */
  232. function setActive($active){
  233. $this->active=$active;
  234. }
  235. /**
  236. * Gets the value of field active
  237. * @return integer
  238. */
  239. function getActive(){
  240. return $this->active;
  241. }
  242. /**
  243. * Sets the value of field deleted
  244. * @param integer $deleted
  245. */
  246. function setDeleted($deleted){
  247. $this->deleted=$deleted;
  248. }
  249. /**
  250. * Gets the value of field deleted
  251. * @return integer
  252. */
  253. function getDeleted(){
  254. return $this->deleted;
  255. }
  256. /**
  257. * Constructor of the class
  258. */
  259. function __construct($resourceLinkID='',
  260. $id='',
  261. $idAzienda='',
  262. $idAzienda_ragioneSociale='',
  263. $idBanca='',
  264. $idBanca_descrizione='',
  265. $idBanca_filiale='',
  266. $iban='',
  267. $intestatario='',
  268. $note='',
  269. $active='',
  270. $deleted='') {
  271. $this->resourceLinkID = $resourceLinkID;
  272. $this->id = $id;
  273. $this->idAzienda = $idAzienda;
  274. $this->idAzienda_ragioneSociale = $idAzienda_ragioneSociale;
  275. $this->idBanca = $idBanca;
  276. $this->idBanca_descrizione = $idBanca_descrizione;
  277. $this->idBanca_filiale = $idBanca_filiale;
  278. $this->iban = $iban;
  279. $this->intestatario = $intestatario;
  280. $this->note = $note;
  281. $this->active = $active;
  282. $this->deleted = $deleted;
  283. }
  284. /**
  285. * Destructor of the class
  286. */
  287. function __destruct() {
  288. }
  289. /**
  290. * Get the value of descriptive field
  291. * @return string
  292. */
  293. function getDescriptiveFields(){
  294. return trim($this->getIban().' '.' (id: '.$this->getId().')');
  295. }
  296. /**
  297. * Get the name and the value of mail fields
  298. * @return string
  299. */
  300. function getMailFields(){
  301. 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"."");
  302. }
  303. /**
  304. * Persistence selectById method (try to select)
  305. * @return true|false
  306. */
  307. function selectById(){
  308. $query="SELECT ant_AziendaCoordinateBancarie.*,
  309. ant_Azienda_idAzienda.ragioneSociale AS idAzienda_ragioneSociale,
  310. ant_BancaAbiCab_idBanca.descrizione AS idBanca_descrizione,
  311. ant_BancaAbiCab_idBanca.filiale AS idBanca_filiale
  312. FROM ant_AziendaCoordinateBancarie
  313. LEFT JOIN ant_Azienda AS ant_Azienda_idAzienda ON ant_Azienda_idAzienda.id = ant_AziendaCoordinateBancarie.idAzienda
  314. LEFT JOIN ant_BancaAbiCab AS ant_BancaAbiCab_idBanca ON ant_BancaAbiCab_idBanca.id = ant_AziendaCoordinateBancarie.idBanca
  315. WHERE ant_AziendaCoordinateBancarie.id = ".$this->getId()."";
  316. $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during selection in table `ant_AziendaCoordinateBancarie`: '.var_dump(oci_error()));
  317. oci_execute($result, OCI_DEFAULT);
  318. while($aziendaCoordinateBancarie_array=oci_fetch_array($result)){
  319. $this->id = $aziendaCoordinateBancarie_array['id'];
  320. $this->idAzienda = $aziendaCoordinateBancarie_array['idAzienda'];
  321. $this->idAzienda_ragioneSociale = $aziendaCoordinateBancarie_array['idAzienda_ragioneSociale'];
  322. $this->idBanca = $aziendaCoordinateBancarie_array['idBanca'];
  323. $this->idBanca_descrizione = $aziendaCoordinateBancarie_array['idBanca_descrizione'];
  324. $this->idBanca_filiale = $aziendaCoordinateBancarie_array['idBanca_filiale'];
  325. $this->iban = $aziendaCoordinateBancarie_array['iban'];
  326. $this->intestatario = $aziendaCoordinateBancarie_array['intestatario'];
  327. $this->note = $aziendaCoordinateBancarie_array['note'];
  328. $this->active = $aziendaCoordinateBancarie_array['active'];
  329. $this->deleted = $aziendaCoordinateBancarie_array['deleted'];
  330. }
  331. }
  332. /**
  333. * Persistence selectByIdAzienda method (try to select)
  334. * @return list/array
  335. */
  336. function selectByIdAzienda($idAzienda){
  337. $query="SELECT ant_AziendaCoordinateBancarie.*,
  338. ant_Azienda_idAzienda.ragioneSociale AS idAzienda_ragioneSociale,
  339. ant_BancaAbiCab_idBanca.descrizione AS idBanca_descrizione,
  340. ant_BancaAbiCab_idBanca.filiale AS idBanca_filiale
  341. FROM ant_AziendaCoordinateBancarie
  342. LEFT JOIN ant_Azienda AS ant_Azienda_idAzienda ON ant_Azienda_idAzienda.id = ant_AziendaCoordinateBancarie.idAzienda
  343. LEFT JOIN ant_BancaAbiCab AS ant_BancaAbiCab_idBanca ON ant_BancaAbiCab_idBanca.id = ant_AziendaCoordinateBancarie.idBanca
  344. WHERE ant_AziendaCoordinateBancarie.idAzienda = ".$idAzienda."
  345. AND ant_AziendaCoordinateBancarie.active=1
  346. AND ant_AziendaCoordinateBancarie.deleted=0";
  347. $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during selection in table `ant_AziendaCoordinateBancarie`: '.var_dump(oci_error()));
  348. oci_execute($result, OCI_DEFAULT);
  349. $list=array();
  350. while($aziendaCoordinateBancarie_array=oci_fetch_array($result)){
  351. array_push($list,$aziendaCoordinateBancarie_array);
  352. }
  353. return $list;
  354. }
  355. /**
  356. * Persistence selectFiles method (try to select)
  357. * @return array
  358. */
  359. function selectFiles(){
  360. $query="SELECT ant_AziendaCoordinateBancarie_File.*
  361. FROM ant_AziendaCoordinateBancarie_File
  362. WHERE ant_AziendaCoordinateBancarie_File.idTableObject= ".$this->getId()."
  363. AND ant_AziendaCoordinateBancarie_File.tableObject='ant_AziendaCoordinateBancarie'";
  364. $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during selection in table `ant_AziendaCoordinateBancarie_File`: '.var_dump(oci_error()));
  365. oci_execute($result, OCI_DEFAULT);
  366. $filesList=array();
  367. while($aziendaCoordinateBancarie_File_array=oci_fetch_array($result)){
  368. array_push($filesList, $aziendaCoordinateBancarie_File_array);
  369. }
  370. return $filesList;
  371. }
  372. /**
  373. * Persistence selectFileById method (try to select)
  374. * @return array
  375. */
  376. function selectFileById($fileId){
  377. $query="SELECT ant_AziendaCoordinateBancarie_File.*
  378. FROM ant_AziendaCoordinateBancarie_File
  379. WHERE ant_AziendaCoordinateBancarie_File.id='$fileId'";
  380. $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during selection file in table `ant_AziendaCoordinateBancarie_File`: '.var_dump(oci_error()));
  381. oci_execute($result, OCI_DEFAULT);
  382. $aziendaCoordinateBancarie_File_array=oci_fetch_array($result);
  383. return $aziendaCoordinateBancarie_File_array;
  384. }
  385. /**
  386. * Persistence selectCountFiles method (try to select)
  387. * @return array
  388. */
  389. function selectCountFiles(){
  390. $query="SELECT COUNT(*)
  391. FROM ant_AziendaCoordinateBancarie_File
  392. WHERE ant_AziendaCoordinateBancarie_File.idTableObject= ".$this->getId()."
  393. AND ant_AziendaCoordinateBancarie_File.tableObject='ant_AziendaCoordinateBancarie'";
  394. $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during selection in table `ant_AziendaCoordinateBancarie_File`: '.var_dump(oci_error()));
  395. oci_execute($result, OCI_DEFAULT);
  396. $aziendaCoordinateBancarie_File_array=oci_fetch_array($result);
  397. return $aziendaCoordinateBancarie_File_array[0];
  398. }
  399. /**
  400. * Persistence selectCountLogs method (try to select count)
  401. * @return integer
  402. */
  403. function selectCountLogs(){
  404. $query="SELECT COUNT(*)
  405. FROM ant_AziendaCoordinateBancarie_Log";
  406. $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during select count from table `ant_AziendaCoordinateBancarie_Log`: '.var_dump(oci_error()));
  407. oci_execute($result, OCI_DEFAULT);
  408. $aziendaCoordinateBancarie_Log_array=oci_fetch_array($result);
  409. return $aziendaCoordinateBancarie_Log_array[0];
  410. }
  411. /**
  412. * Persistence selectCountTrashes method (try to select count)
  413. * @return integer
  414. */
  415. function selectCountTrashes(){
  416. $query="SELECT COUNT(*)
  417. FROM ant_AziendaCoordinateBancarie
  418. WHERE deleted = 1";
  419. $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during select count from table `ant_AziendaCoordinateBancarie`: '.var_dump(oci_error()));
  420. oci_execute($result, OCI_DEFAULT);
  421. $aziendaCoordinateBancarie_array=oci_fetch_array($result);
  422. return $aziendaCoordinateBancarie_array[0];
  423. }
  424. /**
  425. * Persistence selectByFileId method (try to select)
  426. * @return true|false
  427. */
  428. function selectByFileId($idFile){
  429. $query="SELECT ant_AziendaCoordinateBancarie_File.*
  430. FROM ant_AziendaCoordinateBancarie_File
  431. WHERE ant_AziendaCoordinateBancarie_File.id = '$idFile'";
  432. $result = oci_parse($this->getResourceLinkId(), $query) or die('Query: '.$query.' Error during selection in table `ant_AziendaCoordinateBancarie_File`: '.var_dump(oci_error()));
  433. oci_execute($result, OCI_DEFAULT);
  434. return oci_fetch_array($result);
  435. }
  436. }
  437. ?>