Liferay 6.2.0-ce-m3

com.liferay.portlet.dynamicdatamapping.service
Interface DDMTemplateLocalService

All Superinterfaces:
BaseLocalService, PersistedModelLocalService
All Known Implementing Classes:
DDMTemplateLocalServiceWrapper

@Transactional(isolation=PORTAL,
               rollbackFor={PortalException.class,SystemException.class})
public interface DDMTemplateLocalService
extends BaseLocalService, PersistedModelLocalService

The interface for the d d m template local service.

This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.

See Also:
DDMTemplateLocalServiceUtil, com.liferay.portlet.dynamicdatamapping.service.base.DDMTemplateLocalServiceBaseImpl, com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLocalServiceImpl

Method Summary
 DDMTemplate addDDMTemplate(DDMTemplate ddmTemplate)
          Adds the d d m template to the database.
 DDMTemplate addTemplate(long userId, long groupId, long classNameId, long classPK, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, ServiceContext serviceContext)
           
 DDMTemplate addTemplate(long userId, long groupId, long classNameId, long classPK, String templateKey, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, boolean smallImage, String smallImageURL, File smallImageFile, ServiceContext serviceContext)
           
 void addTemplateResources(DDMTemplate template, boolean addGroupPermissions, boolean addGuestPermissions)
           
 void addTemplateResources(DDMTemplate template, String[] groupPermissions, String[] guestPermissions)
           
 DDMTemplate copyTemplate(long userId, long templateId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, ServiceContext serviceContext)
           
 List<DDMTemplate> copyTemplates(long userId, long classNameId, long oldClassPK, long newClassPK, String type, ServiceContext serviceContext)
           
 DDMTemplate createDDMTemplate(long templateId)
          Creates a new d d m template with the primary key.
 DDMTemplate deleteDDMTemplate(DDMTemplate ddmTemplate)
          Deletes the d d m template from the database.
 DDMTemplate deleteDDMTemplate(long templateId)
          Deletes the d d m template with the primary key from the database.
 void deleteTemplate(DDMTemplate template)
           
 void deleteTemplate(long templateId)
           
 void deleteTemplates(long groupId)
           
 DynamicQuery dynamicQuery()
           
 List dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
 List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
 List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
          Performs a dynamic query on the database and returns an ordered range of the matching rows.
 long dynamicQueryCount(DynamicQuery dynamicQuery)
          Returns the number of rows that match the dynamic query.
 DDMTemplate fetchDDMTemplate(long templateId)
           
 DDMTemplate fetchTemplate(long groupId, String templateKey)
           
 String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
 DDMTemplate getDDMTemplate(long templateId)
          Returns the d d m template with the primary key.
 DDMTemplate getDDMTemplateByUuidAndGroupId(String uuid, long groupId)
          Returns the d d m template with the UUID in the group.
 List<DDMTemplate> getDDMTemplates(int start, int end)
          Returns a range of all the d d m templates.
 int getDDMTemplatesCount()
          Returns the number of d d m templates.
 PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
 DDMTemplate getTemplate(long templateId)
           
 DDMTemplate getTemplate(long groupId, String templateKey)
           
 DDMTemplate getTemplate(long groupId, String templateKey, boolean includeGlobalTemplates)
           
 List<DDMTemplate> getTemplates(long classPK)
           
 List<DDMTemplate> getTemplates(long groupId, long classNameId)
           
 List<DDMTemplate> getTemplates(long groupId, long classNameId, long classPK)
           
 List<DDMTemplate> getTemplates(long classNameId, long classPK, String type)
           
 List<DDMTemplate> getTemplates(long classNameId, long classPK, String type, String mode)
           
 List<DDMTemplate> search(long companyId, long[] groupIds, long[] classNameIds, long classPK, String keywords, String type, String mode, int start, int end, OrderByComparator orderByComparator)
           
 List<DDMTemplate> search(long companyId, long[] groupIds, long[] classNameIds, long classPK, String name, String description, String type, String mode, String language, boolean andOperator, int start, int end, OrderByComparator orderByComparator)
           
 List<DDMTemplate> search(long companyId, long groupId, long classNameId, long classPK, String keywords, String type, String mode, int start, int end, OrderByComparator orderByComparator)
           
 List<DDMTemplate> search(long companyId, long groupId, long classNameId, long classPK, String name, String description, String type, String mode, String language, boolean andOperator, int start, int end, OrderByComparator orderByComparator)
           
 int searchCount(long companyId, long[] groupIds, long[] classNameIds, long classPK, String keywords, String type, String mode)
           
 int searchCount(long companyId, long[] groupIds, long[] classNameIds, long classPK, String name, String description, String type, String mode, String language, boolean andOperator)
           
 int searchCount(long companyId, long groupId, long classNameId, long classPK, String keywords, String type, String mode)
           
 int searchCount(long companyId, long groupId, long classNameId, long classPK, String name, String description, String type, String mode, String language, boolean andOperator)
           
 void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 DDMTemplate updateDDMTemplate(DDMTemplate ddmTemplate)
          Updates the d d m template in the database or adds it if it does not yet exist.
 DDMTemplate updateTemplate(long templateId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, boolean smallImage, String smallImageURL, File smallImageFile, ServiceContext serviceContext)
           
 

Method Detail

addDDMTemplate

DDMTemplate addDDMTemplate(DDMTemplate ddmTemplate)
                           throws SystemException
Adds the d d m template to the database. Also notifies the appropriate model listeners.

Parameters:
ddmTemplate - the d d m template
Returns:
the d d m template that was added
Throws:
SystemException - if a system exception occurred

createDDMTemplate

DDMTemplate createDDMTemplate(long templateId)
Creates a new d d m template with the primary key. Does not add the d d m template to the database.

Parameters:
templateId - the primary key for the new d d m template
Returns:
the new d d m template

deleteDDMTemplate

DDMTemplate deleteDDMTemplate(long templateId)
                              throws PortalException,
                                     SystemException
Deletes the d d m template with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
templateId - the primary key of the d d m template
Returns:
the d d m template that was removed
Throws:
PortalException - if a d d m template with the primary key could not be found
SystemException - if a system exception occurred

deleteDDMTemplate

DDMTemplate deleteDDMTemplate(DDMTemplate ddmTemplate)
                              throws SystemException
Deletes the d d m template from the database. Also notifies the appropriate model listeners.

Parameters:
ddmTemplate - the d d m template
Returns:
the d d m template that was removed
Throws:
SystemException - if a system exception occurred

dynamicQuery

DynamicQuery dynamicQuery()

dynamicQuery

List dynamicQuery(DynamicQuery dynamicQuery)
                  throws SystemException
Performs a dynamic query on the database and returns the matching rows.

Parameters:
dynamicQuery - the dynamic query
Returns:
the matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

List dynamicQuery(DynamicQuery dynamicQuery,
                  int start,
                  int end)
                  throws SystemException
Performs a dynamic query on the database and returns a range of the matching rows.

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 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 QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from DDMTemplateModelImpl. 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.

Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
Returns:
the range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

List dynamicQuery(DynamicQuery dynamicQuery,
                  int start,
                  int end,
                  OrderByComparator orderByComparator)
                  throws SystemException
Performs a dynamic query on the database and returns an ordered range of the matching rows.

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 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 QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from DDMTemplateModelImpl. 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.

Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

long dynamicQueryCount(DynamicQuery dynamicQuery)
                       throws SystemException
Returns the number of rows that match the dynamic query.

Parameters:
dynamicQuery - the dynamic query
Returns:
the number of rows that match the dynamic query
Throws:
SystemException - if a system exception occurred

fetchDDMTemplate

@Transactional(propagation=SUPPORTS,
               readOnly=true)
DDMTemplate fetchDDMTemplate(long templateId)
                             throws SystemException
Throws:
SystemException

getDDMTemplate

@Transactional(propagation=SUPPORTS,
               readOnly=true)
DDMTemplate getDDMTemplate(long templateId)
                           throws PortalException,
                                  SystemException
Returns the d d m template with the primary key.

Parameters:
templateId - the primary key of the d d m template
Returns:
the d d m template
Throws:
PortalException - if a d d m template with the primary key could not be found
SystemException - if a system exception occurred

getPersistedModel

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                 throws PortalException,
                                        SystemException
Specified by:
getPersistedModel in interface PersistedModelLocalService
Throws:
PortalException
SystemException

getDDMTemplateByUuidAndGroupId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
DDMTemplate getDDMTemplateByUuidAndGroupId(String uuid,
                                                                                    long groupId)
                                           throws PortalException,
                                                  SystemException
Returns the d d m template with the UUID in the group.

Parameters:
uuid - the UUID of d d m template
groupId - the group id of the d d m template
Returns:
the d d m template
Throws:
PortalException - if a d d m template with the UUID in the group could not be found
SystemException - if a system exception occurred

getDDMTemplates

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<DDMTemplate> getDDMTemplates(int start,
                                                                           int end)
                                  throws SystemException
Returns a range of all the d d m templates.

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 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 QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from DDMTemplateModelImpl. 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.

Parameters:
start - the lower bound of the range of d d m templates
end - the upper bound of the range of d d m templates (not inclusive)
Returns:
the range of d d m templates
Throws:
SystemException - if a system exception occurred

getDDMTemplatesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getDDMTemplatesCount()
                         throws SystemException
Returns the number of d d m templates.

Returns:
the number of d d m templates
Throws:
SystemException - if a system exception occurred

updateDDMTemplate

DDMTemplate updateDDMTemplate(DDMTemplate ddmTemplate)
                              throws SystemException
Updates the d d m template in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
ddmTemplate - the d d m template
Returns:
the d d m template that was updated
Throws:
SystemException - if a system exception occurred

getBeanIdentifier

String getBeanIdentifier()
Returns the Spring bean ID for this bean.

Returns:
the Spring bean ID for this bean

setBeanIdentifier

void setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean.

Parameters:
beanIdentifier - the Spring bean ID for this bean

addTemplate

DDMTemplate addTemplate(long userId,
                        long groupId,
                        long classNameId,
                        long classPK,
                        Map<Locale,String> nameMap,
                        Map<Locale,String> descriptionMap,
                        String type,
                        String mode,
                        String language,
                        String script,
                        ServiceContext serviceContext)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

addTemplate

DDMTemplate addTemplate(long userId,
                        long groupId,
                        long classNameId,
                        long classPK,
                        String templateKey,
                        Map<Locale,String> nameMap,
                        Map<Locale,String> descriptionMap,
                        String type,
                        String mode,
                        String language,
                        String script,
                        boolean cacheable,
                        boolean smallImage,
                        String smallImageURL,
                        File smallImageFile,
                        ServiceContext serviceContext)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

addTemplateResources

void addTemplateResources(DDMTemplate template,
                          boolean addGroupPermissions,
                          boolean addGuestPermissions)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

addTemplateResources

void addTemplateResources(DDMTemplate template,
                          String[] groupPermissions,
                          String[] guestPermissions)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

copyTemplate

DDMTemplate copyTemplate(long userId,
                         long templateId,
                         Map<Locale,String> nameMap,
                         Map<Locale,String> descriptionMap,
                         ServiceContext serviceContext)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

copyTemplates

List<DDMTemplate> copyTemplates(long userId,
                                long classNameId,
                                long oldClassPK,
                                long newClassPK,
                                String type,
                                ServiceContext serviceContext)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

deleteTemplate

void deleteTemplate(DDMTemplate template)
                    throws PortalException,
                           SystemException
Throws:
PortalException
SystemException

deleteTemplate

void deleteTemplate(long templateId)
                    throws PortalException,
                           SystemException
Throws:
PortalException
SystemException

deleteTemplates

void deleteTemplates(long groupId)
                     throws PortalException,
                            SystemException
Throws:
PortalException
SystemException

fetchTemplate

@Transactional(propagation=SUPPORTS,
               readOnly=true)
DDMTemplate fetchTemplate(long groupId,
                                                                   String templateKey)
                          throws SystemException
Throws:
SystemException

getTemplate

@Transactional(propagation=SUPPORTS,
               readOnly=true)
DDMTemplate getTemplate(long templateId)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

getTemplate

@Transactional(propagation=SUPPORTS,
               readOnly=true)
DDMTemplate getTemplate(long groupId,
                                                                 String templateKey)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

getTemplate

@Transactional(propagation=SUPPORTS,
               readOnly=true)
DDMTemplate getTemplate(long groupId,
                                                                 String templateKey,
                                                                 boolean includeGlobalTemplates)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

getTemplates

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<DDMTemplate> getTemplates(long classPK)
                               throws SystemException
Throws:
SystemException

getTemplates

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<DDMTemplate> getTemplates(long groupId,
                                                                        long classNameId)
                               throws SystemException
Throws:
SystemException

getTemplates

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<DDMTemplate> getTemplates(long groupId,
                                                                        long classNameId,
                                                                        long classPK)
                               throws SystemException
Throws:
SystemException

getTemplates

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<DDMTemplate> getTemplates(long classNameId,
                                                                        long classPK,
                                                                        String type)
                               throws SystemException
Throws:
SystemException

getTemplates

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<DDMTemplate> getTemplates(long classNameId,
                                                                        long classPK,
                                                                        String type,
                                                                        String mode)
                               throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<DDMTemplate> search(long companyId,
                                                                  long groupId,
                                                                  long classNameId,
                                                                  long classPK,
                                                                  String keywords,
                                                                  String type,
                                                                  String mode,
                                                                  int start,
                                                                  int end,
                                                                  OrderByComparator orderByComparator)
                         throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<DDMTemplate> search(long companyId,
                                                                  long groupId,
                                                                  long classNameId,
                                                                  long classPK,
                                                                  String name,
                                                                  String description,
                                                                  String type,
                                                                  String mode,
                                                                  String language,
                                                                  boolean andOperator,
                                                                  int start,
                                                                  int end,
                                                                  OrderByComparator orderByComparator)
                         throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<DDMTemplate> search(long companyId,
                                                                  long[] groupIds,
                                                                  long[] classNameIds,
                                                                  long classPK,
                                                                  String keywords,
                                                                  String type,
                                                                  String mode,
                                                                  int start,
                                                                  int end,
                                                                  OrderByComparator orderByComparator)
                         throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<DDMTemplate> search(long companyId,
                                                                  long[] groupIds,
                                                                  long[] classNameIds,
                                                                  long classPK,
                                                                  String name,
                                                                  String description,
                                                                  String type,
                                                                  String mode,
                                                                  String language,
                                                                  boolean andOperator,
                                                                  int start,
                                                                  int end,
                                                                  OrderByComparator orderByComparator)
                         throws SystemException
Throws:
SystemException

searchCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int searchCount(long companyId,
                                                         long groupId,
                                                         long classNameId,
                                                         long classPK,
                                                         String keywords,
                                                         String type,
                                                         String mode)
                throws SystemException
Throws:
SystemException

searchCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int searchCount(long companyId,
                                                         long groupId,
                                                         long classNameId,
                                                         long classPK,
                                                         String name,
                                                         String description,
                                                         String type,
                                                         String mode,
                                                         String language,
                                                         boolean andOperator)
                throws SystemException
Throws:
SystemException

searchCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int searchCount(long companyId,
                                                         long[] groupIds,
                                                         long[] classNameIds,
                                                         long classPK,
                                                         String keywords,
                                                         String type,
                                                         String mode)
                throws SystemException
Throws:
SystemException

searchCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int searchCount(long companyId,
                                                         long[] groupIds,
                                                         long[] classNameIds,
                                                         long classPK,
                                                         String name,
                                                         String description,
                                                         String type,
                                                         String mode,
                                                         String language,
                                                         boolean andOperator)
                throws SystemException
Throws:
SystemException

updateTemplate

DDMTemplate updateTemplate(long templateId,
                           Map<Locale,String> nameMap,
                           Map<Locale,String> descriptionMap,
                           String type,
                           String mode,
                           String language,
                           String script,
                           boolean cacheable,
                           boolean smallImage,
                           String smallImageURL,
                           File smallImageFile,
                           ServiceContext serviceContext)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

Liferay 6.2.0-ce-m3