-
Notifications
You must be signed in to change notification settings - Fork 2
/
class-definitions.rb
410 lines (352 loc) · 13 KB
/
class-definitions.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
# encoding: utf-8
# --
# The classes have cross-references, so each has to be defined before the actual models are loaded.
# Since adding support for different database schemas, the primary keys also need to be defined here.
# The models that have the definitions have more or less complete support for MySQL.
# PostgreSQL should *always* work.
# ++
# com.liferay.portal.model.Account
class Account < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Account'; end
set_table_name :Account_
set_primary_key :accountId
end
# com.liferay.portal.model.Address
class Address < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Address'; end
set_table_name :Address
set_primary_key :addressId
end
module Announcement
# com.liferay.portlet.announcements.model.AnnouncementsDelivery
class Delivery < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.announcements.model.AnnouncementsDelivery'; end
set_table_name :AnnouncementsDelivery
set_primary_key :deliveryId
end
# com.liferay.portlet.announcements.model.AnnouncementsEntry
class Entry < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.announcements.model.AnnouncementsEntry'; end
set_table_name :AnnouncementsEntry
set_primary_key :entryId
end
end
# com.liferay.portlet.blogs.model.BlogsEntry
class BlogPost < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.blogs.model.BlogsEntry'; end
set_table_name :BlogsEntry
set_primary_key :entryId
end
# com.liferay.portlet.calendar.model.CalEvent
class Calevent < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.calendar.model.CalEvent'; end
set_table_name :CalEvent
set_primary_key :eventId
end
class Classname < ActiveRecord::Base
set_table_name :ClassName_
set_primary_key :classNameId
end
# com.liferay.portal.model.Company
class Company < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Company'; end
set_table_name :Company
set_primary_key :companyId
end
# com.liferay.portal.model.Contact
class Contact < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Contact'; end
set_table_name :Contact_
set_primary_key :contactId
end
# Counter for Hibernate
class Counter < ActiveRecord::Base
set_table_name :Counter
set_primary_key :name
end
# com.liferay.portlet.documentlibrary.model.DLFileEntry
class DlFile < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.documentlibrary.model.DLFileEntry'; end
set_table_name :DLFileEntry
set_primary_key :fileEntryId
end
# com.liferay.portlet.documentlibrary.model.DLFolder
class DlFolder < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.documentlibrary.model.DLFolder'; end
set_table_name :DLFolder
set_primary_key :folderId
end
# com.liferay.portal.model.EmailAddress
class Emailaddress < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.EmailAddress'; end
set_table_name :EmailAddress
set_primary_key :emailAddressId
end
# com.liferay.portal.model.Group
class Group < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Group'; end
set_table_name :Group_
set_primary_key :groupId
end
# com.liferay.portal.model.Image
class Image < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Image'; end
set_table_name :Image
set_primary_key :imageId
end
class ListType < ActiveRecord::Base
set_table_name :ListType
set_primary_key :listTypeId
end
# com.liferay.portal.model.Organization
class Organization < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Organization'; end
set_table_name :Organization_
set_primary_key :organizationId
end
# com.liferay.portal.model.Permission
class Permission < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Permission'; end
set_table_name :Permission_
set_primary_key :permissionId
end
# com.liferay.portal.model.Phone
class Phone < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Phone'; end
set_table_name :Phone
set_primary_key :phoneId
end
module Poll
# com.liferay.portlet.polls.model.PollsQuestion
class Question < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.polls.model.PollsQuestion'; end
set_table_name :PollsQuestion
set_primary_key :questionId
end
end
# com.liferay.portlet.ratings.model.RatingsStats
class RatingsStats < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.ratings.model.RatingsStats'; end
set_table_name :RatingsStats
set_primary_key :statsId
end
# Version of the database schema.
class Release < ActiveRecord::Base
set_table_name :Release_
set_primary_key :releaseId
end
# com.liferay.portal.model.ResourceCode
class ResourceCode < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.ResourceCode'; end
set_table_name :ResourceCode
set_primary_key :codeId
end
# com.liferay.portal.model.Resource
class Resource < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Resource'; end
set_table_name :Resource_
set_primary_key :resourceId
end
# com.liferay.portal.model.Role
class Role < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Role'; end
set_table_name :Role_
set_primary_key :roleId
end
# com.liferay.portlet.social.model.SocialActivity
class SocialActivity < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.social.model.SocialActivity'; end
set_table_name :SocialActivity
set_primary_key :activityId
end
# com.liferay.portlet.social.model.SocialRelation
class SocialRelation < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.social.model.SocialRelation'; end
set_table_name :SocialRelation
set_primary_key :relationId
end
# com.liferay.portal.model.UserGroup
class Usergroup < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.UserGroup'; end
set_table_name :UserGroup
set_primary_key :userGroupId
end
# com.liferay.portal.model.User
class User < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.User'; end
set_table_name :User_
set_primary_key :userId
end
# Image Gallery
module IG
# com.liferay.portlet.imagegallery.model.IGImage
class Image < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.imagegallery.model.IGImage'; end
set_table_name :IGImage
set_primary_key :imageId
end
# com.liferay.portlet.imagegallery.model.IGFolder
class Folder < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.imagegallery.model.IGFolder'; end
set_table_name :IGFolder
set_primary_key :folderId
end
end
module Bookmark
# com.liferay.portlet.bookmarks.model.BookmarksEntry
class Entry < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.bookmarks.model.BookmarksEntry'; end
set_table_name :BookmarksEntry
set_primary_key :entryId
end
# com.liferay.portlet.bookmarks.model.BookmarksFolder
class Folder < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.bookmarks.model.BookmarksFolder'; end
set_table_name :BookmarksFolder
set_primary_key :folderId
end
end
module Journal
# com.liferay.portlet.journal.model.JournalArticle
class Article < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.journal.model.JournalArticle'; end
set_table_name :JournalArticle
set_primary_key :id_
end
# com.liferay.portlet.journal.model.JournalArticleResource
class ArticleResource < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.journal.model.JournalArticleResource'; end
set_table_name :JournalArticleResource
set_primary_key :resourcePrimKey
end
# com.liferay.portlet.journal.model.JournalFeed
class Feed < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.journal.model.JournalFeed'; end
set_table_name :JournalFeed
set_primary_key :id_
end
# com.liferay.portlet.journal.model.JournalStructure
class Structure < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.journal.model.JournalStructure'; end
set_table_name :JournalStructure
set_primary_key :id_
end
# com.liferay.portlet.journal.model.JournalTemplate
class Template < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.journal.model.JournalTemplate'; end
set_table_name :JournalTemplate
set_primary_key :id_
end
end
# Message Boards
module MB
# com.liferay.portlet.messageboards.model.MBThread
class Thread < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.messageboards.model.MBThread'; end
set_table_name :MBThread
set_primary_key :threadId
end
# com.liferay.portlet.messageboards.model.MBMessage
class Message < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.messageboards.model.MBMessage'; end
set_table_name :MBMessage
set_primary_key :messageId
end
# com.liferay.portlet.messageboards.model.MBMessageFlag
class MessageFlag < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.messageboards.model.MBMessageFlag'; end
set_table_name :MBMessageFlag
set_primary_key :messageFlagId
end
# com.liferay.portlet.messageboards.model.MBCategory
class Category < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.messageboards.model.MBCategory'; end
set_table_name :MBCategory
set_primary_key :categoryId
end
# com.liferay.portlet.messageboards.model.MBDiscussion
class Discussion < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.messageboards.model.MBDiscussion'; end
set_table_name :MBDiscussion
set_primary_key :discussionId
end
# com.liferay.portlet.messageboards.model.MBStatsUser
class StatsUser < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.messageboards.model.MBStatsUser'; end
set_table_name :MBStatsUser
set_primary_key :statsUserId
end
end
module Tag
# com.liferay.portlet.tags.model.TagsAsset
class Asset < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.tags.model.TagsAsset'; end
set_table_name :TagsAsset
set_primary_key :assetId
end
# com.liferay.portlet.tags.model.TagsEntry
class Entry < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.tags.model.TagsEntry'; end
set_table_name :TagsEntry
set_primary_key :entryId
end
# com.liferay.portlet.tags.model.TagsProperty
class Property < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.tags.model.TagsProperty'; end
set_table_name :TagsProperty
set_primary_key :propertyId
end
end
module Web
# com.liferay.portal.model.LayoutSet
class LayoutSet < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.LayoutSet'; end
set_table_name :LayoutSet
set_primary_key :layoutSetId
end
# com.liferay.portal.model.Layout
class Layout < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Layout'; end
set_table_name :Layout
set_primary_key :plid
end
# com.liferay.portal.model.Portlet
class Portlet < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.Portlet'; end
set_table_name :Portlet
set_primary_key :id_
end
# com.liferay.portal.model.PortletPreferences
class PortletPreferences < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portal.model.PortletPreferences'; end
set_table_name :PortletPreferences
set_primary_key :portletPreferencesId
end
# This table is not in the original lportal database.
# This is created by a ActiveRecord migration and contains metadata about portlets.
class PortletProperties < ActiveRecord::Base
def self.liferay_class; nil; end
set_table_name :portletproperties # ! downcase
set_primary_key :id
end
end
module Wiki
# com.liferay.portlet.wiki.model.WikiNode
class Node < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.wiki.model.WikiNode'; end
set_table_name :WikiNode
set_primary_key :nodeId
end
# com.liferay.portlet.wiki.model.WikiPage
class Page < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.wiki.model.WikiPage'; end
set_table_name :WikiPage
set_primary_key :pageId
end
# com.liferay.portlet.wiki.model.WikiPageResource
class PageResource < ActiveRecord::Base
def self.liferay_class; 'com.liferay.portlet.wiki.model.WikiPageResource'; end
set_table_name :WikiPageResource
set_primary_key :resourcePrimKey
end
end