annotate Lib/IMPL/ORM/Adapter/Generic.pm @ 194:4d0e1962161c

Replaced tabs with spaces IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author cin
date Tue, 10 Apr 2012 20:08:29 +0400
parents d1676be8afcc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
1 package IMPL::ORM::Adapter::Generic;
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
2
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
3 1;
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
4
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
5 __END__
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
6
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
7 =pod
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
8
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
9 =head1 NAME
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
10
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
11 C<IMPL::ORM::Adapter::Generic> Адаптер для работы с данными объекта произвольного класса.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
12
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
13 =head1 DESCRIPTION
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
14
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
15 Позволяет получать данные, изменения данных из объекта, а также записать данные в
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
16 объект и создать новый объект.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
17
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
18 =head1 MEMBERS
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
19
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
20 =over
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
21
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
22 =item C<CTOR($object,$hashOptions)>
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
23
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
24 Создает новый адаптер к объекту C<$object>
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
25
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
26 =item C<[get]object>
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
27
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
28 Объект для которого создан данный адаптер, C<undef> если объект удален.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
29
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
30 =item C<[get]isChanged>
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
31
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
32 Были ли обновления в объекте.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
33
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
34 =item C<[get]isDeleted>
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
35
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
36 Является ли объект удаленным.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
37
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
38 =item C<[get]isNew>
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
39
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
40 Является ли объект новым для БД.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
41
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
42 =item C<[get]initialState>
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
43
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
44 Начальное состояние объекта, C<undef> если объект был создан.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
45
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
46 =item C<[get]currentState>
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
47
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
48 Текущие состояние. C<undef> если объект удален.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
49
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
50 =item C<[get,list]history>
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
51
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
52 История изменений. C<IMPL::Object::List>
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
53
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
54 =item C<SaveChanges>
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
55
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
56 Сохраняет изменения из объекта в текущее состояние, при этом изменения записываются в историю.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
57
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
58 B<returns> информацию об изменениях в объекте.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
59
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
60 =item C<Revert($version)>
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
61
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
62 Возвращает объект в определенную версию.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
63
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
64 =item C<Delete>
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
65
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
66 Удаляет объект, точнее помечает его для удаления до вызова C<Commit>.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
67
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
68 =item C<Commit>
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
69
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
70 Сбрасывает историю изменений, и устанавливает соответсвующие свойства.
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
71
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
72 =back
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
73
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
74 =head1 Информация об изменениях объекта
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
75
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
76 =begin code
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
77
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
78 {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
79 version => 1, # object version
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
80 op => STORAGE_UPDATE,
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
81 data => {
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
82 entity1 => {
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
83 field1 => 'value 1'
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
84 },
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
85 entity2 => {
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
86 field2 => 'value 2'
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
87 }
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
88 }
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
89 }
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
90
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
91 =end code
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
92
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
93 =head1 Информация об отображении объекта
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
94
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
95 =begin code
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
96
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
97 {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
98 prop_name => [ entity => 'field' ]
79
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
99 }
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
100
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
101 =end code
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
102
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 79
diff changeset
103 =cut