Class Classname
In: lib/classname.rb
Parent: ActiveRecord::Base

Methods

model  

Public Class methods

Returns the Class of the model for a certain Java class

[Source]

    # File lib/classname.rb, line 6
 6:   def self.model(codename)
 7:     case codename
 8: 
 9:     # TODO: rake task to caterpillar..
10:     # when "56" #journal_content
11:     # when "58" #login
12:     # when "101" #tagged_content
13:     # when "103" #tags_compiler
14: 
15:     when 'com.liferay.portal.model.Layout'
16:       Web::Layout
17: 
18:     when 'com.liferay.portal.model.Organization'
19:       Organization
20: 
21:     when 'com.liferay.portal.model.Role'
22:       Role
23: 
24:     when 'com.liferay.portal.model.User'
25:       User
26: 
27:     when 'com.liferay.portal.model.UserGroup'
28:       Usergroup
29: 
30:     when 'com.liferay.portlet.announcements.model.AnnouncementsEntry'
31:       Announcement::Entry
32: 
33:     when 'com.liferay.portlet.blogs.model.BlogsEntry'
34:       BlogPost
35: 
36:     when 'com.liferay.portlet.bookmarks.model.BookmarksEntry'
37:       Bookmark::Entry
38: 
39:     when 'com.liferay.portlet.bookmarks.model.BookmarksFolder'
40:       Bookmark::Folder
41: 
42:     when 'com.liferay.portlet.calendar.model.CalEvent'
43:       Calevent
44: 
45:     when 'com.liferay.portlet.documentlibrary.model.DLFileEntry'
46:       DlFile
47: 
48:     when 'com.liferay.portlet.documentlibrary.model.DLFolder'
49:       DlFolder
50: 
51:     when 'com.liferay.portlet.imagegallery.model.IGFolder'
52:       IG::Folder
53: 
54:     when 'com.liferay.portlet.imagegallery.model.IGImage'
55:       IG::Image
56: 
57:     when 'com.liferay.portlet.journal.model.JournalArticle'
58:       Journal::Article
59: 
60:     when 'com.liferay.portlet.journal.model.JournalArticleResource'
61:       Journal::ArticleResource
62: 
63:     when 'com.liferay.portlet.journal.model.JournalFeed'
64:       Journal::Feed
65: 
66:     when 'com.liferay.portlet.journal.model.JournalStructure'
67:       Journal::Structure
68: 
69:     when 'com.liferay.portlet.journal.model.JournalTemplate'
70:       Journal::Template
71: 
72:     when 'com.liferay.portlet.messageboards.model.MBCategory'
73:       MB::Category
74: 
75:     when 'com.liferay.portlet.messageboards.model.MBMessage'
76:       MB::Message
77: 
78:     when 'com.liferay.portlet.polls.model.PollsQuestion'
79:       Poll::Question
80: 
81:     when 'com.liferay.portlet.wiki.model.WikiNode'
82:       Wiki::Node
83: 
84:     when 'com.liferay.portlet.wiki.model.WikiPage'
85:       Wiki::Page
86: 
87:     end
88:   end

[Validate]