diff --git a/benchmarks/benchmarks.properties b/benchmarks/benchmarks.properties
index d6ec24c978f3da..902240c03a0a2b 100644
--- a/benchmarks/benchmarks.properties
+++ b/benchmarks/benchmarks.properties
@@ -28,10 +28,20 @@
#sample.sql.db.type=sybase
#
- # Specify the number of asset category to generate.
+ # Specify the number of asset category per vocabulary to generate.
#
sample.sql.max.asset.category.count=0
+ #
+ # Specify the number of asset tag to generate.
+ #
+ sample.sql.max.asset.tag.count=0
+
+ #
+ # Specify the number of asset vocabulary to generate.
+ #
+ sample.sql.max.asset.vocabulary.count=0
+
#
# Specify the number of comments to generate per blogs entry.
#
@@ -162,4 +172,14 @@
#
# Specify whether the output should be merged into a single SQL file.
#
- sample.sql.output.merge=true
\ No newline at end of file
+ sample.sql.output.merge=true
+
+ #
+ # Specify the number of asset category per asset entry to generate.
+ #
+ sample.sql.per.asset.entry.max.asset.category.count=2
+
+ #
+ # Specify the number of asset tag per asset entry to generate.
+ #
+ sample.sql.per.asset.entry.max.asset.tag.count=5
\ No newline at end of file
diff --git a/benchmarks/build.xml b/benchmarks/build.xml
index 4208280c9c53e2..286d6ca5fce70e 100644
--- a/benchmarks/build.xml
+++ b/benchmarks/build.xml
@@ -12,6 +12,8 @@
+
+
@@ -37,6 +39,8 @@
+
+
\ No newline at end of file
diff --git a/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/DataFactory.java b/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/DataFactory.java
index 2ba3980ea333b1..12859118e20627 100644
--- a/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/DataFactory.java
+++ b/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/DataFactory.java
@@ -169,15 +169,23 @@
public class DataFactory {
public DataFactory(
- String baseDir, int maxAssetCategoryCount, int maxBlogsEntryCount,
- int maxDDLCustomFieldCount, int maxGroupsCount,
- int maxJournalArticleCount, int maxJournalArticleSize,
- int maxMBCategoryCount, int maxMBThreadCount, int maxMBMessageCount,
+ String baseDir, int maxAssetCategoryCount,
+ int maxAssetCategoryPerAssetEntryCount, int maxAssetTagCount,
+ int maxAssetTagPerAssetEntryCount, int maxAssetVocabularyCount,
+ int maxBlogsEntryCount, int maxDDLCustomFieldCount,
+ int maxGroupsCount, int maxJournalArticleCount,
+ int maxJournalArticleSize, int maxMBCategoryCount,
+ int maxMBThreadCount, int maxMBMessageCount,
int maxUserToGroupCount)
throws Exception {
_baseDir = baseDir;
_maxAssetCategoryCount = maxAssetCategoryCount;
+ _maxAssetCategoryPerAssetEntryCount =
+ maxAssetCategoryPerAssetEntryCount;
+ _maxAssetTagCount = maxAssetTagCount;
+ _maxAssetTagPerAssetEntryCount = maxAssetTagPerAssetEntryCount;
+ _maxAssetVocabularyCount = maxAssetVocabularyCount;
_maxBlogsEntryCount = maxBlogsEntryCount;
_maxDDLCustomFieldCount = maxDDLCustomFieldCount;
_maxGroupsCount = maxGroupsCount;
@@ -2192,6 +2200,10 @@ protected Date nextFutureDate() {
private Map _layoutCounters =
new HashMap();
private int _maxAssetCategoryCount;
+ private int _maxAssetCategoryPerAssetEntryCount;
+ private int _maxAssetTagCount;
+ private int _maxAssetTagPerAssetEntryCount;
+ private int _maxAssetVocabularyCount;
private int _maxBlogsEntryCount;
private int _maxDDLCustomFieldCount;
private int _maxDLFileEntrySize;
diff --git a/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/SampleSQLBuilder.java b/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/SampleSQLBuilder.java
index c9747ad748d991..025deda9dad4ab 100644
--- a/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/SampleSQLBuilder.java
+++ b/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/SampleSQLBuilder.java
@@ -78,6 +78,10 @@ public SampleSQLBuilder(Map arguments) throws Exception {
_dbType = arguments.get("sample.sql.db.type");
_maxAssetCategoryCount = GetterUtil.getInteger(
arguments.get("sample.sql.max.asset.category.count"));
+ _maxAssetTagCount = GetterUtil.getInteger(
+ arguments.get("sample.sql.max.asset.tag.count"));
+ _maxAssetVocabularyCount = GetterUtil.getInteger(
+ arguments.get("sample.sql.max.asset.vocabulary.count"));
_maxBlogsEntryCommentCount = GetterUtil.getInteger(
arguments.get("sample.sql.max.blogs.entry.comment.count"));
_maxBlogsEntryCount = GetterUtil.getInteger(
@@ -127,9 +131,16 @@ public SampleSQLBuilder(Map arguments) throws Exception {
_outputDir = arguments.get("sample.sql.output.dir");
_outputMerge = GetterUtil.getBoolean(
arguments.get("sample.sql.output.merge"));
+ _maxAssetCategoryPerAssetEntry = GetterUtil.getInteger(
+ arguments.get(
+ "sample.sql.per.asset.entry.max.asset.category.count"));
+ _maxAssetTagPerAssetEntryCount = GetterUtil.getInteger(
+ arguments.get("sample.sql.per.asset.entry.max.asset.tag.count"));
_dataFactory = new DataFactory(
- baseDir, _maxAssetCategoryCount, _maxBlogsEntryCount,
+ baseDir, _maxAssetCategoryCount, _maxAssetCategoryPerAssetEntry,
+ _maxAssetTagCount, _maxAssetTagPerAssetEntryCount,
+ _maxAssetVocabularyCount, _maxBlogsEntryCount,
_maxDDLCustomFieldCount, _maxGroupCount, _maxJournalArticleCount,
_maxJournalArticleSize, _maxMBCategoryCount, _maxMBThreadCount,
_maxMBMessageCount, _maxUserToGroupCount);
@@ -339,6 +350,8 @@ protected Map getContext() {
put(context, "counter", _dataFactory.getCounter());
put(context, "dataFactory", _dataFactory);
put(context, "maxAssetCategoryCount", _maxAssetCategoryCount);
+ put(context, "maxAssetTagCount", _maxAssetTagCount);
+ put(context, "maxAssetVocabularyCount", _maxAssetVocabularyCount);
put(context, "maxDLFileEntrySize", _maxDLFileEntrySize);
put(context, "maxBlogsEntryCommentCount", _maxBlogsEntryCommentCount);
put(context, "maxBlogsEntryCount", _maxBlogsEntryCount);
@@ -492,6 +505,10 @@ protected void writeToInsertSQLFile(String tableName, String sql)
private Map _insertSQLWriters =
new ConcurrentHashMap();
private int _maxAssetCategoryCount;
+ private int _maxAssetCategoryPerAssetEntry;
+ private int _maxAssetTagCount;
+ private int _maxAssetTagPerAssetEntryCount;
+ private int _maxAssetVocabularyCount;
private int _maxBlogsEntryCommentCount;
private int _maxBlogsEntryCount;
private int _maxDDLCustomFieldCount;
diff --git a/sql/build-parent.xml b/sql/build-parent.xml
index d5043e6524194c..d7eac1f46a548f 100644
--- a/sql/build-parent.xml
+++ b/sql/build-parent.xml
@@ -173,6 +173,8 @@
+
+
@@ -198,6 +200,8 @@
+
+