@Service @Transactional public class DefaultCommonContentService extends AbstractVersionedContentService<CommonContentJPA,CommonContentRepository> implements CommonContentService
repository| Modifier and Type | Method and Description |
|---|---|
void |
deleteByDocId(java.lang.Integer docId) |
java.util.Set<CommonContent> |
getByVersion(Version version) |
CommonContent |
getOrCreate(int docId,
int versionNo,
Language language)
Gets common content for working or published versions.
|
java.util.List<CommonContent> |
getOrCreateCommonContents(int docId,
int versionNo)
Get document's common contents for all languages
If common content of non working version is
null it creates new common content based on working. |
protected CommonContentJPA |
removeId(CommonContentJPA dto,
Version version) |
<T extends CommonContent> |
save(int docId,
java.util.Collection<T> saveUs) |
createVersionedContent, updateWorkingVersionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateVersionedContentpublic java.util.List<CommonContent> getOrCreateCommonContents(int docId, int versionNo)
CommonContentServicenull it creates new common content based on working.getOrCreateCommonContents in interface CommonContentServicedocId - of documentversionNo - version noList of all common contentspublic CommonContent getOrCreate(int docId, int versionNo, Language language)
CommonContentServicenull it creates new common content based on working.getOrCreate in interface CommonContentServicedocId - of documentversionNo - version nolanguage - to get language codepublic <T extends CommonContent> void save(int docId, java.util.Collection<T> saveUs)
save in interface CommonContentServicepublic java.util.Set<CommonContent> getByVersion(Version version)
getByVersion in interface CommonContentServicepublic void deleteByDocId(java.lang.Integer docId)
deleteByDocId in interface DeleterByDocumentIdprotected CommonContentJPA removeId(CommonContentJPA dto, Version version)
removeId in class AbstractVersionedContentService<CommonContentJPA,CommonContentRepository>