~drizzle-trunk/drizzle/development

0.123.2 by Bernt M. Johnsen
Generalized Valdiators to make them configurable from a property object (Used in Transformer.pm)
1
# Copyright (c) 2008,2011 Oracle and/or its affiliates. All rights reserved.
0.67.305 by Bernt M. Johnsen
Copyright headres and license added
2
# Use is subject to license terms.
3
#
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; version 2 of the License.
7
#
8
# This program is distributed in the hope that it will be useful, but
9
# WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
# General Public License for more details.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
16
# USA
17
0.67.1 by Philip Stoev
initial import from internal tree
18
package GenTest::Validator;
19
20
@ISA = qw(GenTest);
21
22
use strict;
23
use GenTest::Result;
24
25
use constant VALIDATOR_DBH	=> 0;
26
27
sub new {
28
	my $class = shift;
29
	return $class->SUPER::new({
30
		dbh => VALIDATOR_DBH
31
	}, @_);
32
}
33
34
sub init {
35
	return 1;
36
}
37
0.123.2 by Bernt M. Johnsen
Generalized Valdiators to make them configurable from a property object (Used in Transformer.pm)
38
sub configure {
39
    return 1;
40
}
41
0.67.1 by Philip Stoev
initial import from internal tree
42
sub prerequsites {
43
	return undef;
44
}
45
46
sub dbh {
47
	return $_[0]->[VALIDATOR_DBH];
48
}
49
50
sub setDbh {
51
	$_[0]->[VALIDATOR_DBH] = $_[1];
52
}
53
54
1;