annotate Lib/IMPL/ORM/Adapter/Generic.pm @ 157:c7652cf29a80

Fixed PostToDom with empty fields issue. Fixed the includes search order for TT::Document.
author wizard
date Wed, 20 Oct 2010 18:02:47 +0400
parents 2d1c3f713280
children d1676be8afcc
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
11 C<IMPL::ORM::Adapter::Generic> Адаптер для работы с данными объекта произвольного класса.
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
15 Позволяет получать данные, изменения данных из объекта, а также записать данные в
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
16 объект и создать новый объект.
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
24 Создает новый адаптер к объекту C<$object>
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
28 Объект для которого создан данный адаптер, C<undef> если объект удален.
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
32 Были ли обновления в объекте.
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
36 Является ли объект удаленным.
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
40 Является ли объект новым для БД.
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
44 Начальное состояние объекта, C<undef> если объект был создан.
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
48 Текущие состояние. C<undef> если объект удален.
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
52 История изменений. C<IMPL::Object::List>
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
56 Сохраняет изменения из объекта в текущее состояние, при этом изменения записываются в историю.
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
57
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
58 B<returns> информацию об изменениях в объекте.
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
62 Возвращает объект в определенную версию.
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
66 Удаляет объект, точнее помечает его для удаления до вызова C<Commit>.
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
70 Сбрасывает историю изменений, и устанавливает соответсвующие свойства.
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
74 =head1 Информация об изменениях объекта
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 {
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
79 version => 1, # object version
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
80 op => STORAGE_UPDATE,
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
81 data => {
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
82 entity1 => {
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
83 field1 => 'value 1'
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
84 },
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
85 entity2 => {
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
86 field2 => 'value 2'
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
87 }
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
88 }
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
93 =head1 Информация об отображении объекта
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 {
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
98 prop_name => [ entity => 'field' ]
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
2d1c3f713280 ORM concept in development
wizard
parents:
diff changeset
103 =cut