noalyss Version-9
anc_key_sql.class.php
Go to the documentation of this file.
1<?php
2
3/*
4 * Copyright (C) 2014 Dany De Bontridder <danydb@aevalys.eu>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file
23 * @brief Class to manage distribution keys for SQL.
24 *
25 */
26
27
28/**
29 * @brief Manage the table key_distribution.
30 */
32{
33
34 function __construct($p_cn, $p_id = -1)
35 {
36 $this->table = "public.key_distribution";
37 $this->primary_key = "kd_id";
38
39 $this->name = array(
40 "id" => "kd_id",
41 "name"=>"kd_name",
42 "description"=>"kd_description"
43 );
44
45 $this->type = array(
46 "kd_id" => "numeric",
47 "kd_name" => "text",
48 "kd_description" => "text"
49 );
50
51 $this->default = array(
52 "kd_id" => "auto"
53 );
54 // PHPUNIT seems to have a problem with this line
55 //global $cn;
56
57 parent::__construct($p_cn, $p_id);
58 }
59
60}
61/**
62 * @brief manage table key_distribution_ledger
63 */
65{
66 function __construct(&$p_cn, $p_id = -1)
67 {
68 $this->table = "public.key_distribution_ledger";
69 $this->primary_key = "kl_id";
70
71 $this->name = array(
72 "id" => "kl_id",
73 "key"=>"kd_id",
74 "ledger"=>"jrn_def_id"
75 );
76
77 $this->type = array(
78 "kl_id" => "numeric",
79 "kd_id" => "numeric",
80 "jrn_def_id" => "numeric"
81 );
82
83 $this->default = array(
84 "kl_id" => "auto"
85 );
86 // PHPUNIT seems to have a problem with this line
87 //global $cn;
88
89 parent::__construct($p_cn, $p_id);
90 }
91}
92/**
93 * @brief manage table key_distribution_detail
94 */
96{
97 function __construct(&$p_cn, $p_id = -1)
98 {
99
100 $this->table = "public.key_distribution_detail";
101 $this->primary_key = "ke_id";
102
103 $this->name = array(
104 "id" => "ke_id",
105 "key"=>"kd_id",
106 "row"=>"ke_row",
107 "percent"=>"ke_percent"
108 );
109
110 $this->type = array(
111 "ke_id" => "numeric",
112 "kd_id" => "numeric",
113 "ke_row" => "numeric",
114 "ke_percent" => "numeric"
115 );
116
117 $this->default = array(
118 "ke_id" => "auto"
119 );
120 // PHPUNIT seems to have a problem with this line
121 //global $cn;
122
123
124 parent::__construct($p_cn, $p_id);
125 }
126}
127/**
128 * @brief manage table key_distribution_activity
129 */
131{
132 function __construct($p_cn, $p_id = -1)
133 {
134 $this->table = "public.key_distribution_activity";
135 $this->primary_key = "ka_id";
136
137 $this->name = array(
138 "id" => "ka_id",
139 "detail"=>"ke_id",
140 "activity"=>"po_id",
141 "plan"=>"pa_id"
142 );
143
144 $this->type = array(
145 "ka_id" => "numeric",
146 "ke_id" => "numeric",
147 "po_id" => "numeric",
148 "pa_id" => "numeric"
149
150 );
151
152 $this->default = array(
153 "ka_id" => "auto"
154 );
155
156 parent::__construct($p_cn, $p_id);
157 }
158}
$from_poste name
$input_from type
Definition: balance.inc.php:65
manage table key_distribution_activity
__construct($p_cn, $p_id=-1)
manage table key_distribution_detail
__construct(&$p_cn, $p_id=-1)
manage table key_distribution_ledger
__construct(&$p_cn, $p_id=-1)
Manage the table key_distribution.
__construct($p_cn, $p_id=-1)
Interface : this wrapper is used to created easily a wrapper to a table (ORM) You must create a class...
$all table