com.liferay.portal.tools.samplesqlbuilder
Class SampleSQLBuilder
java.lang.Object
com.liferay.portal.tools.samplesqlbuilder.SampleSQLBuilder
public class SampleSQLBuilder
- extends Object
|
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 |
insertDDLRecord(DDLRecord ddlRecord,
DDLRecordSet ddlRecordSet,
int ddlRecordCount)
|
void |
insertDDLRecordSet(DDMStructure ddmStructure)
|
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,
String primKey)
|
void |
insertUser(Contact contact,
List<Long> groupIds,
List<Long> organizationIds,
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)
throws Exception
- Throws:
Exception
main
public static void main(String[] args)
insertBlogsEntry
public void insertBlogsEntry(BlogsEntry blogsEntry)
throws Exception
- Throws:
Exception
insertDDLRecord
public void insertDDLRecord(DDLRecord ddlRecord,
DDLRecordSet ddlRecordSet,
int ddlRecordCount)
throws Exception
- Throws:
Exception
insertDDLRecordSet
public void insertDDLRecordSet(DDMStructure ddmStructure)
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,
String primKey)
throws Exception
- Throws:
Exception
insertUser
public void insertUser(Contact contact,
List<Long> groupIds,
List<Long> organizationIds,
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