}
if(notAddedTagNames != null) {
for(i=0; i<notAddedTagNames.length; i++) {
Data tagRs = getTag(notAddedTagNames[i].toUpperCase());
Long tagId;
// If the tag is not existed add the tag into TN_TAG
if(tagRs.size() == 0) {
tagId = insertTag(notAddedTagNames[i]);
tagRs.add(0,"tagId", tagId);
//tagRs = getTag(notAddedTagNames[i]);
// If the tag is existing get a tagId and add into addedTagIds, after this step the tag counting will be increased.
} else {
tagId = tagRs.getLong(0, "tagId");
addedTagIds = numberUtil.add(addedTagIds, tagId);
}
setCntTag(contentId, tagRs.getLong(0, "tagId"));
tagRs = null;
}
}
if( addedTagIds.length > 0) {
setTagCountInc(addedTagIds);