Liferay 6.1.2-ce-ga3

com.liferay.portal.tools.samplesqlbuilder
Class DataFactory

java.lang.Object
  extended by com.liferay.portal.tools.samplesqlbuilder.DataFactory

public class DataFactory
extends Object


Constructor Summary
DataFactory(String baseDir, int maxGroupsCount, int maxJournalArticleSize, int maxUserToGroupCount, SimpleCounter counter, SimpleCounter dlDateCounter, SimpleCounter permissionCounter, SimpleCounter resourceCounter, SimpleCounter resourceCodeCounter, SimpleCounter resourcePermissionCounter, SimpleCounter socialActivityCounter)
           
 
Method Summary
 AssetEntry addAssetEntry(long groupId, long userId, long classNameId, long classPK, boolean visible, String mimeType, String title)
           
 BlogsEntry addBlogsEntry(long groupId, long userId, String title, String urlTitle, String content)
           
 BlogsStatsUser addBlogsStatsUser(long groupId, long userId)
           
 Contact addContact(String firstName, String lastName)
           
 DDLRecord addDDLRecord(long groupId, long companyId, long userId, long ddlRecordSetId)
           
 DDLRecordSet addDDLRecordSet(long groupId, long companyId, long userId, long ddmStructureId)
           
 DDLRecordVersion addDDLRecordVersion(DDLRecord ddlRecord)
           
 DDMContent addDDMContent(long groupId, long companyId, long userId)
           
 DDMStorageLink addDDMStorageLink(long classNameId, long classPK, long structureId)
           
 DDMStructure addDDMStructure(long groupId, long companyId, long userId, long classNameId)
           
 DDMStructureLink addDDMStructureLink(long classPK, long structureId)
           
 DLFileEntry addDlFileEntry(long groupId, long companyId, long userId, long folderId, String extension, String mimeType, String name, String title, String description)
           
 DLFileEntryMetadata addDLFileEntryMetadata(long ddmStorageId, long ddmStructureId, long fileEntryId, long fileVersionId)
           
 DLFileRank addDLFileRank(long groupId, long companyId, long userId, long fileEntryId)
           
 DLFileVersion addDLFileVersion(DLFileEntry dlFileEntry)
           
 DLFolder addDLFolder(long groupId, long companyId, long userId, long parentFolderId, String name, String description)
           
 DLSync addDLSync(long companyId, long fileId, long repositoryId, long parentFolderId, boolean typeFolder)
           
 Group addGroup(long groupId, long classNameId, long classPK, String name, String friendlyURL, boolean site)
           
 JournalArticle addJournalArticle(long resourcePrimKey, long groupId, long companyId, String articleId)
           
 JournalArticleResource addJournalArticleResource(long groupId)
           
 Layout addLayout(int layoutId, String name, String friendlyURL, String column1, String column2)
           
 MBCategory addMBCategory(long categoryId, long groupId, long companyId, long userId, String name, String description, int threadCount, int messageCount)
           
 MBDiscussion addMBDiscussion(long classNameId, long classPK, long threadId)
           
 MBMessage addMBMessage(long messageId, long groupId, long userId, long classNameId, long classPK, long categoryId, long threadId, long rootMessageId, long parentMessageId, String subject, String body)
           
 MBStatsUser addMBStatsUser(long groupId, long userId)
           
 MBThread addMBThread(long threadId, long groupId, long companyId, long categoryId, long rootMessageId, int messageCount, long lastPostByUserId)
           
 List<Permission> addPermissions(Resource resource)
           
 PortletPreferences addPortletPreferences(long ownerId, long plid, String portletId, String preferences)
           
 Resource addResource(String name, String primKey)
           
 List<ResourcePermission> addResourcePermission(long companyId, String name, String primKey)
           
 List<KeyValuePair> addRolesPermissions(Resource resource, List<Permission> permissions, Role memberRole)
           
 SocialActivity addSocialActivity(long groupId, long companyId, long userId, long classNameId, long classPK)
           
 User addUser(boolean defaultUser, String screenName)
           
 List<Long> addUserToGroupIds(long groupId)
           
 WikiNode addWikiNode(long groupId, long userId, String name, String description)
           
 WikiPage addWikiPage(long groupId, long userId, long nodeId, String title, double version, String content, boolean head)
           
 Role getAdministratorRole()
           
 ClassName getBlogsEntryClassName()
           
 List<ClassName> getClassNames()
           
 Company getCompany()
           
 List<CounterModelImpl> getCounters()
           
 String getDateLong(Date date)
           
 String getDateString(Date date)
           
 ClassName getDDLRecordSetClassName()
           
 ClassName getDDMContentClassName()
           
 User getDefaultUser()
           
 ClassName getDLFileEntryClassName()
           
 ClassName getGroupClassName()
           
 Group getGuestGroup()
           
 Role getGuestRole()
           
 ClassName getJournalArticleClassName()
           
 ClassName getMBMessageClassName()
           
 Role getOrganizationAdministratorRole()
           
 Role getOrganizationOwnerRole()
           
 Role getOrganizationUserRole()
           
 Role getPowerUserRole()
           
 List<ResourceCode> getResourceCodes()
           
 ClassName getRoleClassName()
           
 List<Role> getRoles()
           
 Role getSiteAdministratorRole()
           
 Role getSiteMemberRole()
           
 Role getSiteOwnerRole()
           
 ClassName getUserClassName()
           
 Object[] getUserNames()
           
 Role getUserRole()
           
 ClassName getWikiPageClassName()
           
 void initClassNames()
           
 void initCompany()
           
 void initCounters()
           
 void initDefaultUser()
           
 void initGuestGroup()
           
 void initJournalArticle(int maxJournalArticleSize)
           
 void initResourceCodes()
           
 void initResourceCodes(String name)
           
 void initRoles()
           
 void initUserNames()
           
protected  Date newCreateDate()
           
 IntegerWrapper newInteger()
           
protected  ResourceCode newResourceCode()
           
protected  Role newRole()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataFactory

public DataFactory(String baseDir,
                   int maxGroupsCount,
                   int maxJournalArticleSize,
                   int maxUserToGroupCount,
                   SimpleCounter counter,
                   SimpleCounter dlDateCounter,
                   SimpleCounter permissionCounter,
                   SimpleCounter resourceCounter,
                   SimpleCounter resourceCodeCounter,
                   SimpleCounter resourcePermissionCounter,
                   SimpleCounter socialActivityCounter)
Method Detail

addAssetEntry

public AssetEntry addAssetEntry(long groupId,
                                long userId,
                                long classNameId,
                                long classPK,
                                boolean visible,
                                String mimeType,
                                String title)

addBlogsEntry

public BlogsEntry addBlogsEntry(long groupId,
                                long userId,
                                String title,
                                String urlTitle,
                                String content)

addBlogsStatsUser

public BlogsStatsUser addBlogsStatsUser(long groupId,
                                        long userId)

addContact

public Contact addContact(String firstName,
                          String lastName)

addDDLRecord

public DDLRecord addDDLRecord(long groupId,
                              long companyId,
                              long userId,
                              long ddlRecordSetId)

addDDLRecordSet

public DDLRecordSet addDDLRecordSet(long groupId,
                                    long companyId,
                                    long userId,
                                    long ddmStructureId)

addDDLRecordVersion

public DDLRecordVersion addDDLRecordVersion(DDLRecord ddlRecord)

addDDMContent

public DDMContent addDDMContent(long groupId,
                                long companyId,
                                long userId)

addDDMStorageLink

public DDMStorageLink addDDMStorageLink(long classNameId,
                                        long classPK,
                                        long structureId)

addDDMStructure

public DDMStructure addDDMStructure(long groupId,
                                    long companyId,
                                    long userId,
                                    long classNameId)

addDDMStructureLink

public DDMStructureLink addDDMStructureLink(long classPK,
                                            long structureId)

addDlFileEntry

public DLFileEntry addDlFileEntry(long groupId,
                                  long companyId,
                                  long userId,
                                  long folderId,
                                  String extension,
                                  String mimeType,
                                  String name,
                                  String title,
                                  String description)

addDLFileEntryMetadata

public DLFileEntryMetadata addDLFileEntryMetadata(long ddmStorageId,
                                                  long ddmStructureId,
                                                  long fileEntryId,
                                                  long fileVersionId)

addDLFileRank

public DLFileRank addDLFileRank(long groupId,
                                long companyId,
                                long userId,
                                long fileEntryId)

addDLFileVersion

public DLFileVersion addDLFileVersion(DLFileEntry dlFileEntry)

addDLFolder

public DLFolder addDLFolder(long groupId,
                            long companyId,
                            long userId,
                            long parentFolderId,
                            String name,
                            String description)

addDLSync

public DLSync addDLSync(long companyId,
                        long fileId,
                        long repositoryId,
                        long parentFolderId,
                        boolean typeFolder)

addGroup

public Group addGroup(long groupId,
                      long classNameId,
                      long classPK,
                      String name,
                      String friendlyURL,
                      boolean site)

addJournalArticle

public JournalArticle addJournalArticle(long resourcePrimKey,
                                        long groupId,
                                        long companyId,
                                        String articleId)

addJournalArticleResource

public JournalArticleResource addJournalArticleResource(long groupId)

addLayout

public Layout addLayout(int layoutId,
                        String name,
                        String friendlyURL,
                        String column1,
                        String column2)

addMBCategory

public MBCategory addMBCategory(long categoryId,
                                long groupId,
                                long companyId,
                                long userId,
                                String name,
                                String description,
                                int threadCount,
                                int messageCount)

addMBDiscussion

public MBDiscussion addMBDiscussion(long classNameId,
                                    long classPK,
                                    long threadId)

addMBMessage

public MBMessage addMBMessage(long messageId,
                              long groupId,
                              long userId,
                              long classNameId,
                              long classPK,
                              long categoryId,
                              long threadId,
                              long rootMessageId,
                              long parentMessageId,
                              String subject,
                              String body)

addMBStatsUser

public MBStatsUser addMBStatsUser(long groupId,
                                  long userId)

addMBThread

public MBThread addMBThread(long threadId,
                            long groupId,
                            long companyId,
                            long categoryId,
                            long rootMessageId,
                            int messageCount,
                            long lastPostByUserId)

addPermissions

public List<Permission> addPermissions(Resource resource)

addPortletPreferences

public PortletPreferences addPortletPreferences(long ownerId,
                                                long plid,
                                                String portletId,
                                                String preferences)

addResource

public Resource addResource(String name,
                            String primKey)

addResourcePermission

public List<ResourcePermission> addResourcePermission(long companyId,
                                                      String name,
                                                      String primKey)

addRolesPermissions

public List<KeyValuePair> addRolesPermissions(Resource resource,
                                              List<Permission> permissions,
                                              Role memberRole)

addSocialActivity

public SocialActivity addSocialActivity(long groupId,
                                        long companyId,
                                        long userId,
                                        long classNameId,
                                        long classPK)

addUser

public User addUser(boolean defaultUser,
                    String screenName)

addUserToGroupIds

public List<Long> addUserToGroupIds(long groupId)

addWikiNode

public WikiNode addWikiNode(long groupId,
                            long userId,
                            String name,
                            String description)

addWikiPage

public WikiPage addWikiPage(long groupId,
                            long userId,
                            long nodeId,
                            String title,
                            double version,
                            String content,
                            boolean head)

getAdministratorRole

public Role getAdministratorRole()

getBlogsEntryClassName

public ClassName getBlogsEntryClassName()

getClassNames

public List<ClassName> getClassNames()

getCompany

public Company getCompany()

getCounters

public List<CounterModelImpl> getCounters()

getDateLong

public String getDateLong(Date date)

getDateString

public String getDateString(Date date)

getDDLRecordSetClassName

public ClassName getDDLRecordSetClassName()

getDDMContentClassName

public ClassName getDDMContentClassName()

getDefaultUser

public User getDefaultUser()

getDLFileEntryClassName

public ClassName getDLFileEntryClassName()

getGroupClassName

public ClassName getGroupClassName()

getGuestGroup

public Group getGuestGroup()

getGuestRole

public Role getGuestRole()

getJournalArticleClassName

public ClassName getJournalArticleClassName()

getMBMessageClassName

public ClassName getMBMessageClassName()

getOrganizationAdministratorRole

public Role getOrganizationAdministratorRole()

getOrganizationOwnerRole

public Role getOrganizationOwnerRole()

getOrganizationUserRole

public Role getOrganizationUserRole()

getPowerUserRole

public Role getPowerUserRole()

getResourceCodes

public List<ResourceCode> getResourceCodes()

getRoleClassName

public ClassName getRoleClassName()

getRoles

public List<Role> getRoles()

getSiteAdministratorRole

public Role getSiteAdministratorRole()

getSiteMemberRole

public Role getSiteMemberRole()

getSiteOwnerRole

public Role getSiteOwnerRole()

getUserClassName

public ClassName getUserClassName()

getUserNames

public Object[] getUserNames()

getUserRole

public Role getUserRole()

getWikiPageClassName

public ClassName getWikiPageClassName()

initClassNames

public void initClassNames()

initCompany

public void initCompany()

initCounters

public void initCounters()

initDefaultUser

public void initDefaultUser()

initGuestGroup

public void initGuestGroup()

initJournalArticle

public void initJournalArticle(int maxJournalArticleSize)
                        throws Exception
Throws:
Exception

initResourceCodes

public void initResourceCodes()
                       throws Exception
Throws:
Exception

initResourceCodes

public void initResourceCodes(String name)

initRoles

public void initRoles()

initUserNames

public void initUserNames()
                   throws Exception
Throws:
Exception

newInteger

public IntegerWrapper newInteger()

newCreateDate

protected Date newCreateDate()

newResourceCode

protected ResourceCode newResourceCode()

newRole

protected Role newRole()

Liferay 6.1.2-ce-ga3