diff --git a/portal-impl/src/com/liferay/portlet/documentlibrary/model/impl/DLFileEntryTypeModelImpl.java b/portal-impl/src/com/liferay/portlet/documentlibrary/model/impl/DLFileEntryTypeModelImpl.java index 1ca09b7bf382f1..482fa0142e8355 100644 --- a/portal-impl/src/com/liferay/portlet/documentlibrary/model/impl/DLFileEntryTypeModelImpl.java +++ b/portal-impl/src/com/liferay/portlet/documentlibrary/model/impl/DLFileEntryTypeModelImpl.java @@ -188,19 +188,6 @@ public static List toModels( public static final boolean FINDER_CACHE_ENABLED_DLFILEENTRYTYPES_DLFOLDERS = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get( "value.object.finder.cache.enabled.DLFileEntryTypes_DLFolders"), true); - public static final String MAPPING_TABLE_DLFILEENTRYTYPES_DDMSTRUCTURES_NAME = - "DLFileEntryTypes_DDMStructures"; - public static final Object[][] MAPPING_TABLE_DLFILEENTRYTYPES_DDMSTRUCTURES_COLUMNS = - { - { "fileEntryTypeId", Types.BIGINT }, - { "structureId", Types.BIGINT } - }; - public static final String MAPPING_TABLE_DLFILEENTRYTYPES_DDMSTRUCTURES_SQL_CREATE = - "create table DLFileEntryTypes_DDMStructures (structureId LONG not null,fileEntryTypeId LONG not null,primary key (structureId, fileEntryTypeId))"; - public static final boolean FINDER_CACHE_ENABLED_DLFILEENTRYTYPES_DDMSTRUCTURES = - GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get( - "value.object.finder.cache.enabled.DLFileEntryTypes_DDMStructures"), - true); public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get( "lock.expiration.time.com.liferay.portlet.documentlibrary.model.DLFileEntryType")); diff --git a/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryLocalServiceBaseImpl.java index 706d622f68dc9f..3ea30f2b4e6145 100644 --- a/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryLocalServiceBaseImpl.java @@ -67,8 +67,6 @@ import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence; import com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinder; import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence; -import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder; -import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence; import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence; import com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence; import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil; @@ -1244,81 +1242,6 @@ public void setDLAppHelperLocalService( this.dlAppHelperLocalService = dlAppHelperLocalService; } - /** - * Returns the d d m structure local service. - * - * @return the d d m structure local service - */ - public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService getDDMStructureLocalService() { - return ddmStructureLocalService; - } - - /** - * Sets the d d m structure local service. - * - * @param ddmStructureLocalService the d d m structure local service - */ - public void setDDMStructureLocalService( - com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService) { - this.ddmStructureLocalService = ddmStructureLocalService; - } - - /** - * Returns the d d m structure remote service. - * - * @return the d d m structure remote service - */ - public com.liferay.portlet.dynamicdatamapping.service.DDMStructureService getDDMStructureService() { - return ddmStructureService; - } - - /** - * Sets the d d m structure remote service. - * - * @param ddmStructureService the d d m structure remote service - */ - public void setDDMStructureService( - com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService) { - this.ddmStructureService = ddmStructureService; - } - - /** - * Returns the d d m structure persistence. - * - * @return the d d m structure persistence - */ - public DDMStructurePersistence getDDMStructurePersistence() { - return ddmStructurePersistence; - } - - /** - * Sets the d d m structure persistence. - * - * @param ddmStructurePersistence the d d m structure persistence - */ - public void setDDMStructurePersistence( - DDMStructurePersistence ddmStructurePersistence) { - this.ddmStructurePersistence = ddmStructurePersistence; - } - - /** - * Returns the d d m structure finder. - * - * @return the d d m structure finder - */ - public DDMStructureFinder getDDMStructureFinder() { - return ddmStructureFinder; - } - - /** - * Sets the d d m structure finder. - * - * @param ddmStructureFinder the d d m structure finder - */ - public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) { - this.ddmStructureFinder = ddmStructureFinder; - } - /** * Returns the expando row local service. * @@ -1862,14 +1785,6 @@ protected void runSQL(String sql) { protected AssetTagFinder assetTagFinder; @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService.class) protected com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService dlAppHelperLocalService; - @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService.class) - protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService; - @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureService.class) - protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService; - @BeanReference(type = DDMStructurePersistence.class) - protected DDMStructurePersistence ddmStructurePersistence; - @BeanReference(type = DDMStructureFinder.class) - protected DDMStructureFinder ddmStructureFinder; @BeanReference(type = com.liferay.portlet.expando.service.ExpandoRowLocalService.class) protected com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService; @BeanReference(type = ExpandoRowPersistence.class) diff --git a/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryMetadataLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryMetadataLocalServiceBaseImpl.java index 18068d1b661754..a74cb05ed2748d 100644 --- a/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryMetadataLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryMetadataLocalServiceBaseImpl.java @@ -44,7 +44,6 @@ import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryMetadataPersistence; import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypeFinder; import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypePersistence; -import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureLinkPersistence; import java.io.Serializable; @@ -439,44 +438,6 @@ public void setClassNamePersistence( this.classNamePersistence = classNamePersistence; } - /** - * Returns the d d m structure link local service. - * - * @return the d d m structure link local service - */ - public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService getDDMStructureLinkLocalService() { - return ddmStructureLinkLocalService; - } - - /** - * Sets the d d m structure link local service. - * - * @param ddmStructureLinkLocalService the d d m structure link local service - */ - public void setDDMStructureLinkLocalService( - com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService ddmStructureLinkLocalService) { - this.ddmStructureLinkLocalService = ddmStructureLinkLocalService; - } - - /** - * Returns the d d m structure link persistence. - * - * @return the d d m structure link persistence - */ - public DDMStructureLinkPersistence getDDMStructureLinkPersistence() { - return ddmStructureLinkPersistence; - } - - /** - * Sets the d d m structure link persistence. - * - * @param ddmStructureLinkPersistence the d d m structure link persistence - */ - public void setDDMStructureLinkPersistence( - DDMStructureLinkPersistence ddmStructureLinkPersistence) { - this.ddmStructureLinkPersistence = ddmStructureLinkPersistence; - } - /** * Returns the document library file entry type local service. * @@ -629,10 +590,6 @@ protected void runSQL(String sql) { protected com.liferay.portal.service.ClassNameService classNameService; @BeanReference(type = ClassNamePersistence.class) protected ClassNamePersistence classNamePersistence; - @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService.class) - protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService ddmStructureLinkLocalService; - @BeanReference(type = DDMStructureLinkPersistence.class) - protected DDMStructureLinkPersistence ddmStructureLinkPersistence; @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService.class) protected com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService dlFileEntryTypeLocalService; @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService.class) diff --git a/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryServiceBaseImpl.java index 3d9fa1c0d1a634..13dd3bdc425de3 100644 --- a/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryServiceBaseImpl.java @@ -51,8 +51,6 @@ import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence; import com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinder; import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence; -import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder; -import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence; import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence; import com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence; import com.liferay.portlet.trash.service.persistence.TrashEntryPersistence; @@ -866,81 +864,6 @@ public void setDLAppHelperLocalService( this.dlAppHelperLocalService = dlAppHelperLocalService; } - /** - * Returns the d d m structure local service. - * - * @return the d d m structure local service - */ - public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService getDDMStructureLocalService() { - return ddmStructureLocalService; - } - - /** - * Sets the d d m structure local service. - * - * @param ddmStructureLocalService the d d m structure local service - */ - public void setDDMStructureLocalService( - com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService) { - this.ddmStructureLocalService = ddmStructureLocalService; - } - - /** - * Returns the d d m structure remote service. - * - * @return the d d m structure remote service - */ - public com.liferay.portlet.dynamicdatamapping.service.DDMStructureService getDDMStructureService() { - return ddmStructureService; - } - - /** - * Sets the d d m structure remote service. - * - * @param ddmStructureService the d d m structure remote service - */ - public void setDDMStructureService( - com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService) { - this.ddmStructureService = ddmStructureService; - } - - /** - * Returns the d d m structure persistence. - * - * @return the d d m structure persistence - */ - public DDMStructurePersistence getDDMStructurePersistence() { - return ddmStructurePersistence; - } - - /** - * Sets the d d m structure persistence. - * - * @param ddmStructurePersistence the d d m structure persistence - */ - public void setDDMStructurePersistence( - DDMStructurePersistence ddmStructurePersistence) { - this.ddmStructurePersistence = ddmStructurePersistence; - } - - /** - * Returns the d d m structure finder. - * - * @return the d d m structure finder - */ - public DDMStructureFinder getDDMStructureFinder() { - return ddmStructureFinder; - } - - /** - * Sets the d d m structure finder. - * - * @param ddmStructureFinder the d d m structure finder - */ - public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) { - this.ddmStructureFinder = ddmStructureFinder; - } - /** * Returns the expando row local service. * @@ -1480,14 +1403,6 @@ protected void runSQL(String sql) { protected AssetTagFinder assetTagFinder; @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService.class) protected com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService dlAppHelperLocalService; - @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService.class) - protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService; - @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureService.class) - protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService; - @BeanReference(type = DDMStructurePersistence.class) - protected DDMStructurePersistence ddmStructurePersistence; - @BeanReference(type = DDMStructureFinder.class) - protected DDMStructureFinder ddmStructureFinder; @BeanReference(type = com.liferay.portlet.expando.service.ExpandoRowLocalService.class) protected com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService; @BeanReference(type = ExpandoRowPersistence.class) diff --git a/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryTypeLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryTypeLocalServiceBaseImpl.java index c3902c2bc67feb..8a069329ce2210 100644 --- a/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryTypeLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryTypeLocalServiceBaseImpl.java @@ -52,8 +52,6 @@ import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence; import com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinder; import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence; -import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder; -import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence; import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil; import com.liferay.portlet.exportimport.lar.ManifestSummary; import com.liferay.portlet.exportimport.lar.PortletDataContext; @@ -566,153 +564,6 @@ public void setDLFolderDLFileEntryTypes(long folderId, dlFolderPersistence.setDLFileEntryTypes(folderId, fileEntryTypeIds); } - /** - */ - @Override - public void addDDMStructureDLFileEntryType(long structureId, - long fileEntryTypeId) { - ddmStructurePersistence.addDLFileEntryType(structureId, fileEntryTypeId); - } - - /** - */ - @Override - public void addDDMStructureDLFileEntryType(long structureId, - DLFileEntryType dlFileEntryType) { - ddmStructurePersistence.addDLFileEntryType(structureId, dlFileEntryType); - } - - /** - */ - @Override - public void addDDMStructureDLFileEntryTypes(long structureId, - long[] fileEntryTypeIds) { - ddmStructurePersistence.addDLFileEntryTypes(structureId, - fileEntryTypeIds); - } - - /** - */ - @Override - public void addDDMStructureDLFileEntryTypes(long structureId, - List DLFileEntryTypes) { - ddmStructurePersistence.addDLFileEntryTypes(structureId, - DLFileEntryTypes); - } - - /** - */ - @Override - public void clearDDMStructureDLFileEntryTypes(long structureId) { - ddmStructurePersistence.clearDLFileEntryTypes(structureId); - } - - /** - */ - @Override - public void deleteDDMStructureDLFileEntryType(long structureId, - long fileEntryTypeId) { - ddmStructurePersistence.removeDLFileEntryType(structureId, - fileEntryTypeId); - } - - /** - */ - @Override - public void deleteDDMStructureDLFileEntryType(long structureId, - DLFileEntryType dlFileEntryType) { - ddmStructurePersistence.removeDLFileEntryType(structureId, - dlFileEntryType); - } - - /** - */ - @Override - public void deleteDDMStructureDLFileEntryTypes(long structureId, - long[] fileEntryTypeIds) { - ddmStructurePersistence.removeDLFileEntryTypes(structureId, - fileEntryTypeIds); - } - - /** - */ - @Override - public void deleteDDMStructureDLFileEntryTypes(long structureId, - List DLFileEntryTypes) { - ddmStructurePersistence.removeDLFileEntryTypes(structureId, - DLFileEntryTypes); - } - - /** - * Returns the structureIds of the d d m structures associated with the document library file entry type. - * - * @param fileEntryTypeId the fileEntryTypeId of the document library file entry type - * @return long[] the structureIds of d d m structures associated with the document library file entry type - */ - @Override - public long[] getDDMStructurePrimaryKeys(long fileEntryTypeId) { - return dlFileEntryTypePersistence.getDDMStructurePrimaryKeys(fileEntryTypeId); - } - - /** - */ - @Override - public List getDDMStructureDLFileEntryTypes( - long structureId) { - return ddmStructurePersistence.getDLFileEntryTypes(structureId); - } - - /** - */ - @Override - public List getDDMStructureDLFileEntryTypes( - long structureId, int start, int end) { - return ddmStructurePersistence.getDLFileEntryTypes(structureId, start, - end); - } - - /** - */ - @Override - public List getDDMStructureDLFileEntryTypes( - long structureId, int start, int end, - OrderByComparator orderByComparator) { - return ddmStructurePersistence.getDLFileEntryTypes(structureId, start, - end, orderByComparator); - } - - /** - */ - @Override - public int getDDMStructureDLFileEntryTypesCount(long structureId) { - return ddmStructurePersistence.getDLFileEntryTypesSize(structureId); - } - - /** - */ - @Override - public boolean hasDDMStructureDLFileEntryType(long structureId, - long fileEntryTypeId) { - return ddmStructurePersistence.containsDLFileEntryType(structureId, - fileEntryTypeId); - } - - /** - */ - @Override - public boolean hasDDMStructureDLFileEntryTypes(long structureId) { - return ddmStructurePersistence.containsDLFileEntryTypes(structureId); - } - - /** - */ - @Override - public void setDDMStructureDLFileEntryTypes(long structureId, - long[] fileEntryTypeIds) { - ddmStructurePersistence.setDLFileEntryTypes(structureId, - fileEntryTypeIds); - } - /** * Returns the document library file entry type local service. * @@ -1128,81 +979,6 @@ public void setDLFileEntryFinder(DLFileEntryFinder dlFileEntryFinder) { this.dlFileEntryFinder = dlFileEntryFinder; } - /** - * Returns the d d m structure local service. - * - * @return the d d m structure local service - */ - public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService getDDMStructureLocalService() { - return ddmStructureLocalService; - } - - /** - * Sets the d d m structure local service. - * - * @param ddmStructureLocalService the d d m structure local service - */ - public void setDDMStructureLocalService( - com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService) { - this.ddmStructureLocalService = ddmStructureLocalService; - } - - /** - * Returns the d d m structure remote service. - * - * @return the d d m structure remote service - */ - public com.liferay.portlet.dynamicdatamapping.service.DDMStructureService getDDMStructureService() { - return ddmStructureService; - } - - /** - * Sets the d d m structure remote service. - * - * @param ddmStructureService the d d m structure remote service - */ - public void setDDMStructureService( - com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService) { - this.ddmStructureService = ddmStructureService; - } - - /** - * Returns the d d m structure persistence. - * - * @return the d d m structure persistence - */ - public DDMStructurePersistence getDDMStructurePersistence() { - return ddmStructurePersistence; - } - - /** - * Sets the d d m structure persistence. - * - * @param ddmStructurePersistence the d d m structure persistence - */ - public void setDDMStructurePersistence( - DDMStructurePersistence ddmStructurePersistence) { - this.ddmStructurePersistence = ddmStructurePersistence; - } - - /** - * Returns the d d m structure finder. - * - * @return the d d m structure finder - */ - public DDMStructureFinder getDDMStructureFinder() { - return ddmStructureFinder; - } - - /** - * Sets the d d m structure finder. - * - * @param ddmStructureFinder the d d m structure finder - */ - public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) { - this.ddmStructureFinder = ddmStructureFinder; - } - /** * Returns the document library file version local service. * @@ -1440,14 +1216,6 @@ protected void runSQL(String sql) { protected DLFileEntryPersistence dlFileEntryPersistence; @BeanReference(type = DLFileEntryFinder.class) protected DLFileEntryFinder dlFileEntryFinder; - @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService.class) - protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService; - @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureService.class) - protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService; - @BeanReference(type = DDMStructurePersistence.class) - protected DDMStructurePersistence ddmStructurePersistence; - @BeanReference(type = DDMStructureFinder.class) - protected DDMStructureFinder ddmStructureFinder; @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService.class) protected com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService dlFileVersionLocalService; @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileVersionService.class) diff --git a/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryTypeServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryTypeServiceBaseImpl.java index 8fe881ea36ecbc..f8116c17dfced5 100644 --- a/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryTypeServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/documentlibrary/service/base/DLFileEntryTypeServiceBaseImpl.java @@ -38,8 +38,6 @@ import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence; import com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinder; import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence; -import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder; -import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence; import javax.sql.DataSource; @@ -478,81 +476,6 @@ public void setDLFileEntryFinder(DLFileEntryFinder dlFileEntryFinder) { this.dlFileEntryFinder = dlFileEntryFinder; } - /** - * Returns the d d m structure local service. - * - * @return the d d m structure local service - */ - public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService getDDMStructureLocalService() { - return ddmStructureLocalService; - } - - /** - * Sets the d d m structure local service. - * - * @param ddmStructureLocalService the d d m structure local service - */ - public void setDDMStructureLocalService( - com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService) { - this.ddmStructureLocalService = ddmStructureLocalService; - } - - /** - * Returns the d d m structure remote service. - * - * @return the d d m structure remote service - */ - public com.liferay.portlet.dynamicdatamapping.service.DDMStructureService getDDMStructureService() { - return ddmStructureService; - } - - /** - * Sets the d d m structure remote service. - * - * @param ddmStructureService the d d m structure remote service - */ - public void setDDMStructureService( - com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService) { - this.ddmStructureService = ddmStructureService; - } - - /** - * Returns the d d m structure persistence. - * - * @return the d d m structure persistence - */ - public DDMStructurePersistence getDDMStructurePersistence() { - return ddmStructurePersistence; - } - - /** - * Sets the d d m structure persistence. - * - * @param ddmStructurePersistence the d d m structure persistence - */ - public void setDDMStructurePersistence( - DDMStructurePersistence ddmStructurePersistence) { - this.ddmStructurePersistence = ddmStructurePersistence; - } - - /** - * Returns the d d m structure finder. - * - * @return the d d m structure finder - */ - public DDMStructureFinder getDDMStructureFinder() { - return ddmStructureFinder; - } - - /** - * Sets the d d m structure finder. - * - * @param ddmStructureFinder the d d m structure finder - */ - public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) { - this.ddmStructureFinder = ddmStructureFinder; - } - /** * Returns the document library file version local service. * @@ -786,14 +709,6 @@ protected void runSQL(String sql) { protected DLFileEntryPersistence dlFileEntryPersistence; @BeanReference(type = DLFileEntryFinder.class) protected DLFileEntryFinder dlFileEntryFinder; - @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService.class) - protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService; - @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureService.class) - protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService; - @BeanReference(type = DDMStructurePersistence.class) - protected DDMStructurePersistence ddmStructurePersistence; - @BeanReference(type = DDMStructureFinder.class) - protected DDMStructureFinder ddmStructureFinder; @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService.class) protected com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService dlFileVersionLocalService; @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileVersionService.class) diff --git a/portal-impl/src/com/liferay/portlet/documentlibrary/service/persistence/impl/DLFileEntryTypePersistenceImpl.java b/portal-impl/src/com/liferay/portlet/documentlibrary/service/persistence/impl/DLFileEntryTypePersistenceImpl.java index 2bf8a906f5ff2f..70629804428fb9 100644 --- a/portal-impl/src/com/liferay/portlet/documentlibrary/service/persistence/impl/DLFileEntryTypePersistenceImpl.java +++ b/portal-impl/src/com/liferay/portlet/documentlibrary/service/persistence/impl/DLFileEntryTypePersistenceImpl.java @@ -49,7 +49,6 @@ import com.liferay.portlet.documentlibrary.model.impl.DLFileEntryTypeModelImpl; import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypePersistence; import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence; -import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence; import java.io.Serializable; @@ -3233,8 +3232,6 @@ protected DLFileEntryType removeImpl(DLFileEntryType dlFileEntryType) { dlFileEntryTypeToDLFolderTableMapper.deleteLeftPrimaryKeyTableMappings(dlFileEntryType.getPrimaryKey()); - dlFileEntryTypeToDDMStructureTableMapper.deleteLeftPrimaryKeyTableMappings(dlFileEntryType.getPrimaryKey()); - Session session = null; try { @@ -4050,285 +4047,6 @@ public void setDLFolders(long pk, } } - /** - * Returns the primaryKeys of d d m structures associated with the document library file entry type. - * - * @param pk the primary key of the document library file entry type - * @return long[] of the primaryKeys of d d m structures associated with the document library file entry type - */ - @Override - public long[] getDDMStructurePrimaryKeys(long pk) { - long[] pks = dlFileEntryTypeToDDMStructureTableMapper.getRightPrimaryKeys(pk); - - return pks.clone(); - } - - /** - * Returns all the d d m structures associated with the document library file entry type. - * - * @param pk the primary key of the document library file entry type - * @return the d d m structures associated with the document library file entry type - */ - @Override - public List getDDMStructures( - long pk) { - return getDDMStructures(pk, QueryUtil.ALL_POS, QueryUtil.ALL_POS); - } - - /** - * Returns a range of all the d d m structures associated with the document library file entry type. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryTypeModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param pk the primary key of the document library file entry type - * @param start the lower bound of the range of document library file entry types - * @param end the upper bound of the range of document library file entry types (not inclusive) - * @return the range of d d m structures associated with the document library file entry type - */ - @Override - public List getDDMStructures( - long pk, int start, int end) { - return getDDMStructures(pk, start, end, null); - } - - /** - * Returns an ordered range of all the d d m structures associated with the document library file entry type. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryTypeModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param pk the primary key of the document library file entry type - * @param start the lower bound of the range of document library file entry types - * @param end the upper bound of the range of document library file entry types (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of d d m structures associated with the document library file entry type - */ - @Override - public List getDDMStructures( - long pk, int start, int end, - OrderByComparator orderByComparator) { - return dlFileEntryTypeToDDMStructureTableMapper.getRightBaseModels(pk, - start, end, orderByComparator); - } - - /** - * Returns the number of d d m structures associated with the document library file entry type. - * - * @param pk the primary key of the document library file entry type - * @return the number of d d m structures associated with the document library file entry type - */ - @Override - public int getDDMStructuresSize(long pk) { - long[] pks = dlFileEntryTypeToDDMStructureTableMapper.getRightPrimaryKeys(pk); - - return pks.length; - } - - /** - * Returns true if the d d m structure is associated with the document library file entry type. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePK the primary key of the d d m structure - * @return true if the d d m structure is associated with the document library file entry type; false otherwise - */ - @Override - public boolean containsDDMStructure(long pk, long ddmStructurePK) { - return dlFileEntryTypeToDDMStructureTableMapper.containsTableMapping(pk, - ddmStructurePK); - } - - /** - * Returns true if the document library file entry type has any d d m structures associated with it. - * - * @param pk the primary key of the document library file entry type to check for associations with d d m structures - * @return true if the document library file entry type has any d d m structures associated with it; false otherwise - */ - @Override - public boolean containsDDMStructures(long pk) { - if (getDDMStructuresSize(pk) > 0) { - return true; - } - else { - return false; - } - } - - /** - * Adds an association between the document library file entry type and the d d m structure. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePK the primary key of the d d m structure - */ - @Override - public void addDDMStructure(long pk, long ddmStructurePK) { - dlFileEntryTypeToDDMStructureTableMapper.addTableMapping(pk, - ddmStructurePK); - } - - /** - * Adds an association between the document library file entry type and the d d m structure. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructure the d d m structure - */ - @Override - public void addDDMStructure(long pk, - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) { - dlFileEntryTypeToDDMStructureTableMapper.addTableMapping(pk, - ddmStructure.getPrimaryKey()); - } - - /** - * Adds an association between the document library file entry type and the d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePKs the primary keys of the d d m structures - */ - @Override - public void addDDMStructures(long pk, long[] ddmStructurePKs) { - for (long ddmStructurePK : ddmStructurePKs) { - dlFileEntryTypeToDDMStructureTableMapper.addTableMapping(pk, - ddmStructurePK); - } - } - - /** - * Adds an association between the document library file entry type and the d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructures the d d m structures - */ - @Override - public void addDDMStructures(long pk, - List ddmStructures) { - for (com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure : ddmStructures) { - dlFileEntryTypeToDDMStructureTableMapper.addTableMapping(pk, - ddmStructure.getPrimaryKey()); - } - } - - /** - * Clears all associations between the document library file entry type and its d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type to clear the associated d d m structures from - */ - @Override - public void clearDDMStructures(long pk) { - dlFileEntryTypeToDDMStructureTableMapper.deleteLeftPrimaryKeyTableMappings(pk); - } - - /** - * Removes the association between the document library file entry type and the d d m structure. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePK the primary key of the d d m structure - */ - @Override - public void removeDDMStructure(long pk, long ddmStructurePK) { - dlFileEntryTypeToDDMStructureTableMapper.deleteTableMapping(pk, - ddmStructurePK); - } - - /** - * Removes the association between the document library file entry type and the d d m structure. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructure the d d m structure - */ - @Override - public void removeDDMStructure(long pk, - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) { - dlFileEntryTypeToDDMStructureTableMapper.deleteTableMapping(pk, - ddmStructure.getPrimaryKey()); - } - - /** - * Removes the association between the document library file entry type and the d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePKs the primary keys of the d d m structures - */ - @Override - public void removeDDMStructures(long pk, long[] ddmStructurePKs) { - for (long ddmStructurePK : ddmStructurePKs) { - dlFileEntryTypeToDDMStructureTableMapper.deleteTableMapping(pk, - ddmStructurePK); - } - } - - /** - * Removes the association between the document library file entry type and the d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructures the d d m structures - */ - @Override - public void removeDDMStructures(long pk, - List ddmStructures) { - for (com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure : ddmStructures) { - dlFileEntryTypeToDDMStructureTableMapper.deleteTableMapping(pk, - ddmStructure.getPrimaryKey()); - } - } - - /** - * Sets the d d m structures associated with the document library file entry type, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePKs the primary keys of the d d m structures to be associated with the document library file entry type - */ - @Override - public void setDDMStructures(long pk, long[] ddmStructurePKs) { - Set newDDMStructurePKsSet = SetUtil.fromArray(ddmStructurePKs); - Set oldDDMStructurePKsSet = SetUtil.fromArray(dlFileEntryTypeToDDMStructureTableMapper.getRightPrimaryKeys( - pk)); - - Set removeDDMStructurePKsSet = new HashSet(oldDDMStructurePKsSet); - - removeDDMStructurePKsSet.removeAll(newDDMStructurePKsSet); - - for (long removeDDMStructurePK : removeDDMStructurePKsSet) { - dlFileEntryTypeToDDMStructureTableMapper.deleteTableMapping(pk, - removeDDMStructurePK); - } - - newDDMStructurePKsSet.removeAll(oldDDMStructurePKsSet); - - for (long newDDMStructurePK : newDDMStructurePKsSet) { - dlFileEntryTypeToDDMStructureTableMapper.addTableMapping(pk, - newDDMStructurePK); - } - } - - /** - * Sets the d d m structures associated with the document library file entry type, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructures the d d m structures to be associated with the document library file entry type - */ - @Override - public void setDDMStructures(long pk, - List ddmStructures) { - try { - long[] ddmStructurePKs = new long[ddmStructures.size()]; - - for (int i = 0; i < ddmStructures.size(); i++) { - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure = - ddmStructures.get(i); - - ddmStructurePKs[i] = ddmStructure.getPrimaryKey(); - } - - setDDMStructures(pk, ddmStructurePKs); - } - catch (Exception e) { - throw processException(e); - } - } - @Override protected Set getBadColumnNames() { return _badColumnNames; @@ -4353,9 +4071,6 @@ protected int getColumnType(String columnName) { public void afterPropertiesSet() { dlFileEntryTypeToDLFolderTableMapper = TableMapperFactory.getTableMapper("DLFileEntryTypes_DLFolders", "fileEntryTypeId", "folderId", this, dlFolderPersistence); - - dlFileEntryTypeToDDMStructureTableMapper = TableMapperFactory.getTableMapper("DLFileEntryTypes_DDMStructures", - "fileEntryTypeId", "structureId", this, ddmStructurePersistence); } public void destroy() { @@ -4365,15 +4080,11 @@ public void destroy() { FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); TableMapperFactory.removeTableMapper("DLFileEntryTypes_DLFolders"); - TableMapperFactory.removeTableMapper("DLFileEntryTypes_DDMStructures"); } @BeanReference(type = DLFolderPersistence.class) protected DLFolderPersistence dlFolderPersistence; protected TableMapper dlFileEntryTypeToDLFolderTableMapper; - @BeanReference(type = DDMStructurePersistence.class) - protected DDMStructurePersistence ddmStructurePersistence; - protected TableMapper dlFileEntryTypeToDDMStructureTableMapper; private static final String _SQL_SELECT_DLFILEENTRYTYPE = "SELECT dlFileEntryType FROM DLFileEntryType dlFileEntryType"; private static final String _SQL_SELECT_DLFILEENTRYTYPE_WHERE_PKS_IN = "SELECT dlFileEntryType FROM DLFileEntryType dlFileEntryType WHERE fileEntryTypeId IN ("; private static final String _SQL_SELECT_DLFILEENTRYTYPE_WHERE = "SELECT dlFileEntryType FROM DLFileEntryType dlFileEntryType WHERE "; diff --git a/portal-impl/src/com/liferay/portlet/dynamicdatamapping/model/impl/DDMStructureModelImpl.java b/portal-impl/src/com/liferay/portlet/dynamicdatamapping/model/impl/DDMStructureModelImpl.java index 0b1cf9d6fb1788..7cfbb03c474a92 100644 --- a/portal-impl/src/com/liferay/portlet/dynamicdatamapping/model/impl/DDMStructureModelImpl.java +++ b/portal-impl/src/com/liferay/portlet/dynamicdatamapping/model/impl/DDMStructureModelImpl.java @@ -204,19 +204,6 @@ public static List toModels(DDMStructureSoap[] soapModels) { return models; } - public static final String MAPPING_TABLE_DLFILEENTRYTYPES_DDMSTRUCTURES_NAME = - "DLFileEntryTypes_DDMStructures"; - public static final Object[][] MAPPING_TABLE_DLFILEENTRYTYPES_DDMSTRUCTURES_COLUMNS = - { - { "structureId", Types.BIGINT }, - { "fileEntryTypeId", Types.BIGINT } - }; - public static final String MAPPING_TABLE_DLFILEENTRYTYPES_DDMSTRUCTURES_SQL_CREATE = - "create table DLFileEntryTypes_DDMStructures (structureId LONG not null,fileEntryTypeId LONG not null,primary key (structureId, fileEntryTypeId))"; - public static final boolean FINDER_CACHE_ENABLED_DLFILEENTRYTYPES_DDMSTRUCTURES = - GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get( - "value.object.finder.cache.enabled.DLFileEntryTypes_DDMStructures"), - true); public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get( "lock.expiration.time.com.liferay.portlet.dynamicdatamapping.model.DDMStructure")); diff --git a/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/base/DDMStructureLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/base/DDMStructureLocalServiceBaseImpl.java index 80f486d35cc37c..aba737c177c2bf 100644 --- a/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/base/DDMStructureLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/base/DDMStructureLocalServiceBaseImpl.java @@ -46,8 +46,6 @@ import com.liferay.portal.service.persistence.UserPersistence; import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypeFinder; -import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypePersistence; import com.liferay.portlet.dynamicdatamapping.model.DDMStructure; import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService; import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder; @@ -441,153 +439,6 @@ public DDMStructure updateDDMStructure(DDMStructure ddmStructure) { return ddmStructurePersistence.update(ddmStructure); } - /** - */ - @Override - public void addDLFileEntryTypeDDMStructure(long fileEntryTypeId, - long structureId) { - dlFileEntryTypePersistence.addDDMStructure(fileEntryTypeId, structureId); - } - - /** - */ - @Override - public void addDLFileEntryTypeDDMStructure(long fileEntryTypeId, - DDMStructure ddmStructure) { - dlFileEntryTypePersistence.addDDMStructure(fileEntryTypeId, ddmStructure); - } - - /** - */ - @Override - public void addDLFileEntryTypeDDMStructures(long fileEntryTypeId, - long[] structureIds) { - dlFileEntryTypePersistence.addDDMStructures(fileEntryTypeId, - structureIds); - } - - /** - */ - @Override - public void addDLFileEntryTypeDDMStructures(long fileEntryTypeId, - List DDMStructures) { - dlFileEntryTypePersistence.addDDMStructures(fileEntryTypeId, - DDMStructures); - } - - /** - */ - @Override - public void clearDLFileEntryTypeDDMStructures(long fileEntryTypeId) { - dlFileEntryTypePersistence.clearDDMStructures(fileEntryTypeId); - } - - /** - */ - @Override - public void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId, - long structureId) { - dlFileEntryTypePersistence.removeDDMStructure(fileEntryTypeId, - structureId); - } - - /** - */ - @Override - public void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId, - DDMStructure ddmStructure) { - dlFileEntryTypePersistence.removeDDMStructure(fileEntryTypeId, - ddmStructure); - } - - /** - */ - @Override - public void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId, - long[] structureIds) { - dlFileEntryTypePersistence.removeDDMStructures(fileEntryTypeId, - structureIds); - } - - /** - */ - @Override - public void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId, - List DDMStructures) { - dlFileEntryTypePersistence.removeDDMStructures(fileEntryTypeId, - DDMStructures); - } - - /** - * Returns the fileEntryTypeIds of the document library file entry types associated with the d d m structure. - * - * @param structureId the structureId of the d d m structure - * @return long[] the fileEntryTypeIds of document library file entry types associated with the d d m structure - */ - @Override - public long[] getDLFileEntryTypePrimaryKeys(long structureId) { - return ddmStructurePersistence.getDLFileEntryTypePrimaryKeys(structureId); - } - - /** - */ - @Override - public List getDLFileEntryTypeDDMStructures( - long fileEntryTypeId) { - return dlFileEntryTypePersistence.getDDMStructures(fileEntryTypeId); - } - - /** - */ - @Override - public List getDLFileEntryTypeDDMStructures( - long fileEntryTypeId, int start, int end) { - return dlFileEntryTypePersistence.getDDMStructures(fileEntryTypeId, - start, end); - } - - /** - */ - @Override - public List getDLFileEntryTypeDDMStructures( - long fileEntryTypeId, int start, int end, - OrderByComparator orderByComparator) { - return dlFileEntryTypePersistence.getDDMStructures(fileEntryTypeId, - start, end, orderByComparator); - } - - /** - */ - @Override - public int getDLFileEntryTypeDDMStructuresCount(long fileEntryTypeId) { - return dlFileEntryTypePersistence.getDDMStructuresSize(fileEntryTypeId); - } - - /** - */ - @Override - public boolean hasDLFileEntryTypeDDMStructure(long fileEntryTypeId, - long structureId) { - return dlFileEntryTypePersistence.containsDDMStructure(fileEntryTypeId, - structureId); - } - - /** - */ - @Override - public boolean hasDLFileEntryTypeDDMStructures(long fileEntryTypeId) { - return dlFileEntryTypePersistence.containsDDMStructures(fileEntryTypeId); - } - - /** - */ - @Override - public void setDLFileEntryTypeDDMStructures(long fileEntryTypeId, - long[] structureIds) { - dlFileEntryTypePersistence.setDDMStructures(fileEntryTypeId, - structureIds); - } - /** * Returns the d d m structure local service. * @@ -944,82 +795,6 @@ public void setUserFinder(UserFinder userFinder) { this.userFinder = userFinder; } - /** - * Returns the document library file entry type local service. - * - * @return the document library file entry type local service - */ - public com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService getDLFileEntryTypeLocalService() { - return dlFileEntryTypeLocalService; - } - - /** - * Sets the document library file entry type local service. - * - * @param dlFileEntryTypeLocalService the document library file entry type local service - */ - public void setDLFileEntryTypeLocalService( - com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService dlFileEntryTypeLocalService) { - this.dlFileEntryTypeLocalService = dlFileEntryTypeLocalService; - } - - /** - * Returns the document library file entry type remote service. - * - * @return the document library file entry type remote service - */ - public com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService getDLFileEntryTypeService() { - return dlFileEntryTypeService; - } - - /** - * Sets the document library file entry type remote service. - * - * @param dlFileEntryTypeService the document library file entry type remote service - */ - public void setDLFileEntryTypeService( - com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService dlFileEntryTypeService) { - this.dlFileEntryTypeService = dlFileEntryTypeService; - } - - /** - * Returns the document library file entry type persistence. - * - * @return the document library file entry type persistence - */ - public DLFileEntryTypePersistence getDLFileEntryTypePersistence() { - return dlFileEntryTypePersistence; - } - - /** - * Sets the document library file entry type persistence. - * - * @param dlFileEntryTypePersistence the document library file entry type persistence - */ - public void setDLFileEntryTypePersistence( - DLFileEntryTypePersistence dlFileEntryTypePersistence) { - this.dlFileEntryTypePersistence = dlFileEntryTypePersistence; - } - - /** - * Returns the document library file entry type finder. - * - * @return the document library file entry type finder - */ - public DLFileEntryTypeFinder getDLFileEntryTypeFinder() { - return dlFileEntryTypeFinder; - } - - /** - * Sets the document library file entry type finder. - * - * @param dlFileEntryTypeFinder the document library file entry type finder - */ - public void setDLFileEntryTypeFinder( - DLFileEntryTypeFinder dlFileEntryTypeFinder) { - this.dlFileEntryTypeFinder = dlFileEntryTypeFinder; - } - /** * Returns the d d m structure layout local service. * @@ -1328,14 +1103,6 @@ protected void runSQL(String sql) { protected UserPersistence userPersistence; @BeanReference(type = UserFinder.class) protected UserFinder userFinder; - @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService.class) - protected com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService dlFileEntryTypeLocalService; - @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService.class) - protected com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService dlFileEntryTypeService; - @BeanReference(type = DLFileEntryTypePersistence.class) - protected DLFileEntryTypePersistence dlFileEntryTypePersistence; - @BeanReference(type = DLFileEntryTypeFinder.class) - protected DLFileEntryTypeFinder dlFileEntryTypeFinder; @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLayoutLocalService.class) protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLayoutLocalService ddmStructureLayoutLocalService; @BeanReference(type = DDMStructureLayoutPersistence.class) diff --git a/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/base/DDMStructureServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/base/DDMStructureServiceBaseImpl.java index 3dfc839a9635cf..ac3d61d28b034f 100644 --- a/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/base/DDMStructureServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/base/DDMStructureServiceBaseImpl.java @@ -30,8 +30,6 @@ import com.liferay.portal.service.persistence.UserPersistence; import com.liferay.portal.util.PortalUtil; -import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypeFinder; -import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypePersistence; import com.liferay.portlet.dynamicdatamapping.model.DDMStructure; import com.liferay.portlet.dynamicdatamapping.service.DDMStructureService; import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder; @@ -419,82 +417,6 @@ public void setUserFinder(UserFinder userFinder) { this.userFinder = userFinder; } - /** - * Returns the document library file entry type local service. - * - * @return the document library file entry type local service - */ - public com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService getDLFileEntryTypeLocalService() { - return dlFileEntryTypeLocalService; - } - - /** - * Sets the document library file entry type local service. - * - * @param dlFileEntryTypeLocalService the document library file entry type local service - */ - public void setDLFileEntryTypeLocalService( - com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService dlFileEntryTypeLocalService) { - this.dlFileEntryTypeLocalService = dlFileEntryTypeLocalService; - } - - /** - * Returns the document library file entry type remote service. - * - * @return the document library file entry type remote service - */ - public com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService getDLFileEntryTypeService() { - return dlFileEntryTypeService; - } - - /** - * Sets the document library file entry type remote service. - * - * @param dlFileEntryTypeService the document library file entry type remote service - */ - public void setDLFileEntryTypeService( - com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService dlFileEntryTypeService) { - this.dlFileEntryTypeService = dlFileEntryTypeService; - } - - /** - * Returns the document library file entry type persistence. - * - * @return the document library file entry type persistence - */ - public DLFileEntryTypePersistence getDLFileEntryTypePersistence() { - return dlFileEntryTypePersistence; - } - - /** - * Sets the document library file entry type persistence. - * - * @param dlFileEntryTypePersistence the document library file entry type persistence - */ - public void setDLFileEntryTypePersistence( - DLFileEntryTypePersistence dlFileEntryTypePersistence) { - this.dlFileEntryTypePersistence = dlFileEntryTypePersistence; - } - - /** - * Returns the document library file entry type finder. - * - * @return the document library file entry type finder - */ - public DLFileEntryTypeFinder getDLFileEntryTypeFinder() { - return dlFileEntryTypeFinder; - } - - /** - * Sets the document library file entry type finder. - * - * @param dlFileEntryTypeFinder the document library file entry type finder - */ - public void setDLFileEntryTypeFinder( - DLFileEntryTypeFinder dlFileEntryTypeFinder) { - this.dlFileEntryTypeFinder = dlFileEntryTypeFinder; - } - /** * Returns the d d m structure layout local service. * @@ -799,14 +721,6 @@ protected void runSQL(String sql) { protected UserPersistence userPersistence; @BeanReference(type = UserFinder.class) protected UserFinder userFinder; - @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService.class) - protected com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService dlFileEntryTypeLocalService; - @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService.class) - protected com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService dlFileEntryTypeService; - @BeanReference(type = DLFileEntryTypePersistence.class) - protected DLFileEntryTypePersistence dlFileEntryTypePersistence; - @BeanReference(type = DLFileEntryTypeFinder.class) - protected DLFileEntryTypeFinder dlFileEntryTypeFinder; @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLayoutLocalService.class) protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLayoutLocalService ddmStructureLayoutLocalService; @BeanReference(type = DDMStructureLayoutPersistence.class) diff --git a/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/persistence/impl/DDMStructureLinkPersistenceImpl.java b/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/persistence/impl/DDMStructureLinkPersistenceImpl.java index b6eb3c7ee507af..132ae43c0d4cea 100644 --- a/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/persistence/impl/DDMStructureLinkPersistenceImpl.java +++ b/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/persistence/impl/DDMStructureLinkPersistenceImpl.java @@ -83,6 +83,491 @@ public class DDMStructureLinkPersistenceImpl extends BasePersistenceImpl findByClassNameId(long classNameId) { + return findByClassNameId(classNameId, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the d d m structure links where classNameId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureLinkModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param classNameId the class name ID + * @param start the lower bound of the range of d d m structure links + * @param end the upper bound of the range of d d m structure links (not inclusive) + * @return the range of matching d d m structure links + */ + @Override + public List findByClassNameId(long classNameId, + int start, int end) { + return findByClassNameId(classNameId, start, end, null); + } + + /** + * Returns an ordered range of all the d d m structure links where classNameId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureLinkModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param classNameId the class name ID + * @param start the lower bound of the range of d d m structure links + * @param end the upper bound of the range of d d m structure links (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching d d m structure links + */ + @Override + public List findByClassNameId(long classNameId, + int start, int end, + OrderByComparator orderByComparator) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CLASSNAMEID; + finderArgs = new Object[] { classNameId }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_CLASSNAMEID; + finderArgs = new Object[] { classNameId, start, end, orderByComparator }; + } + + List list = (List)FinderCacheUtil.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (DDMStructureLink ddmStructureLink : list) { + if ((classNameId != ddmStructureLink.getClassNameId())) { + list = null; + + break; + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_DDMSTRUCTURELINK_WHERE); + + query.append(_FINDER_COLUMN_CLASSNAMEID_CLASSNAMEID_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(DDMStructureLinkModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(classNameId); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + FinderCacheUtil.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first d d m structure link in the ordered set where classNameId = ?. + * + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching d d m structure link + * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found + */ + @Override + public DDMStructureLink findByClassNameId_First(long classNameId, + OrderByComparator orderByComparator) + throws NoSuchStructureLinkException { + DDMStructureLink ddmStructureLink = fetchByClassNameId_First(classNameId, + orderByComparator); + + if (ddmStructureLink != null) { + return ddmStructureLink; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("classNameId="); + msg.append(classNameId); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchStructureLinkException(msg.toString()); + } + + /** + * Returns the first d d m structure link in the ordered set where classNameId = ?. + * + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching d d m structure link, or null if a matching d d m structure link could not be found + */ + @Override + public DDMStructureLink fetchByClassNameId_First(long classNameId, + OrderByComparator orderByComparator) { + List list = findByClassNameId(classNameId, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last d d m structure link in the ordered set where classNameId = ?. + * + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching d d m structure link + * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found + */ + @Override + public DDMStructureLink findByClassNameId_Last(long classNameId, + OrderByComparator orderByComparator) + throws NoSuchStructureLinkException { + DDMStructureLink ddmStructureLink = fetchByClassNameId_Last(classNameId, + orderByComparator); + + if (ddmStructureLink != null) { + return ddmStructureLink; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("classNameId="); + msg.append(classNameId); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchStructureLinkException(msg.toString()); + } + + /** + * Returns the last d d m structure link in the ordered set where classNameId = ?. + * + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching d d m structure link, or null if a matching d d m structure link could not be found + */ + @Override + public DDMStructureLink fetchByClassNameId_Last(long classNameId, + OrderByComparator orderByComparator) { + int count = countByClassNameId(classNameId); + + if (count == 0) { + return null; + } + + List list = findByClassNameId(classNameId, count - 1, + count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the d d m structure links before and after the current d d m structure link in the ordered set where classNameId = ?. + * + * @param structureLinkId the primary key of the current d d m structure link + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next d d m structure link + * @throws NoSuchStructureLinkException if a d d m structure link with the primary key could not be found + */ + @Override + public DDMStructureLink[] findByClassNameId_PrevAndNext( + long structureLinkId, long classNameId, + OrderByComparator orderByComparator) + throws NoSuchStructureLinkException { + DDMStructureLink ddmStructureLink = findByPrimaryKey(structureLinkId); + + Session session = null; + + try { + session = openSession(); + + DDMStructureLink[] array = new DDMStructureLinkImpl[3]; + + array[0] = getByClassNameId_PrevAndNext(session, ddmStructureLink, + classNameId, orderByComparator, true); + + array[1] = ddmStructureLink; + + array[2] = getByClassNameId_PrevAndNext(session, ddmStructureLink, + classNameId, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected DDMStructureLink getByClassNameId_PrevAndNext(Session session, + DDMStructureLink ddmStructureLink, long classNameId, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByFields().length * 6)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_DDMSTRUCTURELINK_WHERE); + + query.append(_FINDER_COLUMN_CLASSNAMEID_CLASSNAMEID_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(DDMStructureLinkModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(classNameId); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(ddmStructureLink); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the d d m structure links where classNameId = ? from the database. + * + * @param classNameId the class name ID + */ + @Override + public void removeByClassNameId(long classNameId) { + for (DDMStructureLink ddmStructureLink : findByClassNameId( + classNameId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(ddmStructureLink); + } + } + + /** + * Returns the number of d d m structure links where classNameId = ?. + * + * @param classNameId the class name ID + * @return the number of matching d d m structure links + */ + @Override + public int countByClassNameId(long classNameId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_CLASSNAMEID; + + Object[] finderArgs = new Object[] { classNameId }; + + Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, + this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_DDMSTRUCTURELINK_WHERE); + + query.append(_FINDER_COLUMN_CLASSNAMEID_CLASSNAMEID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(classNameId); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_CLASSNAMEID_CLASSNAMEID_2 = "ddmStructureLink.classNameId = ?"; public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_STRUCTUREID = new FinderPath(DDMStructureLinkModelImpl.ENTITY_CACHE_ENABLED, DDMStructureLinkModelImpl.FINDER_CACHE_ENABLED, @@ -1624,6 +2109,25 @@ public DDMStructureLink updateImpl(DDMStructureLink ddmStructureLink) { } else { + if ((ddmStructureLinkModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CLASSNAMEID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + ddmStructureLinkModelImpl.getOriginalClassNameId() + }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CLASSNAMEID, + args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CLASSNAMEID, + args); + + args = new Object[] { ddmStructureLinkModelImpl.getClassNameId() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CLASSNAMEID, + args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CLASSNAMEID, + args); + } + if ((ddmStructureLinkModelImpl.getColumnBitmask() & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_STRUCTUREID.getColumnBitmask()) != 0) { Object[] args = new Object[] { diff --git a/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/persistence/impl/DDMStructurePersistenceImpl.java b/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/persistence/impl/DDMStructurePersistenceImpl.java index d7c25580dea857..01cbc1fdb324cc 100644 --- a/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/persistence/impl/DDMStructurePersistenceImpl.java +++ b/portal-impl/src/com/liferay/portlet/dynamicdatamapping/service/persistence/impl/DDMStructurePersistenceImpl.java @@ -16,7 +16,6 @@ import aQute.bnd.annotation.ProviderType; -import com.liferay.portal.kernel.bean.BeanReference; import com.liferay.portal.kernel.dao.orm.EntityCacheUtil; import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; import com.liferay.portal.kernel.dao.orm.FinderPath; @@ -40,10 +39,7 @@ import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContextThreadLocal; import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; -import com.liferay.portal.service.persistence.impl.TableMapper; -import com.liferay.portal.service.persistence.impl.TableMapperFactory; -import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypePersistence; import com.liferay.portlet.dynamicdatamapping.NoSuchStructureException; import com.liferay.portlet.dynamicdatamapping.model.DDMStructure; import com.liferay.portlet.dynamicdatamapping.model.impl.DDMStructureImpl; @@ -8642,8 +8638,6 @@ public DDMStructure remove(Serializable primaryKey) protected DDMStructure removeImpl(DDMStructure ddmStructure) { ddmStructure = toUnwrappedModel(ddmStructure); - ddmStructureToDLFileEntryTypeTableMapper.deleteLeftPrimaryKeyTableMappings(ddmStructure.getPrimaryKey()); - Session session = null; try { @@ -9333,285 +9327,6 @@ public int countAll() { return count.intValue(); } - /** - * Returns the primaryKeys of document library file entry types associated with the d d m structure. - * - * @param pk the primary key of the d d m structure - * @return long[] of the primaryKeys of document library file entry types associated with the d d m structure - */ - @Override - public long[] getDLFileEntryTypePrimaryKeys(long pk) { - long[] pks = ddmStructureToDLFileEntryTypeTableMapper.getRightPrimaryKeys(pk); - - return pks.clone(); - } - - /** - * Returns all the document library file entry types associated with the d d m structure. - * - * @param pk the primary key of the d d m structure - * @return the document library file entry types associated with the d d m structure - */ - @Override - public List getDLFileEntryTypes( - long pk) { - return getDLFileEntryTypes(pk, QueryUtil.ALL_POS, QueryUtil.ALL_POS); - } - - /** - * Returns a range of all the document library file entry types associated with the d d m structure. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param pk the primary key of the d d m structure - * @param start the lower bound of the range of d d m structures - * @param end the upper bound of the range of d d m structures (not inclusive) - * @return the range of document library file entry types associated with the d d m structure - */ - @Override - public List getDLFileEntryTypes( - long pk, int start, int end) { - return getDLFileEntryTypes(pk, start, end, null); - } - - /** - * Returns an ordered range of all the document library file entry types associated with the d d m structure. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param pk the primary key of the d d m structure - * @param start the lower bound of the range of d d m structures - * @param end the upper bound of the range of d d m structures (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of document library file entry types associated with the d d m structure - */ - @Override - public List getDLFileEntryTypes( - long pk, int start, int end, - OrderByComparator orderByComparator) { - return ddmStructureToDLFileEntryTypeTableMapper.getRightBaseModels(pk, - start, end, orderByComparator); - } - - /** - * Returns the number of document library file entry types associated with the d d m structure. - * - * @param pk the primary key of the d d m structure - * @return the number of document library file entry types associated with the d d m structure - */ - @Override - public int getDLFileEntryTypesSize(long pk) { - long[] pks = ddmStructureToDLFileEntryTypeTableMapper.getRightPrimaryKeys(pk); - - return pks.length; - } - - /** - * Returns true if the document library file entry type is associated with the d d m structure. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePK the primary key of the document library file entry type - * @return true if the document library file entry type is associated with the d d m structure; false otherwise - */ - @Override - public boolean containsDLFileEntryType(long pk, long dlFileEntryTypePK) { - return ddmStructureToDLFileEntryTypeTableMapper.containsTableMapping(pk, - dlFileEntryTypePK); - } - - /** - * Returns true if the d d m structure has any document library file entry types associated with it. - * - * @param pk the primary key of the d d m structure to check for associations with document library file entry types - * @return true if the d d m structure has any document library file entry types associated with it; false otherwise - */ - @Override - public boolean containsDLFileEntryTypes(long pk) { - if (getDLFileEntryTypesSize(pk) > 0) { - return true; - } - else { - return false; - } - } - - /** - * Adds an association between the d d m structure and the document library file entry type. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePK the primary key of the document library file entry type - */ - @Override - public void addDLFileEntryType(long pk, long dlFileEntryTypePK) { - ddmStructureToDLFileEntryTypeTableMapper.addTableMapping(pk, - dlFileEntryTypePK); - } - - /** - * Adds an association between the d d m structure and the document library file entry type. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryType the document library file entry type - */ - @Override - public void addDLFileEntryType(long pk, - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType) { - ddmStructureToDLFileEntryTypeTableMapper.addTableMapping(pk, - dlFileEntryType.getPrimaryKey()); - } - - /** - * Adds an association between the d d m structure and the document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePKs the primary keys of the document library file entry types - */ - @Override - public void addDLFileEntryTypes(long pk, long[] dlFileEntryTypePKs) { - for (long dlFileEntryTypePK : dlFileEntryTypePKs) { - ddmStructureToDLFileEntryTypeTableMapper.addTableMapping(pk, - dlFileEntryTypePK); - } - } - - /** - * Adds an association between the d d m structure and the document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypes the document library file entry types - */ - @Override - public void addDLFileEntryTypes(long pk, - List dlFileEntryTypes) { - for (com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType : dlFileEntryTypes) { - ddmStructureToDLFileEntryTypeTableMapper.addTableMapping(pk, - dlFileEntryType.getPrimaryKey()); - } - } - - /** - * Clears all associations between the d d m structure and its document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure to clear the associated document library file entry types from - */ - @Override - public void clearDLFileEntryTypes(long pk) { - ddmStructureToDLFileEntryTypeTableMapper.deleteLeftPrimaryKeyTableMappings(pk); - } - - /** - * Removes the association between the d d m structure and the document library file entry type. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePK the primary key of the document library file entry type - */ - @Override - public void removeDLFileEntryType(long pk, long dlFileEntryTypePK) { - ddmStructureToDLFileEntryTypeTableMapper.deleteTableMapping(pk, - dlFileEntryTypePK); - } - - /** - * Removes the association between the d d m structure and the document library file entry type. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryType the document library file entry type - */ - @Override - public void removeDLFileEntryType(long pk, - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType) { - ddmStructureToDLFileEntryTypeTableMapper.deleteTableMapping(pk, - dlFileEntryType.getPrimaryKey()); - } - - /** - * Removes the association between the d d m structure and the document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePKs the primary keys of the document library file entry types - */ - @Override - public void removeDLFileEntryTypes(long pk, long[] dlFileEntryTypePKs) { - for (long dlFileEntryTypePK : dlFileEntryTypePKs) { - ddmStructureToDLFileEntryTypeTableMapper.deleteTableMapping(pk, - dlFileEntryTypePK); - } - } - - /** - * Removes the association between the d d m structure and the document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypes the document library file entry types - */ - @Override - public void removeDLFileEntryTypes(long pk, - List dlFileEntryTypes) { - for (com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType : dlFileEntryTypes) { - ddmStructureToDLFileEntryTypeTableMapper.deleteTableMapping(pk, - dlFileEntryType.getPrimaryKey()); - } - } - - /** - * Sets the document library file entry types associated with the d d m structure, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePKs the primary keys of the document library file entry types to be associated with the d d m structure - */ - @Override - public void setDLFileEntryTypes(long pk, long[] dlFileEntryTypePKs) { - Set newDLFileEntryTypePKsSet = SetUtil.fromArray(dlFileEntryTypePKs); - Set oldDLFileEntryTypePKsSet = SetUtil.fromArray(ddmStructureToDLFileEntryTypeTableMapper.getRightPrimaryKeys( - pk)); - - Set removeDLFileEntryTypePKsSet = new HashSet(oldDLFileEntryTypePKsSet); - - removeDLFileEntryTypePKsSet.removeAll(newDLFileEntryTypePKsSet); - - for (long removeDLFileEntryTypePK : removeDLFileEntryTypePKsSet) { - ddmStructureToDLFileEntryTypeTableMapper.deleteTableMapping(pk, - removeDLFileEntryTypePK); - } - - newDLFileEntryTypePKsSet.removeAll(oldDLFileEntryTypePKsSet); - - for (long newDLFileEntryTypePK : newDLFileEntryTypePKsSet) { - ddmStructureToDLFileEntryTypeTableMapper.addTableMapping(pk, - newDLFileEntryTypePK); - } - } - - /** - * Sets the document library file entry types associated with the d d m structure, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypes the document library file entry types to be associated with the d d m structure - */ - @Override - public void setDLFileEntryTypes(long pk, - List dlFileEntryTypes) { - try { - long[] dlFileEntryTypePKs = new long[dlFileEntryTypes.size()]; - - for (int i = 0; i < dlFileEntryTypes.size(); i++) { - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType = - dlFileEntryTypes.get(i); - - dlFileEntryTypePKs[i] = dlFileEntryType.getPrimaryKey(); - } - - setDLFileEntryTypes(pk, dlFileEntryTypePKs); - } - catch (Exception e) { - throw processException(e); - } - } - @Override protected Set getBadColumnNames() { return _badColumnNames; @@ -9633,9 +9348,6 @@ protected int getColumnType(String columnName) { * Initializes the d d m structure persistence. */ public void afterPropertiesSet() { - ddmStructureToDLFileEntryTypeTableMapper = TableMapperFactory.getTableMapper("DLFileEntryTypes_DDMStructures", - "structureId", "fileEntryTypeId", this, - dlFileEntryTypePersistence); } public void destroy() { @@ -9643,13 +9355,8 @@ public void destroy() { FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY); FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - TableMapperFactory.removeTableMapper("DLFileEntryTypes_DDMStructures"); } - @BeanReference(type = DLFileEntryTypePersistence.class) - protected DLFileEntryTypePersistence dlFileEntryTypePersistence; - protected TableMapper ddmStructureToDLFileEntryTypeTableMapper; private static final String _SQL_SELECT_DDMSTRUCTURE = "SELECT ddmStructure FROM DDMStructure ddmStructure"; private static final String _SQL_SELECT_DDMSTRUCTURE_WHERE_PKS_IN = "SELECT ddmStructure FROM DDMStructure ddmStructure WHERE structureId IN ("; private static final String _SQL_SELECT_DDMSTRUCTURE_WHERE = "SELECT ddmStructure FROM DDMStructure ddmStructure WHERE "; diff --git a/portal-impl/test/integration/com/liferay/portlet/dynamicdatamapping/service/persistence/test/DDMStructureLinkPersistenceTest.java b/portal-impl/test/integration/com/liferay/portlet/dynamicdatamapping/service/persistence/test/DDMStructureLinkPersistenceTest.java index 18b0278df78274..6d73367bb2d786 100644 --- a/portal-impl/test/integration/com/liferay/portlet/dynamicdatamapping/service/persistence/test/DDMStructureLinkPersistenceTest.java +++ b/portal-impl/test/integration/com/liferay/portlet/dynamicdatamapping/service/persistence/test/DDMStructureLinkPersistenceTest.java @@ -134,6 +134,13 @@ public void testUpdateExisting() throws Exception { newDDMStructureLink.getStructureId()); } + @Test + public void testCountByClassNameId() throws Exception { + _persistence.countByClassNameId(RandomTestUtil.nextLong()); + + _persistence.countByClassNameId(0L); + } + @Test public void testCountByStructureId() throws Exception { _persistence.countByStructureId(RandomTestUtil.nextLong()); diff --git a/portal-service/src/com/liferay/portlet/documentlibrary/service/DLFileEntryTypeLocalService.java b/portal-service/src/com/liferay/portlet/documentlibrary/service/DLFileEntryTypeLocalService.java index d3333cf276dee8..dc8dc3652bf258 100644 --- a/portal-service/src/com/liferay/portlet/documentlibrary/service/DLFileEntryTypeLocalService.java +++ b/portal-service/src/com/liferay/portlet/documentlibrary/service/DLFileEntryTypeLocalService.java @@ -48,17 +48,8 @@ public interface DLFileEntryTypeLocalService extends BaseLocalService, * * Never modify or reference this interface directly. Always use {@link DLFileEntryTypeLocalServiceUtil} to access the document library file entry type local service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryTypeLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. */ - public void addDDMStructureDLFileEntryType(long structureId, - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType); - - public void addDDMStructureDLFileEntryType(long structureId, - long fileEntryTypeId); - - public void addDDMStructureDLFileEntryTypes(long structureId, - java.util.List DLFileEntryTypes); - - public void addDDMStructureDLFileEntryTypes(long structureId, - long[] fileEntryTypeIds); + public void addDDMStructureLinks(long fileEntryTypeId, + java.util.Set ddmStructureIds); /** * Adds the document library file entry type to the database. Also notifies the appropriate model listeners. @@ -99,8 +90,6 @@ public void cascadeFileEntryTypes(long userId, com.liferay.portlet.documentlibrary.model.DLFolder dlFolder) throws PortalException; - public void clearDDMStructureDLFileEntryTypes(long structureId); - public void clearDLFolderDLFileEntryTypes(long folderId); /** @@ -112,18 +101,6 @@ public void cascadeFileEntryTypes(long userId, public com.liferay.portlet.documentlibrary.model.DLFileEntryType createDLFileEntryType( long fileEntryTypeId); - public void deleteDDMStructureDLFileEntryType(long structureId, - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType); - - public void deleteDDMStructureDLFileEntryType(long structureId, - long fileEntryTypeId); - - public void deleteDDMStructureDLFileEntryTypes(long structureId, - java.util.List DLFileEntryTypes); - - public void deleteDDMStructureDLFileEntryTypes(long structureId, - long[] fileEntryTypeIds); - /** * Deletes the document library file entry type from the database. Also notifies the appropriate model listeners. * @@ -273,31 +250,6 @@ public com.liferay.portlet.documentlibrary.model.DLFileEntryType fetchFileEntryT */ public java.lang.String getBeanIdentifier(); - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getDDMStructureDLFileEntryTypes( - long structureId); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getDDMStructureDLFileEntryTypes( - long structureId, int start, int end); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getDDMStructureDLFileEntryTypes( - long structureId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getDDMStructureDLFileEntryTypesCount(long structureId); - - /** - * Returns the structureIds of the d d m structures associated with the document library file entry type. - * - * @param fileEntryTypeId the fileEntryTypeId of the document library file entry type - * @return long[] the structureIds of d d m structures associated with the document library file entry type - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public long[] getDDMStructurePrimaryKeys(long fileEntryTypeId); - /** * Returns the document library file entry type with the primary key. * @@ -412,6 +364,10 @@ public com.liferay.portlet.documentlibrary.model.DLFileEntryType getFileEntryTyp long groupId, java.lang.String fileEntryTypeKey) throws PortalException; + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List getFileEntryTypes( + long ddmStructureId) throws PortalException; + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List getFileEntryTypes( long[] groupIds); @@ -426,13 +382,6 @@ public java.util.List public com.liferay.portal.model.PersistedModel getPersistedModel( java.io.Serializable primaryKeyObj) throws PortalException; - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public boolean hasDDMStructureDLFileEntryType(long structureId, - long fileEntryTypeId); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public boolean hasDDMStructureDLFileEntryTypes(long structureId); - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public boolean hasDLFolderDLFileEntryType(long folderId, long fileEntryTypeId); @@ -457,14 +406,15 @@ public int searchCount(long companyId, long[] groupIds, */ public void setBeanIdentifier(java.lang.String beanIdentifier); - public void setDDMStructureDLFileEntryTypes(long structureId, - long[] fileEntryTypeIds); - public void setDLFolderDLFileEntryTypes(long folderId, long[] fileEntryTypeIds); public void unsetFolderFileEntryTypes(long folderId); + public void updateDDMStructureLinks(long fileEntryTypeId, + java.util.Set ddmStructureIds) + throws PortalException; + /** * Updates the document library file entry type in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. * diff --git a/portal-service/src/com/liferay/portlet/documentlibrary/service/DLFileEntryTypeLocalServiceUtil.java b/portal-service/src/com/liferay/portlet/documentlibrary/service/DLFileEntryTypeLocalServiceUtil.java index 6ff35e9ce296bb..1fb77ca756565f 100644 --- a/portal-service/src/com/liferay/portlet/documentlibrary/service/DLFileEntryTypeLocalServiceUtil.java +++ b/portal-service/src/com/liferay/portlet/documentlibrary/service/DLFileEntryTypeLocalServiceUtil.java @@ -40,26 +40,9 @@ public class DLFileEntryTypeLocalServiceUtil { * * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryTypeLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. */ - public static void addDDMStructureDLFileEntryType(long structureId, - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType) { - getService().addDDMStructureDLFileEntryType(structureId, dlFileEntryType); - } - - public static void addDDMStructureDLFileEntryType(long structureId, - long fileEntryTypeId) { - getService().addDDMStructureDLFileEntryType(structureId, fileEntryTypeId); - } - - public static void addDDMStructureDLFileEntryTypes(long structureId, - java.util.List DLFileEntryTypes) { - getService() - .addDDMStructureDLFileEntryTypes(structureId, DLFileEntryTypes); - } - - public static void addDDMStructureDLFileEntryTypes(long structureId, - long[] fileEntryTypeIds) { - getService() - .addDDMStructureDLFileEntryTypes(structureId, fileEntryTypeIds); + public static void addDDMStructureLinks(long fileEntryTypeId, + java.util.Set ddmStructureIds) { + getService().addDDMStructureLinks(fileEntryTypeId, ddmStructureIds); } /** @@ -121,10 +104,6 @@ public static void cascadeFileEntryTypes(long userId, getService().cascadeFileEntryTypes(userId, dlFolder); } - public static void clearDDMStructureDLFileEntryTypes(long structureId) { - getService().clearDDMStructureDLFileEntryTypes(structureId); - } - public static void clearDLFolderDLFileEntryTypes(long folderId) { getService().clearDLFolderDLFileEntryTypes(folderId); } @@ -140,30 +119,6 @@ public static com.liferay.portlet.documentlibrary.model.DLFileEntryType createDL return getService().createDLFileEntryType(fileEntryTypeId); } - public static void deleteDDMStructureDLFileEntryType(long structureId, - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType) { - getService() - .deleteDDMStructureDLFileEntryType(structureId, dlFileEntryType); - } - - public static void deleteDDMStructureDLFileEntryType(long structureId, - long fileEntryTypeId) { - getService() - .deleteDDMStructureDLFileEntryType(structureId, fileEntryTypeId); - } - - public static void deleteDDMStructureDLFileEntryTypes(long structureId, - java.util.List DLFileEntryTypes) { - getService() - .deleteDDMStructureDLFileEntryTypes(structureId, DLFileEntryTypes); - } - - public static void deleteDDMStructureDLFileEntryTypes(long structureId, - long[] fileEntryTypeIds) { - getService() - .deleteDDMStructureDLFileEntryTypes(structureId, fileEntryTypeIds); - } - /** * Deletes the document library file entry type from the database. Also notifies the appropriate model listeners. * @@ -351,39 +306,6 @@ public static java.lang.String getBeanIdentifier() { return getService().getBeanIdentifier(); } - public static java.util.List getDDMStructureDLFileEntryTypes( - long structureId) { - return getService().getDDMStructureDLFileEntryTypes(structureId); - } - - public static java.util.List getDDMStructureDLFileEntryTypes( - long structureId, int start, int end) { - return getService() - .getDDMStructureDLFileEntryTypes(structureId, start, end); - } - - public static java.util.List getDDMStructureDLFileEntryTypes( - long structureId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { - return getService() - .getDDMStructureDLFileEntryTypes(structureId, start, end, - orderByComparator); - } - - public static int getDDMStructureDLFileEntryTypesCount(long structureId) { - return getService().getDDMStructureDLFileEntryTypesCount(structureId); - } - - /** - * Returns the structureIds of the d d m structures associated with the document library file entry type. - * - * @param fileEntryTypeId the fileEntryTypeId of the document library file entry type - * @return long[] the structureIds of d d m structures associated with the document library file entry type - */ - public static long[] getDDMStructurePrimaryKeys(long fileEntryTypeId) { - return getService().getDDMStructurePrimaryKeys(fileEntryTypeId); - } - /** * Returns the document library file entry type with the primary key. * @@ -521,6 +443,12 @@ public static com.liferay.portlet.documentlibrary.model.DLFileEntryType getFileE return getService().getFileEntryType(groupId, fileEntryTypeKey); } + public static java.util.List getFileEntryTypes( + long ddmStructureId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getFileEntryTypes(ddmStructureId); + } + public static java.util.List getFileEntryTypes( long[] groupIds) { return getService().getFileEntryTypes(groupIds); @@ -539,16 +467,6 @@ public static com.liferay.portal.model.PersistedModel getPersistedModel( return getService().getPersistedModel(primaryKeyObj); } - public static boolean hasDDMStructureDLFileEntryType(long structureId, - long fileEntryTypeId) { - return getService() - .hasDDMStructureDLFileEntryType(structureId, fileEntryTypeId); - } - - public static boolean hasDDMStructureDLFileEntryTypes(long structureId) { - return getService().hasDDMStructureDLFileEntryTypes(structureId); - } - public static boolean hasDLFolderDLFileEntryType(long folderId, long fileEntryTypeId) { return getService().hasDLFolderDLFileEntryType(folderId, fileEntryTypeId); @@ -583,12 +501,6 @@ public static void setBeanIdentifier(java.lang.String beanIdentifier) { getService().setBeanIdentifier(beanIdentifier); } - public static void setDDMStructureDLFileEntryTypes(long structureId, - long[] fileEntryTypeIds) { - getService() - .setDDMStructureDLFileEntryTypes(structureId, fileEntryTypeIds); - } - public static void setDLFolderDLFileEntryTypes(long folderId, long[] fileEntryTypeIds) { getService().setDLFolderDLFileEntryTypes(folderId, fileEntryTypeIds); @@ -598,6 +510,12 @@ public static void unsetFolderFileEntryTypes(long folderId) { getService().unsetFolderFileEntryTypes(folderId); } + public static void updateDDMStructureLinks(long fileEntryTypeId, + java.util.Set ddmStructureIds) + throws com.liferay.portal.kernel.exception.PortalException { + getService().updateDDMStructureLinks(fileEntryTypeId, ddmStructureIds); + } + /** * Updates the document library file entry type in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. * diff --git a/portal-service/src/com/liferay/portlet/documentlibrary/service/DLFileEntryTypeLocalServiceWrapper.java b/portal-service/src/com/liferay/portlet/documentlibrary/service/DLFileEntryTypeLocalServiceWrapper.java index 4b9ef9c5c003ce..7db891b4e29d6e 100644 --- a/portal-service/src/com/liferay/portlet/documentlibrary/service/DLFileEntryTypeLocalServiceWrapper.java +++ b/portal-service/src/com/liferay/portlet/documentlibrary/service/DLFileEntryTypeLocalServiceWrapper.java @@ -35,31 +35,10 @@ public DLFileEntryTypeLocalServiceWrapper( } @Override - public void addDDMStructureDLFileEntryType(long structureId, - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType) { - _dlFileEntryTypeLocalService.addDDMStructureDLFileEntryType(structureId, - dlFileEntryType); - } - - @Override - public void addDDMStructureDLFileEntryType(long structureId, - long fileEntryTypeId) { - _dlFileEntryTypeLocalService.addDDMStructureDLFileEntryType(structureId, - fileEntryTypeId); - } - - @Override - public void addDDMStructureDLFileEntryTypes(long structureId, - java.util.List DLFileEntryTypes) { - _dlFileEntryTypeLocalService.addDDMStructureDLFileEntryTypes(structureId, - DLFileEntryTypes); - } - - @Override - public void addDDMStructureDLFileEntryTypes(long structureId, - long[] fileEntryTypeIds) { - _dlFileEntryTypeLocalService.addDDMStructureDLFileEntryTypes(structureId, - fileEntryTypeIds); + public void addDDMStructureLinks(long fileEntryTypeId, + java.util.Set ddmStructureIds) { + _dlFileEntryTypeLocalService.addDDMStructureLinks(fileEntryTypeId, + ddmStructureIds); } /** @@ -131,11 +110,6 @@ public void cascadeFileEntryTypes(long userId, _dlFileEntryTypeLocalService.cascadeFileEntryTypes(userId, dlFolder); } - @Override - public void clearDDMStructureDLFileEntryTypes(long structureId) { - _dlFileEntryTypeLocalService.clearDDMStructureDLFileEntryTypes(structureId); - } - @Override public void clearDLFolderDLFileEntryTypes(long folderId) { _dlFileEntryTypeLocalService.clearDLFolderDLFileEntryTypes(folderId); @@ -153,34 +127,6 @@ public com.liferay.portlet.documentlibrary.model.DLFileEntryType createDLFileEnt return _dlFileEntryTypeLocalService.createDLFileEntryType(fileEntryTypeId); } - @Override - public void deleteDDMStructureDLFileEntryType(long structureId, - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType) { - _dlFileEntryTypeLocalService.deleteDDMStructureDLFileEntryType(structureId, - dlFileEntryType); - } - - @Override - public void deleteDDMStructureDLFileEntryType(long structureId, - long fileEntryTypeId) { - _dlFileEntryTypeLocalService.deleteDDMStructureDLFileEntryType(structureId, - fileEntryTypeId); - } - - @Override - public void deleteDDMStructureDLFileEntryTypes(long structureId, - java.util.List DLFileEntryTypes) { - _dlFileEntryTypeLocalService.deleteDDMStructureDLFileEntryTypes(structureId, - DLFileEntryTypes); - } - - @Override - public void deleteDDMStructureDLFileEntryTypes(long structureId, - long[] fileEntryTypeIds) { - _dlFileEntryTypeLocalService.deleteDDMStructureDLFileEntryTypes(structureId, - fileEntryTypeIds); - } - /** * Deletes the document library file entry type from the database. Also notifies the appropriate model listeners. * @@ -398,43 +344,6 @@ public java.lang.String getBeanIdentifier() { return _dlFileEntryTypeLocalService.getBeanIdentifier(); } - @Override - public java.util.List getDDMStructureDLFileEntryTypes( - long structureId) { - return _dlFileEntryTypeLocalService.getDDMStructureDLFileEntryTypes(structureId); - } - - @Override - public java.util.List getDDMStructureDLFileEntryTypes( - long structureId, int start, int end) { - return _dlFileEntryTypeLocalService.getDDMStructureDLFileEntryTypes(structureId, - start, end); - } - - @Override - public java.util.List getDDMStructureDLFileEntryTypes( - long structureId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { - return _dlFileEntryTypeLocalService.getDDMStructureDLFileEntryTypes(structureId, - start, end, orderByComparator); - } - - @Override - public int getDDMStructureDLFileEntryTypesCount(long structureId) { - return _dlFileEntryTypeLocalService.getDDMStructureDLFileEntryTypesCount(structureId); - } - - /** - * Returns the structureIds of the d d m structures associated with the document library file entry type. - * - * @param fileEntryTypeId the fileEntryTypeId of the document library file entry type - * @return long[] the structureIds of d d m structures associated with the document library file entry type - */ - @Override - public long[] getDDMStructurePrimaryKeys(long fileEntryTypeId) { - return _dlFileEntryTypeLocalService.getDDMStructurePrimaryKeys(fileEntryTypeId); - } - /** * Returns the document library file entry type with the primary key. * @@ -588,6 +497,13 @@ public com.liferay.portlet.documentlibrary.model.DLFileEntryType getFileEntryTyp fileEntryTypeKey); } + @Override + public java.util.List getFileEntryTypes( + long ddmStructureId) + throws com.liferay.portal.kernel.exception.PortalException { + return _dlFileEntryTypeLocalService.getFileEntryTypes(ddmStructureId); + } + @Override public java.util.List getFileEntryTypes( long[] groupIds) { @@ -609,18 +525,6 @@ public com.liferay.portal.model.PersistedModel getPersistedModel( return _dlFileEntryTypeLocalService.getPersistedModel(primaryKeyObj); } - @Override - public boolean hasDDMStructureDLFileEntryType(long structureId, - long fileEntryTypeId) { - return _dlFileEntryTypeLocalService.hasDDMStructureDLFileEntryType(structureId, - fileEntryTypeId); - } - - @Override - public boolean hasDDMStructureDLFileEntryTypes(long structureId) { - return _dlFileEntryTypeLocalService.hasDDMStructureDLFileEntryTypes(structureId); - } - @Override public boolean hasDLFolderDLFileEntryType(long folderId, long fileEntryTypeId) { @@ -659,13 +563,6 @@ public void setBeanIdentifier(java.lang.String beanIdentifier) { _dlFileEntryTypeLocalService.setBeanIdentifier(beanIdentifier); } - @Override - public void setDDMStructureDLFileEntryTypes(long structureId, - long[] fileEntryTypeIds) { - _dlFileEntryTypeLocalService.setDDMStructureDLFileEntryTypes(structureId, - fileEntryTypeIds); - } - @Override public void setDLFolderDLFileEntryTypes(long folderId, long[] fileEntryTypeIds) { @@ -678,6 +575,14 @@ public void unsetFolderFileEntryTypes(long folderId) { _dlFileEntryTypeLocalService.unsetFolderFileEntryTypes(folderId); } + @Override + public void updateDDMStructureLinks(long fileEntryTypeId, + java.util.Set ddmStructureIds) + throws com.liferay.portal.kernel.exception.PortalException { + _dlFileEntryTypeLocalService.updateDDMStructureLinks(fileEntryTypeId, + ddmStructureIds); + } + /** * Updates the document library file entry type in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. * diff --git a/portal-service/src/com/liferay/portlet/documentlibrary/service/persistence/DLFileEntryTypePersistence.java b/portal-service/src/com/liferay/portlet/documentlibrary/service/persistence/DLFileEntryTypePersistence.java index 68679616f15fc3..dd2d9d8c15dccc 100644 --- a/portal-service/src/com/liferay/portlet/documentlibrary/service/persistence/DLFileEntryTypePersistence.java +++ b/portal-service/src/com/liferay/portlet/documentlibrary/service/persistence/DLFileEntryTypePersistence.java @@ -927,170 +927,4 @@ public void removeDLFolders(long pk, */ public void setDLFolders(long pk, java.util.List dlFolders); - - /** - * Returns the primaryKeys of d d m structures associated with the document library file entry type. - * - * @param pk the primary key of the document library file entry type - * @return long[] of the primaryKeys of d d m structures associated with the document library file entry type - */ - public long[] getDDMStructurePrimaryKeys(long pk); - - /** - * Returns all the d d m structures associated with the document library file entry type. - * - * @param pk the primary key of the document library file entry type - * @return the d d m structures associated with the document library file entry type - */ - public java.util.List getDDMStructures( - long pk); - - /** - * Returns a range of all the d d m structures associated with the document library file entry type. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryTypeModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param pk the primary key of the document library file entry type - * @param start the lower bound of the range of document library file entry types - * @param end the upper bound of the range of document library file entry types (not inclusive) - * @return the range of d d m structures associated with the document library file entry type - */ - public java.util.List getDDMStructures( - long pk, int start, int end); - - /** - * Returns an ordered range of all the d d m structures associated with the document library file entry type. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryTypeModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param pk the primary key of the document library file entry type - * @param start the lower bound of the range of document library file entry types - * @param end the upper bound of the range of document library file entry types (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of d d m structures associated with the document library file entry type - */ - public java.util.List getDDMStructures( - long pk, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator); - - /** - * Returns the number of d d m structures associated with the document library file entry type. - * - * @param pk the primary key of the document library file entry type - * @return the number of d d m structures associated with the document library file entry type - */ - public int getDDMStructuresSize(long pk); - - /** - * Returns true if the d d m structure is associated with the document library file entry type. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePK the primary key of the d d m structure - * @return true if the d d m structure is associated with the document library file entry type; false otherwise - */ - public boolean containsDDMStructure(long pk, long ddmStructurePK); - - /** - * Returns true if the document library file entry type has any d d m structures associated with it. - * - * @param pk the primary key of the document library file entry type to check for associations with d d m structures - * @return true if the document library file entry type has any d d m structures associated with it; false otherwise - */ - public boolean containsDDMStructures(long pk); - - /** - * Adds an association between the document library file entry type and the d d m structure. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePK the primary key of the d d m structure - */ - public void addDDMStructure(long pk, long ddmStructurePK); - - /** - * Adds an association between the document library file entry type and the d d m structure. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructure the d d m structure - */ - public void addDDMStructure(long pk, - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure); - - /** - * Adds an association between the document library file entry type and the d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePKs the primary keys of the d d m structures - */ - public void addDDMStructures(long pk, long[] ddmStructurePKs); - - /** - * Adds an association between the document library file entry type and the d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructures the d d m structures - */ - public void addDDMStructures(long pk, - java.util.List ddmStructures); - - /** - * Clears all associations between the document library file entry type and its d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type to clear the associated d d m structures from - */ - public void clearDDMStructures(long pk); - - /** - * Removes the association between the document library file entry type and the d d m structure. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePK the primary key of the d d m structure - */ - public void removeDDMStructure(long pk, long ddmStructurePK); - - /** - * Removes the association between the document library file entry type and the d d m structure. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructure the d d m structure - */ - public void removeDDMStructure(long pk, - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure); - - /** - * Removes the association between the document library file entry type and the d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePKs the primary keys of the d d m structures - */ - public void removeDDMStructures(long pk, long[] ddmStructurePKs); - - /** - * Removes the association between the document library file entry type and the d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructures the d d m structures - */ - public void removeDDMStructures(long pk, - java.util.List ddmStructures); - - /** - * Sets the d d m structures associated with the document library file entry type, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePKs the primary keys of the d d m structures to be associated with the document library file entry type - */ - public void setDDMStructures(long pk, long[] ddmStructurePKs); - - /** - * Sets the d d m structures associated with the document library file entry type, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructures the d d m structures to be associated with the document library file entry type - */ - public void setDDMStructures(long pk, - java.util.List ddmStructures); } \ No newline at end of file diff --git a/portal-service/src/com/liferay/portlet/documentlibrary/service/persistence/DLFileEntryTypeUtil.java b/portal-service/src/com/liferay/portlet/documentlibrary/service/persistence/DLFileEntryTypeUtil.java index 754f283797deb0..54f7ea14d72857 100644 --- a/portal-service/src/com/liferay/portlet/documentlibrary/service/persistence/DLFileEntryTypeUtil.java +++ b/portal-service/src/com/liferay/portlet/documentlibrary/service/persistence/DLFileEntryTypeUtil.java @@ -1176,209 +1176,6 @@ public static void setDLFolders(long pk, getPersistence().setDLFolders(pk, dlFolders); } - /** - * Returns the primaryKeys of d d m structures associated with the document library file entry type. - * - * @param pk the primary key of the document library file entry type - * @return long[] of the primaryKeys of d d m structures associated with the document library file entry type - */ - public static long[] getDDMStructurePrimaryKeys(long pk) { - return getPersistence().getDDMStructurePrimaryKeys(pk); - } - - /** - * Returns all the d d m structures associated with the document library file entry type. - * - * @param pk the primary key of the document library file entry type - * @return the d d m structures associated with the document library file entry type - */ - public static List getDDMStructures( - long pk) { - return getPersistence().getDDMStructures(pk); - } - - /** - * Returns a range of all the d d m structures associated with the document library file entry type. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryTypeModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param pk the primary key of the document library file entry type - * @param start the lower bound of the range of document library file entry types - * @param end the upper bound of the range of document library file entry types (not inclusive) - * @return the range of d d m structures associated with the document library file entry type - */ - public static List getDDMStructures( - long pk, int start, int end) { - return getPersistence().getDDMStructures(pk, start, end); - } - - /** - * Returns an ordered range of all the d d m structures associated with the document library file entry type. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLFileEntryTypeModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param pk the primary key of the document library file entry type - * @param start the lower bound of the range of document library file entry types - * @param end the upper bound of the range of document library file entry types (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of d d m structures associated with the document library file entry type - */ - public static List getDDMStructures( - long pk, int start, int end, - OrderByComparator orderByComparator) { - return getPersistence() - .getDDMStructures(pk, start, end, orderByComparator); - } - - /** - * Returns the number of d d m structures associated with the document library file entry type. - * - * @param pk the primary key of the document library file entry type - * @return the number of d d m structures associated with the document library file entry type - */ - public static int getDDMStructuresSize(long pk) { - return getPersistence().getDDMStructuresSize(pk); - } - - /** - * Returns true if the d d m structure is associated with the document library file entry type. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePK the primary key of the d d m structure - * @return true if the d d m structure is associated with the document library file entry type; false otherwise - */ - public static boolean containsDDMStructure(long pk, long ddmStructurePK) { - return getPersistence().containsDDMStructure(pk, ddmStructurePK); - } - - /** - * Returns true if the document library file entry type has any d d m structures associated with it. - * - * @param pk the primary key of the document library file entry type to check for associations with d d m structures - * @return true if the document library file entry type has any d d m structures associated with it; false otherwise - */ - public static boolean containsDDMStructures(long pk) { - return getPersistence().containsDDMStructures(pk); - } - - /** - * Adds an association between the document library file entry type and the d d m structure. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePK the primary key of the d d m structure - */ - public static void addDDMStructure(long pk, long ddmStructurePK) { - getPersistence().addDDMStructure(pk, ddmStructurePK); - } - - /** - * Adds an association between the document library file entry type and the d d m structure. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructure the d d m structure - */ - public static void addDDMStructure(long pk, - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) { - getPersistence().addDDMStructure(pk, ddmStructure); - } - - /** - * Adds an association between the document library file entry type and the d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePKs the primary keys of the d d m structures - */ - public static void addDDMStructures(long pk, long[] ddmStructurePKs) { - getPersistence().addDDMStructures(pk, ddmStructurePKs); - } - - /** - * Adds an association between the document library file entry type and the d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructures the d d m structures - */ - public static void addDDMStructures(long pk, - List ddmStructures) { - getPersistence().addDDMStructures(pk, ddmStructures); - } - - /** - * Clears all associations between the document library file entry type and its d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type to clear the associated d d m structures from - */ - public static void clearDDMStructures(long pk) { - getPersistence().clearDDMStructures(pk); - } - - /** - * Removes the association between the document library file entry type and the d d m structure. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePK the primary key of the d d m structure - */ - public static void removeDDMStructure(long pk, long ddmStructurePK) { - getPersistence().removeDDMStructure(pk, ddmStructurePK); - } - - /** - * Removes the association between the document library file entry type and the d d m structure. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructure the d d m structure - */ - public static void removeDDMStructure(long pk, - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) { - getPersistence().removeDDMStructure(pk, ddmStructure); - } - - /** - * Removes the association between the document library file entry type and the d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePKs the primary keys of the d d m structures - */ - public static void removeDDMStructures(long pk, long[] ddmStructurePKs) { - getPersistence().removeDDMStructures(pk, ddmStructurePKs); - } - - /** - * Removes the association between the document library file entry type and the d d m structures. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructures the d d m structures - */ - public static void removeDDMStructures(long pk, - List ddmStructures) { - getPersistence().removeDDMStructures(pk, ddmStructures); - } - - /** - * Sets the d d m structures associated with the document library file entry type, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructurePKs the primary keys of the d d m structures to be associated with the document library file entry type - */ - public static void setDDMStructures(long pk, long[] ddmStructurePKs) { - getPersistence().setDDMStructures(pk, ddmStructurePKs); - } - - /** - * Sets the d d m structures associated with the document library file entry type, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the document library file entry type - * @param ddmStructures the d d m structures to be associated with the document library file entry type - */ - public static void setDDMStructures(long pk, - List ddmStructures) { - getPersistence().setDDMStructures(pk, ddmStructures); - } - public static DLFileEntryTypePersistence getPersistence() { if (_persistence == null) { _persistence = (DLFileEntryTypePersistence)PortalBeanLocatorUtil.locate(DLFileEntryTypePersistence.class.getName()); diff --git a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLinkLocalService.java b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLinkLocalService.java index d8c61386089787..ccc71a752a8c5e 100644 --- a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLinkLocalService.java +++ b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLinkLocalService.java @@ -191,6 +191,10 @@ public com.liferay.portlet.dynamicdatamapping.model.DDMStructureLink fetchDDMStr */ public java.lang.String getBeanIdentifier(); + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List getClassNameStructureLinks( + long classNameId); + /** * Returns the d d m structure link with the primary key. * diff --git a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLinkLocalServiceUtil.java b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLinkLocalServiceUtil.java index f4f6123e48a3bc..01ead591bfaa67 100644 --- a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLinkLocalServiceUtil.java +++ b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLinkLocalServiceUtil.java @@ -221,6 +221,11 @@ public static java.lang.String getBeanIdentifier() { return getService().getBeanIdentifier(); } + public static java.util.List getClassNameStructureLinks( + long classNameId) { + return getService().getClassNameStructureLinks(classNameId); + } + /** * Returns the d d m structure link with the primary key. * diff --git a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLinkLocalServiceWrapper.java b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLinkLocalServiceWrapper.java index bbba1ff8701d6f..de9f87bdccb41d 100644 --- a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLinkLocalServiceWrapper.java +++ b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLinkLocalServiceWrapper.java @@ -238,6 +238,12 @@ public java.lang.String getBeanIdentifier() { return _ddmStructureLinkLocalService.getBeanIdentifier(); } + @Override + public java.util.List getClassNameStructureLinks( + long classNameId) { + return _ddmStructureLinkLocalService.getClassNameStructureLinks(classNameId); + } + /** * Returns the d d m structure link with the primary key. * diff --git a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLocalService.java b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLocalService.java index 5dd263a1e5508d..cd487e147d2f10 100644 --- a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLocalService.java +++ b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLocalService.java @@ -59,18 +59,6 @@ public interface DDMStructureLocalService extends BaseLocalService, public com.liferay.portlet.dynamicdatamapping.model.DDMStructure addDDMStructure( com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure); - public void addDLFileEntryTypeDDMStructure(long fileEntryTypeId, - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure); - - public void addDLFileEntryTypeDDMStructure(long fileEntryTypeId, - long structureId); - - public void addDLFileEntryTypeDDMStructures(long fileEntryTypeId, - java.util.List DDMStructures); - - public void addDLFileEntryTypeDDMStructures(long fileEntryTypeId, - long[] structureIds); - public com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure( long userId, long groupId, long classNameId, java.util.Map nameMap, @@ -245,8 +233,6 @@ public void addStructureResources( java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) throws PortalException; - public void clearDLFileEntryTypeDDMStructures(long fileEntryTypeId); - /** * Copies a structure, creating a new structure with all the values * extracted from the original one. The new structure supports a new name @@ -305,18 +291,6 @@ public com.liferay.portlet.dynamicdatamapping.model.DDMStructure deleteDDMStruct public com.liferay.portlet.dynamicdatamapping.model.DDMStructure deleteDDMStructure( long structureId) throws PortalException; - public void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId, - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure); - - public void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId, - long structureId); - - public void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId, - java.util.List DDMStructures); - - public void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId, - long[] structureIds); - /** * @throws PortalException */ @@ -657,42 +631,6 @@ public java.util.List @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int getDDMStructuresCount(); - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getDLFileEntryTypeDDMStructures( - long fileEntryTypeId); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getDLFileEntryTypeDDMStructures( - long fileEntryTypeId, int start, int end); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getDLFileEntryTypeDDMStructures( - long fileEntryTypeId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getDLFileEntryTypeDDMStructuresCount(long fileEntryTypeId); - - /** - * Returns the fileEntryTypeIds of the document library file entry types associated with the d d m structure. - * - * @param structureId the structureId of the d d m structure - * @return long[] the fileEntryTypeIds of document library file entry types associated with the d d m structure - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public long[] getDLFileEntryTypePrimaryKeys(long structureId); - - /** - * Returns all the structures for the document library file entry type. - * - * @param dlFileEntryTypeId the primary key of the document library file - entry type - * @return the structures for the document library file entry type - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getDLFileEntryTypeStructures( - long dlFileEntryTypeId); - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); @@ -961,13 +899,6 @@ public java.util.List @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int getStructuresCount(long[] groupIds, long classNameId); - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public boolean hasDLFileEntryTypeDDMStructure(long fileEntryTypeId, - long structureId); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public boolean hasDLFileEntryTypeDDMStructures(long fileEntryTypeId); - public void revertStructure(long userId, long structureId, java.lang.String version, com.liferay.portal.service.ServiceContext serviceContext) @@ -1095,9 +1026,6 @@ public int searchCount(long companyId, long[] groupIds, long classNameId, */ public void setBeanIdentifier(java.lang.String beanIdentifier); - public void setDLFileEntryTypeDDMStructures(long fileEntryTypeId, - long[] structureIds); - /** * Updates the d d m structure in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. * diff --git a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLocalServiceUtil.java b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLocalServiceUtil.java index d676344ee69efd..9f81674b62c35c 100644 --- a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLocalServiceUtil.java +++ b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLocalServiceUtil.java @@ -52,29 +52,6 @@ public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addDDMSt return getService().addDDMStructure(ddmStructure); } - public static void addDLFileEntryTypeDDMStructure(long fileEntryTypeId, - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) { - getService() - .addDLFileEntryTypeDDMStructure(fileEntryTypeId, ddmStructure); - } - - public static void addDLFileEntryTypeDDMStructure(long fileEntryTypeId, - long structureId) { - getService().addDLFileEntryTypeDDMStructure(fileEntryTypeId, structureId); - } - - public static void addDLFileEntryTypeDDMStructures(long fileEntryTypeId, - java.util.List DDMStructures) { - getService() - .addDLFileEntryTypeDDMStructures(fileEntryTypeId, DDMStructures); - } - - public static void addDLFileEntryTypeDDMStructures(long fileEntryTypeId, - long[] structureIds) { - getService() - .addDLFileEntryTypeDDMStructures(fileEntryTypeId, structureIds); - } - public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure( long userId, long groupId, long classNameId, java.util.Map nameMap, @@ -284,10 +261,6 @@ public static void addStructureResources( .addStructureResources(structure, groupPermissions, guestPermissions); } - public static void clearDLFileEntryTypeDDMStructures(long fileEntryTypeId) { - getService().clearDLFileEntryTypeDDMStructures(fileEntryTypeId); - } - /** * Copies a structure, creating a new structure with all the values * extracted from the original one. The new structure supports a new name @@ -357,31 +330,6 @@ public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure deleteDD return getService().deleteDDMStructure(structureId); } - public static void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId, - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) { - getService() - .deleteDLFileEntryTypeDDMStructure(fileEntryTypeId, ddmStructure); - } - - public static void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId, - long structureId) { - getService() - .deleteDLFileEntryTypeDDMStructure(fileEntryTypeId, structureId); - } - - public static void deleteDLFileEntryTypeDDMStructures( - long fileEntryTypeId, - java.util.List DDMStructures) { - getService() - .deleteDLFileEntryTypeDDMStructures(fileEntryTypeId, DDMStructures); - } - - public static void deleteDLFileEntryTypeDDMStructures( - long fileEntryTypeId, long[] structureIds) { - getService() - .deleteDLFileEntryTypeDDMStructures(fileEntryTypeId, structureIds); - } - /** * @throws PortalException */ @@ -774,51 +722,6 @@ public static int getDDMStructuresCount() { return getService().getDDMStructuresCount(); } - public static java.util.List getDLFileEntryTypeDDMStructures( - long fileEntryTypeId) { - return getService().getDLFileEntryTypeDDMStructures(fileEntryTypeId); - } - - public static java.util.List getDLFileEntryTypeDDMStructures( - long fileEntryTypeId, int start, int end) { - return getService() - .getDLFileEntryTypeDDMStructures(fileEntryTypeId, start, end); - } - - public static java.util.List getDLFileEntryTypeDDMStructures( - long fileEntryTypeId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { - return getService() - .getDLFileEntryTypeDDMStructures(fileEntryTypeId, start, - end, orderByComparator); - } - - public static int getDLFileEntryTypeDDMStructuresCount(long fileEntryTypeId) { - return getService().getDLFileEntryTypeDDMStructuresCount(fileEntryTypeId); - } - - /** - * Returns the fileEntryTypeIds of the document library file entry types associated with the d d m structure. - * - * @param structureId the structureId of the d d m structure - * @return long[] the fileEntryTypeIds of document library file entry types associated with the d d m structure - */ - public static long[] getDLFileEntryTypePrimaryKeys(long structureId) { - return getService().getDLFileEntryTypePrimaryKeys(structureId); - } - - /** - * Returns all the structures for the document library file entry type. - * - * @param dlFileEntryTypeId the primary key of the document library file - entry type - * @return the structures for the document library file entry type - */ - public static java.util.List getDLFileEntryTypeStructures( - long dlFileEntryTypeId) { - return getService().getDLFileEntryTypeStructures(dlFileEntryTypeId); - } - public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) { return getService().getExportActionableDynamicQuery(portletDataContext); @@ -1112,16 +1015,6 @@ public static int getStructuresCount(long[] groupIds, long classNameId) { return getService().getStructuresCount(groupIds, classNameId); } - public static boolean hasDLFileEntryTypeDDMStructure(long fileEntryTypeId, - long structureId) { - return getService() - .hasDLFileEntryTypeDDMStructure(fileEntryTypeId, structureId); - } - - public static boolean hasDLFileEntryTypeDDMStructures(long fileEntryTypeId) { - return getService().hasDLFileEntryTypeDDMStructures(fileEntryTypeId); - } - public static void revertStructure(long userId, long structureId, java.lang.String version, com.liferay.portal.service.ServiceContext serviceContext) @@ -1265,12 +1158,6 @@ public static void setBeanIdentifier(java.lang.String beanIdentifier) { getService().setBeanIdentifier(beanIdentifier); } - public static void setDLFileEntryTypeDDMStructures(long fileEntryTypeId, - long[] structureIds) { - getService() - .setDLFileEntryTypeDDMStructures(fileEntryTypeId, structureIds); - } - /** * Updates the d d m structure in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. * diff --git a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLocalServiceWrapper.java b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLocalServiceWrapper.java index d84d958567689d..be585113b37e5f 100644 --- a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLocalServiceWrapper.java +++ b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/DDMStructureLocalServiceWrapper.java @@ -45,34 +45,6 @@ public com.liferay.portlet.dynamicdatamapping.model.DDMStructure addDDMStructure return _ddmStructureLocalService.addDDMStructure(ddmStructure); } - @Override - public void addDLFileEntryTypeDDMStructure(long fileEntryTypeId, - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) { - _ddmStructureLocalService.addDLFileEntryTypeDDMStructure(fileEntryTypeId, - ddmStructure); - } - - @Override - public void addDLFileEntryTypeDDMStructure(long fileEntryTypeId, - long structureId) { - _ddmStructureLocalService.addDLFileEntryTypeDDMStructure(fileEntryTypeId, - structureId); - } - - @Override - public void addDLFileEntryTypeDDMStructures(long fileEntryTypeId, - java.util.List DDMStructures) { - _ddmStructureLocalService.addDLFileEntryTypeDDMStructures(fileEntryTypeId, - DDMStructures); - } - - @Override - public void addDLFileEntryTypeDDMStructures(long fileEntryTypeId, - long[] structureIds) { - _ddmStructureLocalService.addDLFileEntryTypeDDMStructures(fileEntryTypeId, - structureIds); - } - @Override public com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure( long userId, long groupId, long classNameId, @@ -286,11 +258,6 @@ public void addStructureResources( groupPermissions, guestPermissions); } - @Override - public void clearDLFileEntryTypeDDMStructures(long fileEntryTypeId) { - _ddmStructureLocalService.clearDLFileEntryTypeDDMStructures(fileEntryTypeId); - } - /** * Copies a structure, creating a new structure with all the values * extracted from the original one. The new structure supports a new name @@ -365,34 +332,6 @@ public com.liferay.portlet.dynamicdatamapping.model.DDMStructure deleteDDMStruct return _ddmStructureLocalService.deleteDDMStructure(structureId); } - @Override - public void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId, - com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) { - _ddmStructureLocalService.deleteDLFileEntryTypeDDMStructure(fileEntryTypeId, - ddmStructure); - } - - @Override - public void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId, - long structureId) { - _ddmStructureLocalService.deleteDLFileEntryTypeDDMStructure(fileEntryTypeId, - structureId); - } - - @Override - public void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId, - java.util.List DDMStructures) { - _ddmStructureLocalService.deleteDLFileEntryTypeDDMStructures(fileEntryTypeId, - DDMStructures); - } - - @Override - public void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId, - long[] structureIds) { - _ddmStructureLocalService.deleteDLFileEntryTypeDDMStructures(fileEntryTypeId, - structureIds); - } - /** * @throws PortalException */ @@ -818,56 +757,6 @@ public int getDDMStructuresCount() { return _ddmStructureLocalService.getDDMStructuresCount(); } - @Override - public java.util.List getDLFileEntryTypeDDMStructures( - long fileEntryTypeId) { - return _ddmStructureLocalService.getDLFileEntryTypeDDMStructures(fileEntryTypeId); - } - - @Override - public java.util.List getDLFileEntryTypeDDMStructures( - long fileEntryTypeId, int start, int end) { - return _ddmStructureLocalService.getDLFileEntryTypeDDMStructures(fileEntryTypeId, - start, end); - } - - @Override - public java.util.List getDLFileEntryTypeDDMStructures( - long fileEntryTypeId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { - return _ddmStructureLocalService.getDLFileEntryTypeDDMStructures(fileEntryTypeId, - start, end, orderByComparator); - } - - @Override - public int getDLFileEntryTypeDDMStructuresCount(long fileEntryTypeId) { - return _ddmStructureLocalService.getDLFileEntryTypeDDMStructuresCount(fileEntryTypeId); - } - - /** - * Returns the fileEntryTypeIds of the document library file entry types associated with the d d m structure. - * - * @param structureId the structureId of the d d m structure - * @return long[] the fileEntryTypeIds of document library file entry types associated with the d d m structure - */ - @Override - public long[] getDLFileEntryTypePrimaryKeys(long structureId) { - return _ddmStructureLocalService.getDLFileEntryTypePrimaryKeys(structureId); - } - - /** - * Returns all the structures for the document library file entry type. - * - * @param dlFileEntryTypeId the primary key of the document library file - entry type - * @return the structures for the document library file entry type - */ - @Override - public java.util.List getDLFileEntryTypeStructures( - long dlFileEntryTypeId) { - return _ddmStructureLocalService.getDLFileEntryTypeStructures(dlFileEntryTypeId); - } - @Override public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) { @@ -1183,18 +1072,6 @@ public int getStructuresCount(long[] groupIds, long classNameId) { classNameId); } - @Override - public boolean hasDLFileEntryTypeDDMStructure(long fileEntryTypeId, - long structureId) { - return _ddmStructureLocalService.hasDLFileEntryTypeDDMStructure(fileEntryTypeId, - structureId); - } - - @Override - public boolean hasDLFileEntryTypeDDMStructures(long fileEntryTypeId) { - return _ddmStructureLocalService.hasDLFileEntryTypeDDMStructures(fileEntryTypeId); - } - @Override public void revertStructure(long userId, long structureId, java.lang.String version, @@ -1342,13 +1219,6 @@ public void setBeanIdentifier(java.lang.String beanIdentifier) { _ddmStructureLocalService.setBeanIdentifier(beanIdentifier); } - @Override - public void setDLFileEntryTypeDDMStructures(long fileEntryTypeId, - long[] structureIds) { - _ddmStructureLocalService.setDLFileEntryTypeDDMStructures(fileEntryTypeId, - structureIds); - } - /** * Updates the d d m structure in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. * diff --git a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructureLinkPersistence.java b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructureLinkPersistence.java index 166a74a7c58a70..8ab83684e84e45 100644 --- a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructureLinkPersistence.java +++ b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructureLinkPersistence.java @@ -40,6 +40,119 @@ public interface DDMStructureLinkPersistence extends BasePersistenceservice.xml and rerun ServiceBuilder to regenerate this interface. */ + /** + * Returns all the d d m structure links where classNameId = ?. + * + * @param classNameId the class name ID + * @return the matching d d m structure links + */ + public java.util.List findByClassNameId(long classNameId); + + /** + * Returns a range of all the d d m structure links where classNameId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureLinkModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param classNameId the class name ID + * @param start the lower bound of the range of d d m structure links + * @param end the upper bound of the range of d d m structure links (not inclusive) + * @return the range of matching d d m structure links + */ + public java.util.List findByClassNameId( + long classNameId, int start, int end); + + /** + * Returns an ordered range of all the d d m structure links where classNameId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureLinkModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param classNameId the class name ID + * @param start the lower bound of the range of d d m structure links + * @param end the upper bound of the range of d d m structure links (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching d d m structure links + */ + public java.util.List findByClassNameId( + long classNameId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the first d d m structure link in the ordered set where classNameId = ?. + * + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching d d m structure link + * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found + */ + public DDMStructureLink findByClassNameId_First(long classNameId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException; + + /** + * Returns the first d d m structure link in the ordered set where classNameId = ?. + * + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching d d m structure link, or null if a matching d d m structure link could not be found + */ + public DDMStructureLink fetchByClassNameId_First(long classNameId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last d d m structure link in the ordered set where classNameId = ?. + * + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching d d m structure link + * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found + */ + public DDMStructureLink findByClassNameId_Last(long classNameId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException; + + /** + * Returns the last d d m structure link in the ordered set where classNameId = ?. + * + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching d d m structure link, or null if a matching d d m structure link could not be found + */ + public DDMStructureLink fetchByClassNameId_Last(long classNameId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the d d m structure links before and after the current d d m structure link in the ordered set where classNameId = ?. + * + * @param structureLinkId the primary key of the current d d m structure link + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next d d m structure link + * @throws NoSuchStructureLinkException if a d d m structure link with the primary key could not be found + */ + public DDMStructureLink[] findByClassNameId_PrevAndNext( + long structureLinkId, long classNameId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException; + + /** + * Removes all the d d m structure links where classNameId = ? from the database. + * + * @param classNameId the class name ID + */ + public void removeByClassNameId(long classNameId); + + /** + * Returns the number of d d m structure links where classNameId = ?. + * + * @param classNameId the class name ID + * @return the number of matching d d m structure links + */ + public int countByClassNameId(long classNameId); + /** * Returns all the d d m structure links where structureId = ?. * diff --git a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructureLinkUtil.java b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructureLinkUtil.java index cb0caa950d544c..cc28e98eabbde4 100644 --- a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructureLinkUtil.java +++ b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructureLinkUtil.java @@ -109,6 +109,146 @@ public static DDMStructureLink update(DDMStructureLink ddmStructureLink, return getPersistence().update(ddmStructureLink, serviceContext); } + /** + * Returns all the d d m structure links where classNameId = ?. + * + * @param classNameId the class name ID + * @return the matching d d m structure links + */ + public static List findByClassNameId(long classNameId) { + return getPersistence().findByClassNameId(classNameId); + } + + /** + * Returns a range of all the d d m structure links where classNameId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureLinkModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param classNameId the class name ID + * @param start the lower bound of the range of d d m structure links + * @param end the upper bound of the range of d d m structure links (not inclusive) + * @return the range of matching d d m structure links + */ + public static List findByClassNameId(long classNameId, + int start, int end) { + return getPersistence().findByClassNameId(classNameId, start, end); + } + + /** + * Returns an ordered range of all the d d m structure links where classNameId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureLinkModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param classNameId the class name ID + * @param start the lower bound of the range of d d m structure links + * @param end the upper bound of the range of d d m structure links (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching d d m structure links + */ + public static List findByClassNameId(long classNameId, + int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByClassNameId(classNameId, start, end, orderByComparator); + } + + /** + * Returns the first d d m structure link in the ordered set where classNameId = ?. + * + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching d d m structure link + * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found + */ + public static DDMStructureLink findByClassNameId_First(long classNameId, + OrderByComparator orderByComparator) + throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException { + return getPersistence() + .findByClassNameId_First(classNameId, orderByComparator); + } + + /** + * Returns the first d d m structure link in the ordered set where classNameId = ?. + * + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching d d m structure link, or null if a matching d d m structure link could not be found + */ + public static DDMStructureLink fetchByClassNameId_First(long classNameId, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByClassNameId_First(classNameId, orderByComparator); + } + + /** + * Returns the last d d m structure link in the ordered set where classNameId = ?. + * + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching d d m structure link + * @throws NoSuchStructureLinkException if a matching d d m structure link could not be found + */ + public static DDMStructureLink findByClassNameId_Last(long classNameId, + OrderByComparator orderByComparator) + throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException { + return getPersistence() + .findByClassNameId_Last(classNameId, orderByComparator); + } + + /** + * Returns the last d d m structure link in the ordered set where classNameId = ?. + * + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching d d m structure link, or null if a matching d d m structure link could not be found + */ + public static DDMStructureLink fetchByClassNameId_Last(long classNameId, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByClassNameId_Last(classNameId, orderByComparator); + } + + /** + * Returns the d d m structure links before and after the current d d m structure link in the ordered set where classNameId = ?. + * + * @param structureLinkId the primary key of the current d d m structure link + * @param classNameId the class name ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next d d m structure link + * @throws NoSuchStructureLinkException if a d d m structure link with the primary key could not be found + */ + public static DDMStructureLink[] findByClassNameId_PrevAndNext( + long structureLinkId, long classNameId, + OrderByComparator orderByComparator) + throws com.liferay.portlet.dynamicdatamapping.NoSuchStructureLinkException { + return getPersistence() + .findByClassNameId_PrevAndNext(structureLinkId, classNameId, + orderByComparator); + } + + /** + * Removes all the d d m structure links where classNameId = ? from the database. + * + * @param classNameId the class name ID + */ + public static void removeByClassNameId(long classNameId) { + getPersistence().removeByClassNameId(classNameId); + } + + /** + * Returns the number of d d m structure links where classNameId = ?. + * + * @param classNameId the class name ID + * @return the number of matching d d m structure links + */ + public static int countByClassNameId(long classNameId) { + return getPersistence().countByClassNameId(classNameId); + } + /** * Returns all the d d m structure links where structureId = ?. * diff --git a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructurePersistence.java b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructurePersistence.java index c7ae98fdd0d08e..432215208f0b23 100644 --- a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructurePersistence.java +++ b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructurePersistence.java @@ -1944,170 +1944,4 @@ public java.util.List findAll(int start, int end, * @return the number of d d m structures */ public int countAll(); - - /** - * Returns the primaryKeys of document library file entry types associated with the d d m structure. - * - * @param pk the primary key of the d d m structure - * @return long[] of the primaryKeys of document library file entry types associated with the d d m structure - */ - public long[] getDLFileEntryTypePrimaryKeys(long pk); - - /** - * Returns all the document library file entry types associated with the d d m structure. - * - * @param pk the primary key of the d d m structure - * @return the document library file entry types associated with the d d m structure - */ - public java.util.List getDLFileEntryTypes( - long pk); - - /** - * Returns a range of all the document library file entry types associated with the d d m structure. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param pk the primary key of the d d m structure - * @param start the lower bound of the range of d d m structures - * @param end the upper bound of the range of d d m structures (not inclusive) - * @return the range of document library file entry types associated with the d d m structure - */ - public java.util.List getDLFileEntryTypes( - long pk, int start, int end); - - /** - * Returns an ordered range of all the document library file entry types associated with the d d m structure. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param pk the primary key of the d d m structure - * @param start the lower bound of the range of d d m structures - * @param end the upper bound of the range of d d m structures (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of document library file entry types associated with the d d m structure - */ - public java.util.List getDLFileEntryTypes( - long pk, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator); - - /** - * Returns the number of document library file entry types associated with the d d m structure. - * - * @param pk the primary key of the d d m structure - * @return the number of document library file entry types associated with the d d m structure - */ - public int getDLFileEntryTypesSize(long pk); - - /** - * Returns true if the document library file entry type is associated with the d d m structure. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePK the primary key of the document library file entry type - * @return true if the document library file entry type is associated with the d d m structure; false otherwise - */ - public boolean containsDLFileEntryType(long pk, long dlFileEntryTypePK); - - /** - * Returns true if the d d m structure has any document library file entry types associated with it. - * - * @param pk the primary key of the d d m structure to check for associations with document library file entry types - * @return true if the d d m structure has any document library file entry types associated with it; false otherwise - */ - public boolean containsDLFileEntryTypes(long pk); - - /** - * Adds an association between the d d m structure and the document library file entry type. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePK the primary key of the document library file entry type - */ - public void addDLFileEntryType(long pk, long dlFileEntryTypePK); - - /** - * Adds an association between the d d m structure and the document library file entry type. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryType the document library file entry type - */ - public void addDLFileEntryType(long pk, - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType); - - /** - * Adds an association between the d d m structure and the document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePKs the primary keys of the document library file entry types - */ - public void addDLFileEntryTypes(long pk, long[] dlFileEntryTypePKs); - - /** - * Adds an association between the d d m structure and the document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypes the document library file entry types - */ - public void addDLFileEntryTypes(long pk, - java.util.List dlFileEntryTypes); - - /** - * Clears all associations between the d d m structure and its document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure to clear the associated document library file entry types from - */ - public void clearDLFileEntryTypes(long pk); - - /** - * Removes the association between the d d m structure and the document library file entry type. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePK the primary key of the document library file entry type - */ - public void removeDLFileEntryType(long pk, long dlFileEntryTypePK); - - /** - * Removes the association between the d d m structure and the document library file entry type. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryType the document library file entry type - */ - public void removeDLFileEntryType(long pk, - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType); - - /** - * Removes the association between the d d m structure and the document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePKs the primary keys of the document library file entry types - */ - public void removeDLFileEntryTypes(long pk, long[] dlFileEntryTypePKs); - - /** - * Removes the association between the d d m structure and the document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypes the document library file entry types - */ - public void removeDLFileEntryTypes(long pk, - java.util.List dlFileEntryTypes); - - /** - * Sets the document library file entry types associated with the d d m structure, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePKs the primary keys of the document library file entry types to be associated with the d d m structure - */ - public void setDLFileEntryTypes(long pk, long[] dlFileEntryTypePKs); - - /** - * Sets the document library file entry types associated with the d d m structure, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypes the document library file entry types to be associated with the d d m structure - */ - public void setDLFileEntryTypes(long pk, - java.util.List dlFileEntryTypes); } \ No newline at end of file diff --git a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructureUtil.java b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructureUtil.java index f40da337f9c3f3..b927e4c5bb1e86 100644 --- a/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructureUtil.java +++ b/portal-service/src/com/liferay/portlet/dynamicdatamapping/service/persistence/DDMStructureUtil.java @@ -2430,210 +2430,6 @@ public static int countAll() { return getPersistence().countAll(); } - /** - * Returns the primaryKeys of document library file entry types associated with the d d m structure. - * - * @param pk the primary key of the d d m structure - * @return long[] of the primaryKeys of document library file entry types associated with the d d m structure - */ - public static long[] getDLFileEntryTypePrimaryKeys(long pk) { - return getPersistence().getDLFileEntryTypePrimaryKeys(pk); - } - - /** - * Returns all the document library file entry types associated with the d d m structure. - * - * @param pk the primary key of the d d m structure - * @return the document library file entry types associated with the d d m structure - */ - public static List getDLFileEntryTypes( - long pk) { - return getPersistence().getDLFileEntryTypes(pk); - } - - /** - * Returns a range of all the document library file entry types associated with the d d m structure. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param pk the primary key of the d d m structure - * @param start the lower bound of the range of d d m structures - * @param end the upper bound of the range of d d m structures (not inclusive) - * @return the range of document library file entry types associated with the d d m structure - */ - public static List getDLFileEntryTypes( - long pk, int start, int end) { - return getPersistence().getDLFileEntryTypes(pk, start, end); - } - - /** - * Returns an ordered range of all the document library file entry types associated with the d d m structure. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DDMStructureModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param pk the primary key of the d d m structure - * @param start the lower bound of the range of d d m structures - * @param end the upper bound of the range of d d m structures (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of document library file entry types associated with the d d m structure - */ - public static List getDLFileEntryTypes( - long pk, int start, int end, - OrderByComparator orderByComparator) { - return getPersistence() - .getDLFileEntryTypes(pk, start, end, orderByComparator); - } - - /** - * Returns the number of document library file entry types associated with the d d m structure. - * - * @param pk the primary key of the d d m structure - * @return the number of document library file entry types associated with the d d m structure - */ - public static int getDLFileEntryTypesSize(long pk) { - return getPersistence().getDLFileEntryTypesSize(pk); - } - - /** - * Returns true if the document library file entry type is associated with the d d m structure. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePK the primary key of the document library file entry type - * @return true if the document library file entry type is associated with the d d m structure; false otherwise - */ - public static boolean containsDLFileEntryType(long pk, - long dlFileEntryTypePK) { - return getPersistence().containsDLFileEntryType(pk, dlFileEntryTypePK); - } - - /** - * Returns true if the d d m structure has any document library file entry types associated with it. - * - * @param pk the primary key of the d d m structure to check for associations with document library file entry types - * @return true if the d d m structure has any document library file entry types associated with it; false otherwise - */ - public static boolean containsDLFileEntryTypes(long pk) { - return getPersistence().containsDLFileEntryTypes(pk); - } - - /** - * Adds an association between the d d m structure and the document library file entry type. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePK the primary key of the document library file entry type - */ - public static void addDLFileEntryType(long pk, long dlFileEntryTypePK) { - getPersistence().addDLFileEntryType(pk, dlFileEntryTypePK); - } - - /** - * Adds an association between the d d m structure and the document library file entry type. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryType the document library file entry type - */ - public static void addDLFileEntryType(long pk, - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType) { - getPersistence().addDLFileEntryType(pk, dlFileEntryType); - } - - /** - * Adds an association between the d d m structure and the document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePKs the primary keys of the document library file entry types - */ - public static void addDLFileEntryTypes(long pk, long[] dlFileEntryTypePKs) { - getPersistence().addDLFileEntryTypes(pk, dlFileEntryTypePKs); - } - - /** - * Adds an association between the d d m structure and the document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypes the document library file entry types - */ - public static void addDLFileEntryTypes(long pk, - List dlFileEntryTypes) { - getPersistence().addDLFileEntryTypes(pk, dlFileEntryTypes); - } - - /** - * Clears all associations between the d d m structure and its document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure to clear the associated document library file entry types from - */ - public static void clearDLFileEntryTypes(long pk) { - getPersistence().clearDLFileEntryTypes(pk); - } - - /** - * Removes the association between the d d m structure and the document library file entry type. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePK the primary key of the document library file entry type - */ - public static void removeDLFileEntryType(long pk, long dlFileEntryTypePK) { - getPersistence().removeDLFileEntryType(pk, dlFileEntryTypePK); - } - - /** - * Removes the association between the d d m structure and the document library file entry type. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryType the document library file entry type - */ - public static void removeDLFileEntryType(long pk, - com.liferay.portlet.documentlibrary.model.DLFileEntryType dlFileEntryType) { - getPersistence().removeDLFileEntryType(pk, dlFileEntryType); - } - - /** - * Removes the association between the d d m structure and the document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePKs the primary keys of the document library file entry types - */ - public static void removeDLFileEntryTypes(long pk, long[] dlFileEntryTypePKs) { - getPersistence().removeDLFileEntryTypes(pk, dlFileEntryTypePKs); - } - - /** - * Removes the association between the d d m structure and the document library file entry types. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypes the document library file entry types - */ - public static void removeDLFileEntryTypes(long pk, - List dlFileEntryTypes) { - getPersistence().removeDLFileEntryTypes(pk, dlFileEntryTypes); - } - - /** - * Sets the document library file entry types associated with the d d m structure, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypePKs the primary keys of the document library file entry types to be associated with the d d m structure - */ - public static void setDLFileEntryTypes(long pk, long[] dlFileEntryTypePKs) { - getPersistence().setDLFileEntryTypes(pk, dlFileEntryTypePKs); - } - - /** - * Sets the document library file entry types associated with the d d m structure, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. - * - * @param pk the primary key of the d d m structure - * @param dlFileEntryTypes the document library file entry types to be associated with the d d m structure - */ - public static void setDLFileEntryTypes(long pk, - List dlFileEntryTypes) { - getPersistence().setDLFileEntryTypes(pk, dlFileEntryTypes); - } - public static DDMStructurePersistence getPersistence() { if (_persistence == null) { _persistence = (DDMStructurePersistence)PortalBeanLocatorUtil.locate(DDMStructurePersistence.class.getName()); diff --git a/sql/indexes.sql b/sql/indexes.sql index 7d38f3ef25820f..34f399a35acb1f 100644 --- a/sql/indexes.sql +++ b/sql/indexes.sql @@ -129,7 +129,7 @@ create index IX_A90FF72A on DDMStructureLayout (uuid_, companyId); create unique index IX_C9A0402C on DDMStructureLayout (uuid_, groupId); create unique index IX_E43143A3 on DDMStructureLink (classNameId, classPK, structureId); -create unique index IX_C803899D on DDMStructureLink (classPK); +create index IX_EB4F2D96 on DDMStructureLink (classNameId, structureId); create index IX_17692B58 on DDMStructureLink (structureId); create index IX_17B3C96C on DDMStructureVersion (structureId, status);