com.liferay.portal.tools.samplesqlbuilder
Class SampleSQLBuilder
java.lang.Object
com.liferay.portal.tools.samplesqlbuilder.SampleSQLBuilder
public class SampleSQLBuilder
- extends Object
Constructor Summary |
SampleSQLBuilder(Map<String,String> arguments,
String baseDir,
String outputDir,
boolean outputMerge,
String dbType,
int maxBlogsEntryCommentCount,
int maxBlogsEntryCount,
int maxDLFileEntryCount,
int dlFileEntrySize,
int maxDLFolderCount,
int maxDLFolderDepth,
int maxGroupCount,
int maxMBCategoryCount,
int maxMBMessageCount,
int maxMBThreadCount,
int maxUserCount,
int maxUserToGroupCount,
int maxWikiNodeCount,
int maxWikiPageCommentCount,
int maxWikiPageCount,
boolean securityEnabled)
|
Method Summary |
protected void |
compressInsertSQL(String insertSQL)
|
protected void |
compressSQL(Reader reader)
|
protected Writer |
createFileWriter(File file)
|
protected Writer |
createFileWriter(String fileName)
|
protected Writer |
createUnsyncBufferedWriter(Writer writer)
|
protected void |
generateSQL(CharPipe charPipe)
|
protected Map<String,Object> |
getContext()
|
protected File |
getInsertSQLFile(String tableName)
|
void |
insertBlogsEntry(BlogsEntry blogsEntry)
|
void |
insertDLFileEntry(DLFileEntry dlFileEntry,
DDMStructure ddmStructure)
|
void |
insertDLFolder(DLFolder dlFolder,
DDMStructure ddmStructure)
|
void |
insertDLFolders(long parentDLFolderId,
int dlFolderDepth,
DDMStructure ddmStructure)
|
void |
insertGroup(Group group,
List<Layout> privateLayouts,
List<Layout> publicLayouts)
|
void |
insertMBCategory(MBCategory mbCategory)
|
void |
insertMBMessage(MBMessage mbMessage)
|
void |
insertResourcePermission(String name,
long primKey)
|
void |
insertSecurity(String name,
long primKey)
|
void |
insertSecurity(String name,
String primKey)
|
void |
insertUser(Contact contact,
Group group,
List<Long> groupIds,
List<Long> organizationIds,
List<Layout> privateLayouts,
List<Layout> publicLayouts,
List<Role> roleIds,
User user)
|
void |
insertWikiPage(WikiNode wikiNode,
WikiPage wikiPage)
|
static void |
main(String[] args)
|
protected void |
mergeSQL()
|
protected void |
processTemplate(String name,
Map<String,Object> context)
|
protected void |
put(Map<String,Object> context,
String key,
Object value)
|
protected void |
writeToInsertSQLFile(String tableName,
String sql)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SampleSQLBuilder
public SampleSQLBuilder(Map<String,String> arguments,
String baseDir,
String outputDir,
boolean outputMerge,
String dbType,
int maxBlogsEntryCommentCount,
int maxBlogsEntryCount,
int maxDLFileEntryCount,
int dlFileEntrySize,
int maxDLFolderCount,
int maxDLFolderDepth,
int maxGroupCount,
int maxMBCategoryCount,
int maxMBMessageCount,
int maxMBThreadCount,
int maxUserCount,
int maxUserToGroupCount,
int maxWikiNodeCount,
int maxWikiPageCommentCount,
int maxWikiPageCount,
boolean securityEnabled)
main
public static void main(String[] args)
insertBlogsEntry
public void insertBlogsEntry(BlogsEntry blogsEntry)
throws Exception
- Throws:
Exception
insertDLFileEntry
public void insertDLFileEntry(DLFileEntry dlFileEntry,
DDMStructure ddmStructure)
throws Exception
- Throws:
Exception
insertDLFolder
public void insertDLFolder(DLFolder dlFolder,
DDMStructure ddmStructure)
throws Exception
- Throws:
Exception
insertDLFolders
public void insertDLFolders(long parentDLFolderId,
int dlFolderDepth,
DDMStructure ddmStructure)
throws Exception
- Throws:
Exception
insertGroup
public void insertGroup(Group group,
List<Layout> privateLayouts,
List<Layout> publicLayouts)
throws Exception
- Throws:
Exception
insertMBCategory
public void insertMBCategory(MBCategory mbCategory)
throws Exception
- Throws:
Exception
insertMBMessage
public void insertMBMessage(MBMessage mbMessage)
throws Exception
- Throws:
Exception
insertResourcePermission
public void insertResourcePermission(String name,
long primKey)
throws Exception
- Throws:
Exception
insertSecurity
public void insertSecurity(String name,
long primKey)
throws Exception
- Throws:
Exception
insertSecurity
public void insertSecurity(String name,
String primKey)
throws Exception
- Throws:
Exception
insertUser
public void insertUser(Contact contact,
Group group,
List<Long> groupIds,
List<Long> organizationIds,
List<Layout> privateLayouts,
List<Layout> publicLayouts,
List<Role> roleIds,
User user)
throws Exception
- Throws:
Exception
insertWikiPage
public void insertWikiPage(WikiNode wikiNode,
WikiPage wikiPage)
throws Exception
- Throws:
Exception
compressInsertSQL
protected void compressInsertSQL(String insertSQL)
throws IOException
- Throws:
IOException
compressSQL
protected void compressSQL(Reader reader)
throws IOException
- Throws:
IOException
createFileWriter
protected Writer createFileWriter(File file)
throws IOException
- Throws:
IOException
createFileWriter
protected Writer createFileWriter(String fileName)
throws IOException
- Throws:
IOException
createUnsyncBufferedWriter
protected Writer createUnsyncBufferedWriter(Writer writer)
generateSQL
protected void generateSQL(CharPipe charPipe)
getContext
protected Map<String,Object> getContext()
getInsertSQLFile
protected File getInsertSQLFile(String tableName)
mergeSQL
protected void mergeSQL()
throws IOException
- Throws:
IOException
processTemplate
protected void processTemplate(String name,
Map<String,Object> context)
throws Exception
- Throws:
Exception
put
protected void put(Map<String,Object> context,
String key,
Object value)
writeToInsertSQLFile
protected void writeToInsertSQLFile(String tableName,
String sql)
throws IOException
- Throws:
IOException