From c23feecf054b7acb725a848900f7d04a0d2fa75f Mon Sep 17 00:00:00 2001 From: Salvatore La Manna Date: Mon, 4 Oct 2021 12:10:10 +0200 Subject: [PATCH] Asseverazione richiesta solo al collaudatore principale --- .../portos/bo/util/AzioniPraticheUtil.java | 2 - .../liferay/portos/bo/util/DelegheUtil.java | 8 +- .../tref/liferay/portos/bo/util/MailUtil.java | 1 + .../bo/scheduler/SchedulerWorkflow.java | 3 +- .../it/mwg/sismica/bo/util/SismicaUtil.java | 414 +++-- .../impl/AsseverazioneLocalServiceImpl.java | 7 +- .../impl/IntPraticaLocalServiceImpl.java | 2 +- .../docroot/WEB-INF/src/service.properties | 4 +- .../html/fascicolofe/fascicolo_action.jsp | 177 +- .../model/EmailTemplateAttachment.java | 35 - .../model/EmailTemplateAttachmentClp.java | 301 ---- .../model/EmailTemplateAttachmentModel.java | 146 -- .../model/EmailTemplateAttachmentSoap.java | 111 -- .../model/EmailTemplateAttachmentWrapper.java | 278 --- .../EmailTemplateAttachmentLocalService.java | 256 --- ...mailTemplateAttachmentLocalServiceClp.java | 733 -------- ...ailTemplateAttachmentLocalServiceUtil.java | 313 ---- ...TemplateAttachmentLocalServiceWrapper.java | 320 ---- ...plateAttachmentActionableDynamicQuery.java | 38 - .../EmailTemplateAttachmentPK.java | 140 -- .../EmailTemplateAttachmentPersistence.java | 362 ---- .../EmailTemplateAttachmentUtil.java | 526 ------ .../impl/EmailTemplateAttachmentBaseImpl.java | 50 - .../EmailTemplateAttachmentCacheModel.java | 76 - .../impl/EmailTemplateAttachmentImpl.java | 34 - .../EmailTemplateAttachmentModelImpl.java | 318 ---- ...emplateAttachmentLocalServiceBaseImpl.java | 797 --------- ...plateAttachmentLocalServiceClpInvoker.java | 266 --- ...mailTemplateAttachmentPersistenceImpl.java | 1491 ----------------- 29 files changed, 312 insertions(+), 6897 deletions(-) delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachment.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentClp.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentModel.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentSoap.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentWrapper.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalService.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalServiceClp.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalServiceUtil.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalServiceWrapper.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentActionableDynamicQuery.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentPK.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentPersistence.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentUtil.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentBaseImpl.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentCacheModel.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentImpl.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentModelImpl.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/base/EmailTemplateAttachmentLocalServiceBaseImpl.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/base/EmailTemplateAttachmentLocalServiceClpInvoker.java delete mode 100644 liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentPersistenceImpl.java diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AzioniPraticheUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AzioniPraticheUtil.java index 62b9d32c..b8750a27 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AzioniPraticheUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AzioniPraticheUtil.java @@ -127,12 +127,10 @@ public class AzioniPraticheUtil { } else if (StatoPraticaConstants.COLLAUDO_PARZIALE.equalsIgnoreCase(intPratica.getStatoPratica())) { status = STATE_COLLAUDO_PARZIALE; } - List actionList = STATE_ACTIONS_MAP.get(status); if (actionList == null) { actionList = new ArrayList<>(); } - if (!actionList.contains(action)) { return false; } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/DelegheUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/DelegheUtil.java index be5c0a77..62c3fa38 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/DelegheUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/DelegheUtil.java @@ -165,16 +165,12 @@ public class DelegheUtil { public static boolean hasDeleteDelega(long userId, long intPraticaId) throws PortalException, SystemException { - // TODO completare e controllare - boolean controllo = hasCreazioneDelega(userId, intPraticaId); - return controllo; + return hasCreazioneDelega(userId, intPraticaId); } public static boolean hasAnnullaDelega(long userId, long intPraticaId) throws PortalException, SystemException { - // TODO completare e controllare - boolean controllo = hasCreazioneDelega(userId, intPraticaId); - return controllo; + return hasCreazioneDelega(userId, intPraticaId); } public static boolean hasDelegaCompilazioneDomanda(long userId, long dettPraticaId) throws PortalException, diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/MailUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/MailUtil.java index 201cfbc6..7c17641e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/MailUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/MailUtil.java @@ -199,6 +199,7 @@ public class MailUtil { } public static void invioNotificaGeologo(ParereGeologo parereGeologo, ServiceContext serviceContext) { + _log.info("start invioNotificaGeologo parereGeologo=" + parereGeologo.getParereGeologoId()); try { User geologo = UserLocalServiceUtil.getUser(parereGeologo.getGeologoUserId()); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/scheduler/SchedulerWorkflow.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/scheduler/SchedulerWorkflow.java index 8c317b3e..b39b3b55 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/scheduler/SchedulerWorkflow.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/scheduler/SchedulerWorkflow.java @@ -30,6 +30,7 @@ public class SchedulerWorkflow implements MessageListener { if (lock.tryLock()) { _log.info("Inizio elaborazione"); try { + SismicaUtil.integrazioniScadute(); for (Company company : CompanyLocalServiceUtil.getCompanies()) { long companyId = company.getCompanyId(); Role role = RoleLocalServiceUtil.getRole(companyId, RoleConstants.ADMINISTRATOR); @@ -37,8 +38,8 @@ public class SchedulerWorkflow implements MessageListener { PermissionChecker permissionChecker = PermissionCheckerFactoryUtil.create(user); PermissionThreadLocal.setPermissionChecker(permissionChecker); SismicaUtil.riparaWorkflow(companyId, user.getUserId()); - SismicaUtil.integrazioniScadute(); } + _log.info("Fine elaborazione"); } catch (Exception e) { e.printStackTrace(); } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java index 171d7c15..13fd4c42 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java @@ -1,7 +1,5 @@ /** - * * @author Salvatore La Manna, Manifattura Web Group per Regione Siciliana - * */ package it.mwg.sismica.bo.util; @@ -156,8 +154,7 @@ public class SismicaUtil { } catch (ParseException e) { try { date = new SimpleDateFormat("yyyy-MM-dd").parse(str); - } catch (ParseException e1) { - } + } catch (ParseException e1) {} } return date; } @@ -168,8 +165,7 @@ public class SismicaUtil { try { start = sdfGiornoDB.parse(sdfGiornoDB.format(start)); end = sdfGiornoDB.parse(sdfGiornoDB.format(end)); - } catch (ParseException e) { - } + } catch (ParseException e) {} return Math.round((end.getTime() - start.getTime()) / 86400000.0); } return null; @@ -185,7 +181,8 @@ public class SismicaUtil { final long nodeId = 21639; final String nodeName = "Esito"; final String validCurrentNodeName = "signal_cittadino"; - final String commento = "Pratica riassegnata automaticamente dal sistema per scadenza dei termini di integrazione"; + final String commento = "Pratica riassegnata automaticamente dal sistema per scadenza dei termini di" + + " integrazione"; Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR, 0); calendar.set(Calendar.MINUTE, 0); @@ -298,6 +295,10 @@ public class SismicaUtil { instanceToken.setCurrentKaleoNodeId(nodeId); instanceToken.setCurrentKaleoNodeName(nodeName); KaleoInstanceTokenLocalServiceUtil.updateKaleoInstanceToken(instanceToken); + if (pratica.getStatus() != WorkflowConstants.STATUS_PENDING) { + pratica.setStatus(WorkflowConstants.STATUS_PENDING); + IntPraticaLocalServiceUtil.updateIntPratica(pratica); + } esitoLog(esito, "Riassegnato workflow instance " + instance.getKaleoInstanceId() + " per pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), istruttore " + tecnicoUser.getFullName()); @@ -360,14 +361,14 @@ public class SismicaUtil { long nodeId; String nodeName; switch (mode) { - case "Esito": - taskId = 21642; - taskName = "Esito"; - nodeId = 21639; - nodeName = "Esito"; - break; - default: - return esitoLog(esito, "Nome nodo non corretto: " + mode); + case "Esito": + taskId = 21642; + taskName = "Esito"; + nodeId = 21639; + nodeName = "Esito"; + break; + default: + return esitoLog(esito, "Nome nodo non corretto: " + mode); } esito.addAll(riassegnaAlTecnico(pratica, comment, null, taskId, taskName, nodeId, nodeName)); } @@ -450,99 +451,99 @@ public class SismicaUtil { String className = null; long classPk = 0L; switch (tipoAvviso) { - case StatoPraticaConstants.COLLAUDO: - List collaudi = CollaudoLocalServiceUtil.findByIntPraticaId_Completata(intPraticaId, true, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, - OrderByComparatorFactoryUtil.create(CollaudoImpl.TABLE_NAME, "dtProtocollo", true)); - Collaudo collaudo = null; - for (Collaudo el : collaudi) { - if (Validator.isNotNull(el.getDtProtocollo())) { - collaudo = el; + case StatoPraticaConstants.COLLAUDO: + List collaudi = CollaudoLocalServiceUtil.findByIntPraticaId_Completata(intPraticaId, true, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, + OrderByComparatorFactoryUtil.create(CollaudoImpl.TABLE_NAME, "dtProtocollo", true)); + Collaudo collaudo = null; + for (Collaudo el : collaudi) { + if (Validator.isNotNull(el.getDtProtocollo())) { + collaudo = el; + } } - } - if (Validator.isNull(collaudo)) { - SessionErrors.add(actionRequest, "invia-avviso-collaudo-non-trovato"); - return; - } - tipoDocumento = StatoPraticaConstants.VIDIMATA; - className = Collaudo.class.getName(); - classPk = collaudo.getPrimaryKey(); - controlloPraticaId = 0L; - break; - case StatoPraticaConstants.FINE_LAVORI: - List fineLavori = FineLavoriLocalServiceUtil.findByIntPraticaId_Completata(intPraticaId, true, - QueryUtil.ALL_POS, QueryUtil.ALL_POS, - OrderByComparatorFactoryUtil.create(FineLavoriImpl.TABLE_NAME, "dtProtocollo", true)); - FineLavori fineLavoro = null; - for (FineLavori el : fineLavori) { - if (Validator.isNotNull(el.getDtProtocollo())) { - fineLavoro = el; + if (Validator.isNull(collaudo)) { + SessionErrors.add(actionRequest, "invia-avviso-collaudo-non-trovato"); + return; } - } - if (Validator.isNull(fineLavoro)) { - SessionErrors.add(actionRequest, "invia-avviso-finelavori-non-trovato"); - return; - } - tipoDocumento = StatoPraticaConstants.VIDIMATA; - className = FineLavori.class.getName(); - classPk = fineLavoro.getPrimaryKey(); - controlloPraticaId = 0L; - break; - case "vidimazione_variante": - List varianti = DettPraticaLocalServiceUtil.findByIntPraticaId_TipoIntegrazione_Completa( - intPraticaId, TipoIntegrazioneUtil.VARIANTE, true); - DettPratica variante = null; - for (DettPratica el : varianti) { - if (Validator.isNotNull(el.getDtProtocollo())) { - variante = el; + tipoDocumento = StatoPraticaConstants.VIDIMATA; + className = Collaudo.class.getName(); + classPk = collaudo.getPrimaryKey(); + controlloPraticaId = 0L; + break; + case StatoPraticaConstants.FINE_LAVORI: + List fineLavori = FineLavoriLocalServiceUtil.findByIntPraticaId_Completata(intPraticaId, + true, QueryUtil.ALL_POS, QueryUtil.ALL_POS, + OrderByComparatorFactoryUtil.create(FineLavoriImpl.TABLE_NAME, "dtProtocollo", true)); + FineLavori fineLavoro = null; + for (FineLavori el : fineLavori) { + if (Validator.isNotNull(el.getDtProtocollo())) { + fineLavoro = el; + } } - } - if (Validator.isNull(variante)) { - SessionErrors.add(actionRequest, "invia-avviso-variante-non-trovato"); - return; - } - tipoDocumento = StatoPraticaConstants.VIDIMATA; - className = DettPratica.class.getName(); - classPk = variante.getPrimaryKey(); - controlloPraticaId = 0L; - break; - case "avviso_avvio_proced": - List praticheSp = DettPraticaLocalServiceUtil.findByIntPraticaId(intPraticaId); - DettPratica praticaSp = null; - for (DettPratica el : praticheSp) { - if (Validator.isNotNull(el.getDtProtocollo())) { - praticaSp = el; + if (Validator.isNull(fineLavoro)) { + SessionErrors.add(actionRequest, "invia-avviso-finelavori-non-trovato"); + return; } - } - if (Validator.isNull(praticaSp)) { - SessionErrors.add(actionRequest, "invia-avviso-avvio-procedimento-non-trovato"); - return; - } - tipoDocumento = StatoPraticaConstants.SOTTOPOSTA_A_PARERE; - className = DettPratica.class.getName(); - classPk = praticaSp.getPrimaryKey(); - controlloPraticaId = 0L; - break; - case "avviso_vidimazione": - List pratichePresentate = DettPraticaLocalServiceUtil.findByIntPraticaId(intPraticaId); - DettPratica praticaPresentata = null; - for (DettPratica el : pratichePresentate) { - if (Validator.isNotNull(el.getDtProtocollo())) { - praticaPresentata = el; + tipoDocumento = StatoPraticaConstants.VIDIMATA; + className = FineLavori.class.getName(); + classPk = fineLavoro.getPrimaryKey(); + controlloPraticaId = 0L; + break; + case "vidimazione_variante": + List varianti = DettPraticaLocalServiceUtil.findByIntPraticaId_TipoIntegrazione_Completa( + intPraticaId, TipoIntegrazioneUtil.VARIANTE, true); + DettPratica variante = null; + for (DettPratica el : varianti) { + if (Validator.isNotNull(el.getDtProtocollo())) { + variante = el; + } } - } - if (Validator.isNull(praticaPresentata)) { - SessionErrors.add(actionRequest, "invia-avviso-vidimazione-non-trovato"); + if (Validator.isNull(variante)) { + SessionErrors.add(actionRequest, "invia-avviso-variante-non-trovato"); + return; + } + tipoDocumento = StatoPraticaConstants.VIDIMATA; + className = DettPratica.class.getName(); + classPk = variante.getPrimaryKey(); + controlloPraticaId = 0L; + break; + case "avviso_avvio_proced": + List praticheSp = DettPraticaLocalServiceUtil.findByIntPraticaId(intPraticaId); + DettPratica praticaSp = null; + for (DettPratica el : praticheSp) { + if (Validator.isNotNull(el.getDtProtocollo())) { + praticaSp = el; + } + } + if (Validator.isNull(praticaSp)) { + SessionErrors.add(actionRequest, "invia-avviso-avvio-procedimento-non-trovato"); + return; + } + tipoDocumento = StatoPraticaConstants.SOTTOPOSTA_A_PARERE; + className = DettPratica.class.getName(); + classPk = praticaSp.getPrimaryKey(); + controlloPraticaId = 0L; + break; + case "avviso_vidimazione": + List pratichePresentate = DettPraticaLocalServiceUtil.findByIntPraticaId(intPraticaId); + DettPratica praticaPresentata = null; + for (DettPratica el : pratichePresentate) { + if (Validator.isNotNull(el.getDtProtocollo())) { + praticaPresentata = el; + } + } + if (Validator.isNull(praticaPresentata)) { + SessionErrors.add(actionRequest, "invia-avviso-vidimazione-non-trovato"); + return; + } + tipoDocumento = StatoPraticaConstants.VIDIMATA; + className = DettPratica.class.getName(); + classPk = praticaPresentata.getPrimaryKey(); + controlloPraticaId = 0L; + break; + default: + SessionErrors.add(actionRequest, "operazione-non-supportata"); return; - } - tipoDocumento = StatoPraticaConstants.VIDIMATA; - className = DettPratica.class.getName(); - classPk = praticaPresentata.getPrimaryKey(); - controlloPraticaId = 0L; - break; - default: - SessionErrors.add(actionRequest, "operazione-non-supportata"); - return; } String templateName = AvvisoUtil.getAllTipoDocumentoFileTemplateProps().get(tipoAvviso); long template = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, templateName); @@ -791,8 +792,7 @@ public class SismicaUtil { controllo.setStatus(WorkflowConstants.STATUS_APPROVED); try { ControlloPraticaLocalServiceUtil.updateControlloPratica(controllo); - } catch (SystemException e) { - } + } catch (SystemException e) {} long fileEntryIdTemplate; try { fileEntryIdTemplate = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong( @@ -812,8 +812,7 @@ public class SismicaUtil { } pratica.setStatoPratica(StatoPraticaConstants.CONFORME); IntPraticaLocalServiceUtil.updateIntPratica(pratica); - } catch (PortalException | SystemException e) { - } + } catch (PortalException | SystemException e) {} } } } @@ -824,8 +823,7 @@ public class SismicaUtil { pratica.setStatoPratica(StatoPraticaConstants.CONFORME); try { IntPraticaLocalServiceUtil.updateIntPratica(pratica); - } catch (SystemException e) { - } + } catch (SystemException e) {} } } } @@ -911,8 +909,7 @@ public class SismicaUtil { if (token.getClassName().equals(ControlloPratica.class.getName())) tokens.add(token.getClassPK()); } - } catch (SystemException e) { - } + } catch (SystemException e) {} int start = 0; List pratiche = null; do { @@ -1030,8 +1027,7 @@ public class SismicaUtil { try { serviceContext.setScopeGroupId(TerritorioLocalServiceUtil.getTerritorio( intPratica.getTerritorioId()).getGroupId()); - } catch (PortalException | SystemException e) { - } + } catch (PortalException | SystemException e) {} serviceContext.setUserId(intPratica.getUserId()); } List avvisi = getAvvisiPratica(intPraticaId); @@ -1064,39 +1060,39 @@ public class SismicaUtil { } if (!avvisiInviati.contains(template)) { switch (avviso.getTipoDocumento()) { - case "MA": - case StatoPraticaConstants.NON_CONFORME: - case StatoPraticaConstants.INTEGRAZIONE: - break; - case StatoPraticaConstants.AUTORIZZATA: - case StatoPraticaConstants.CONFORME: - case StatoPraticaConstants.SOTTOPOSTA_A_PARERE: - case StatoPraticaConstants.VIDIMATA: - if (avviso.getTipoAvviso().equals(AvvisoUtil.TIPO_AVVISO_DIRETTO)) { - esito.addAll(addStoricoAvvisi(intPratica, avvisi)); - esitoLog(esito, "Invio " + template + " (" + controlli.size() + " controlli)"); - try { - if (Validator.isNull(controllo)) { - controllo = aggiungiControlloPratica(intPratica); - esitoLog(esito, intPratica.getNumeroProgetto() + " aggiunto ControlloPratica " - + controllo.getControlloPraticaId()); + case "MA": + case StatoPraticaConstants.NON_CONFORME: + case StatoPraticaConstants.INTEGRAZIONE: + break; + case StatoPraticaConstants.AUTORIZZATA: + case StatoPraticaConstants.CONFORME: + case StatoPraticaConstants.SOTTOPOSTA_A_PARERE: + case StatoPraticaConstants.VIDIMATA: + if (avviso.getTipoAvviso().equals(AvvisoUtil.TIPO_AVVISO_DIRETTO)) { + esito.addAll(addStoricoAvvisi(intPratica, avvisi)); + esitoLog(esito, "Invio " + template + " (" + controlli.size() + " controlli)"); + try { + if (Validator.isNull(controllo)) { + controllo = aggiungiControlloPratica(intPratica); + esitoLog(esito, intPratica.getNumeroProgetto() + + " aggiunto ControlloPratica " + controllo.getControlloPraticaId()); + } + AvvisoLocalServiceUtil.addAvviso(intPraticaId, StringPool.BLANK, + avviso.getDtAvviso(), AvvisoUtil.TIPO_AVVISO_DIRETTO, + avviso.getTipoDocumento(), templateId, controllo.getDettPraticaId(), + DettPratica.class.getName(), controllo.getControlloPraticaId(), + serviceContext); + } catch (Exception e) { + esitoLog(esito, "Errore durante l'invio: " + e.getMessage()); } - AvvisoLocalServiceUtil.addAvviso(intPraticaId, StringPool.BLANK, - avviso.getDtAvviso(), AvvisoUtil.TIPO_AVVISO_DIRETTO, - avviso.getTipoDocumento(), templateId, controllo.getDettPraticaId(), - DettPratica.class.getName(), controllo.getControlloPraticaId(), - serviceContext); - } catch (Exception e) { - esitoLog(esito, "Errore durante l'invio: " + e.getMessage()); } - } - break; - default: - if (avviso.getTipoAvviso().equals(AvvisoUtil.TIPO_AVVISO_DIRETTO)) { - esito.addAll(addStoricoAvvisi(intPratica, avvisi)); - esitoLog(esito, "Procederei all'invio di avviso " + template); - } - break; + break; + default: + if (avviso.getTipoAvviso().equals(AvvisoUtil.TIPO_AVVISO_DIRETTO)) { + esito.addAll(addStoricoAvvisi(intPratica, avvisi)); + esitoLog(esito, "Procederei all'invio di avviso " + template); + } + break; } } } @@ -1167,58 +1163,58 @@ public class SismicaUtil { IntPratica pratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroPratica); int start = 0; switch (tipoDaRiaprire) { - case "Fine lavori": - pratica.setFineLavoriParziale(true); - pratica.setFineLavoriTotale(false); - IntPraticaLocalServiceUtil.updateIntPratica(pratica); - List fineLavori = FineLavoriLocalServiceUtil.findByIntPraticaId(pratica.getIntPraticaId(), - start, start + SLICE, null); - start += SLICE; - for (FineLavori fineLavoro : fineLavori) { - if (!fineLavoro.getParziale()) { - fineLavoro.setParziale(true); - fineLavoro.setCompletata(false); - fineLavoro.setPagamentoId(0); - FineLavoriLocalServiceUtil.updateFineLavori(fineLavoro); + case "Fine lavori": + pratica.setFineLavoriParziale(true); + pratica.setFineLavoriTotale(false); + IntPraticaLocalServiceUtil.updateIntPratica(pratica); + List fineLavori = FineLavoriLocalServiceUtil.findByIntPraticaId( + pratica.getIntPraticaId(), start, start + SLICE, null); + start += SLICE; + for (FineLavori fineLavoro : fineLavori) { + if (!fineLavoro.getParziale()) { + fineLavoro.setParziale(true); + fineLavoro.setCompletata(false); + fineLavoro.setPagamentoId(0); + FineLavoriLocalServiceUtil.updateFineLavori(fineLavoro); + } } - } - start = 0; - List avvisiFineLavori = AvvisoLocalServiceUtil.findByIntPratica(pratica.getIntPraticaId(), - start, start + SLICE, null); - start += SLICE; - for (Avviso avviso : avvisiFineLavori) { - if (avviso.getOggettoProtocollo().equals("Oggetto: Vidimazione di Fine Lavori")) { - avviso.setOggettoProtocollo("Oggetto: Vidimazione di Fine Lavori Parziale"); - AvvisoLocalServiceUtil.updateAvviso(avviso); + start = 0; + List avvisiFineLavori = AvvisoLocalServiceUtil.findByIntPratica(pratica.getIntPraticaId(), + start, start + SLICE, null); + start += SLICE; + for (Avviso avviso : avvisiFineLavori) { + if (avviso.getOggettoProtocollo().equals("Oggetto: Vidimazione di Fine Lavori")) { + avviso.setOggettoProtocollo("Oggetto: Vidimazione di Fine Lavori Parziale"); + AvvisoLocalServiceUtil.updateAvviso(avviso); + } } - } - break; - case "Collaudo": - pratica.setCollaudoParziale(true); - pratica.setCollaudoTotale(false); - IntPraticaLocalServiceUtil.updateIntPratica(pratica); - List collaudi = CollaudoLocalServiceUtil.findByIntPraticaId(pratica.getIntPraticaId(), start, - start + SLICE, null); - start += SLICE; - for (Collaudo collaudo : collaudi) { - if (!collaudo.getParziale()) { - collaudo.setParziale(true); - collaudo.setCompletata(false); - collaudo.setPagamentoId(0); - CollaudoLocalServiceUtil.updateCollaudo(collaudo); + break; + case "Collaudo": + pratica.setCollaudoParziale(true); + pratica.setCollaudoTotale(false); + IntPraticaLocalServiceUtil.updateIntPratica(pratica); + List collaudi = CollaudoLocalServiceUtil.findByIntPraticaId(pratica.getIntPraticaId(), + start, start + SLICE, null); + start += SLICE; + for (Collaudo collaudo : collaudi) { + if (!collaudo.getParziale()) { + collaudo.setParziale(true); + collaudo.setCompletata(false); + collaudo.setPagamentoId(0); + CollaudoLocalServiceUtil.updateCollaudo(collaudo); + } } - } - start = 0; - List avvisiCollaudi = AvvisoLocalServiceUtil.findByIntPratica(pratica.getIntPraticaId(), start, - start + SLICE, null); - start += SLICE; - for (Avviso avviso : avvisiCollaudi) { - if (avviso.getOggettoProtocollo().equals("Oggetto: Vidimazione di Collaudo")) { - avviso.setOggettoProtocollo("Oggetto: Vidimazione di Collaudo Parziale"); - AvvisoLocalServiceUtil.updateAvviso(avviso); + start = 0; + List avvisiCollaudi = AvvisoLocalServiceUtil.findByIntPratica(pratica.getIntPraticaId(), + start, start + SLICE, null); + start += SLICE; + for (Avviso avviso : avvisiCollaudi) { + if (avviso.getOggettoProtocollo().equals("Oggetto: Vidimazione di Collaudo")) { + avviso.setOggettoProtocollo("Oggetto: Vidimazione di Collaudo Parziale"); + AvvisoLocalServiceUtil.updateAvviso(avviso); + } } - } - break; + break; } } return esito; @@ -1412,8 +1408,7 @@ public class SismicaUtil { IntPratica pratica = null; try { pratica = IntPraticaLocalServiceUtil.getIntPratica(documento.getIntPraticaId()); - } catch (PortalException e) { - } + } catch (PortalException e) {} if (Validator.isNotNull(pratica) && (documento.getFileEntryId() != 0)) { Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica.getTerritorioId()); FileEntry fileEntry = null; @@ -1454,15 +1449,13 @@ public class SismicaUtil { IntPratica pratica = null; try { pratica = IntPraticaLocalServiceUtil.getIntPratica(documento.getIntPraticaId()); - } catch (PortalException e) { - } + } catch (PortalException e) {} if (Validator.isNotNull(pratica) && (documento.getFileEntryId() != 0)) { Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica.getTerritorioId()); FileEntry fileEntry = null; try { fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId()); - } catch (Exception e) { - } + } catch (Exception e) {} corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento + StringPool.SPACE + documento.getPrimaryKey()); @@ -1495,15 +1488,13 @@ public class SismicaUtil { IntPratica pratica = null; try { pratica = IntPraticaLocalServiceUtil.getIntPratica(documento.getIntPraticaId()); - } catch (PortalException e) { - } + } catch (PortalException e) {} if (Validator.isNotNull(pratica) && (documento.getFileEntryIdBase() != 0)) { Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica.getTerritorioId()); FileEntry fileEntry = null; try { fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryIdBase()); - } catch (Exception e) { - } + } catch (Exception e) {} corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento + StringPool.SPACE + documento.getPrimaryKey()); @@ -1514,8 +1505,7 @@ public class SismicaUtil { FileEntry fileEntry = null; try { fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryIdInvio()); - } catch (Exception e) { - } + } catch (Exception e) {} corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento + StringPool.SPACE + documento.getPrimaryKey()); @@ -1525,8 +1515,7 @@ public class SismicaUtil { FileEntry fileEntry = null; try { fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryIdProtocollo()); - } catch (Exception e) { - } + } catch (Exception e) {} corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento + StringPool.SPACE + documento.getPrimaryKey()); @@ -1559,8 +1548,7 @@ public class SismicaUtil { IntPratica pratica = null; try { pratica = IntPraticaLocalServiceUtil.getIntPratica(documento.getIntPraticaId()); - } catch (PortalException e) { - } + } catch (PortalException e) {} if (Validator.isNotNull(pratica) && (documento.getFileEntryId() != 0)) { Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica.getTerritorioId()); FileEntry fileEntry = null; @@ -1601,8 +1589,7 @@ public class SismicaUtil { IntPratica pratica = null; try { pratica = IntPraticaLocalServiceUtil.getIntPratica(documento.getIntPraticaId()); - } catch (PortalException e) { - } + } catch (PortalException e) {} if (Validator.isNotNull(pratica) && (documento.getDlFileEntryId() != 0)) { Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica.getTerritorioId()); FileEntry fileEntry = null; @@ -1643,8 +1630,7 @@ public class SismicaUtil { IntPratica pratica = null; try { pratica = IntPraticaLocalServiceUtil.getIntPratica(documento.getIntPraticaId()); - } catch (PortalException e) { - } + } catch (PortalException e) {} if (Validator.isNotNull(pratica) && (documento.getFileEntryId() != 0)) { Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica.getTerritorioId()); FileEntry fileEntry = null; @@ -1685,8 +1671,7 @@ public class SismicaUtil { IntPratica pratica = null; try { pratica = IntPraticaLocalServiceUtil.getIntPratica(documento.getIntPraticaId()); - } catch (PortalException e) { - } + } catch (PortalException e) {} if (Validator.isNotNull(pratica) && (documento.getFileEntryId() != 0)) { Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica.getTerritorioId()); FileEntry fileEntry = null; @@ -1776,8 +1761,7 @@ public class SismicaUtil { result = controllo; } } - } catch (SystemException e) { - } + } catch (SystemException e) {} return result; } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java index bad3bf71..5205954a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java @@ -309,7 +309,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase User titolaredigitaleUser = userLocalService.getUser(intPratica.getUserId()); // il titolare digitale potrebbe avere piĆ¹ ruoli List titolareDigitali = soggettoLocalService.getValidTmpByIntPratica_CodiceFiscale( - intPraticaId, titolaredigitaleUser.getScreenName(), 0l); + intPraticaId, titolaredigitaleUser.getScreenName(), 0); for (Soggetto titolareDigitale : titolareDigitali) { addAsseverazione(userId, intPraticaId, dettPraticaId, titolareDigitale, serviceContext); } @@ -327,6 +327,11 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase if (!ValidazionePraticaUtil.isA98Required(dettPratica)) { addAsseverazione(userId, intPraticaId, dettPraticaId, soggetto, serviceContext); } + } else if (TipoSoggettoUtil.COLLAUDATORE.equalsIgnoreCase(soggetto.getTipologiaSoggetto())) { + if (dettPratica.getCodiceFiscalePrincipaleCollaudatore().equalsIgnoreCase( + soggetto.getCodiceFiscale())) { + addAsseverazione(userId, intPraticaId, dettPraticaId, soggetto, serviceContext); + } } else { addAsseverazione(userId, intPraticaId, dettPraticaId, soggetto, serviceContext); } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java index 2ac01e97..7d552875 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java @@ -568,7 +568,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { intPratica.setStatus(status); if (AzioniPraticheUtil.isAutorizzazione(intPraticaId)) { intPratica.setStatoPratica(StatoPraticaConstants.AUTORIZZATA); - } else if (AzioniPraticheUtil.isAutorizzazione(intPraticaId)) { + } else if (AzioniPraticheUtil.isDeposito(intPraticaId)) { intPratica.setStatoPratica(StatoPraticaConstants.CONFORME); } else { // SANATORIA (da capire) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index 8b829a5a..c0cb64c9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=2707 - build.date=1630332946709 + build.number=2712 + build.date=1632147297567 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/fascicolo_action.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/fascicolo_action.jsp index 70f1d3ce..a5ecf336 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/fascicolo_action.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/fascicolo_action.jsp @@ -1,25 +1,14 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%> -<%@page import="it.tref.liferay.portos.bo.model.Collaudo"%> -<%@page import="it.tref.liferay.portos.bo.model.FineLavori"%> -<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%> -<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%> -<%@page import="it.tref.liferay.portos.bo.service.DettPraticaServiceUtil"%> -<%@page import="it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.model.Asseverazione"%> -<%@page import="it.tref.liferay.portos.bo.util.ValidazionePraticaUtil"%> <%@page import="it.tref.liferay.portos.bo.model.Delega"%> +<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%> +<%@page import="it.tref.liferay.portos.bo.service.DettPraticaServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%> -<%@page import="com.liferay.portal.kernel.workflow.WorkflowConstants"%> -<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%> -<%@page import="com.liferay.portal.security.permission.ActionKeys"%> -<%@page import="com.liferay.portal.kernel.util.WebKeys"%> -<%@page import="com.liferay.portal.kernel.dao.search.SearchContainer"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%> +<%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%> +<%@page import="it.tref.liferay.portos.bo.util.ValidazionePraticaUtil"%> <%@page import="java.util.Map"%> <%@page import="java.util.HashMap"%> -<%@page import="com.liferay.portal.kernel.util.StringUtil"%> -<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> -<%@page import="com.liferay.portal.service.permission.PortletPermissionUtil"%> <%@include file="/html/fascicolofe/init.jsp"%> <% SearchContainer searchContainer = (SearchContainer) request.getAttribute("liferay-ui:search:searchContainer"); @@ -41,11 +30,12 @@ if (searchContainer != null) { intPratica = IntPraticaLocalServiceUtil.getIntPratica(asseverazione.getIntPraticaId()); } showExpanded = false; -}else{ +} else { long intPraticaId = ParamUtil.getLong(request, "intPraticaId"); intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); } -String randomId = StringUtil.randomId()+"_"+intPratica.getIntPraticaId(); +String intPraticaIdString = String.valueOf(intPratica.getIntPraticaId()); +String randomId = StringUtil.randomId() + StringPool.UNDERLINE + intPraticaIdString; %> @@ -55,7 +45,7 @@ String randomId = StringUtil.randomId()+"_"+intPratica.getIntPraticaId(); && intPratica.getStatus() != WorkflowConstants.STATUS_INCOMPLETE && !intPratica.getSospesa() %>"> - + @@ -63,7 +53,7 @@ String randomId = StringUtil.randomId()+"_"+intPratica.getIntPraticaId(); - + @@ -71,21 +61,22 @@ String randomId = StringUtil.randomId()+"_"+intPratica.getIntPraticaId(); - + - + - + <% DettPratica variazioniSoggetto = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica( - intPratica.getIntPraticaId(), Arrays.asList(new String[] {TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO})); + intPratica.getIntPraticaId(), Arrays. asList(TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO)); %> @@ -94,9 +85,10 @@ String randomId = StringUtil.randomId()+"_"+intPratica.getIntPraticaId(); - + - + - + - + - + - "> <% Map dataMap = new HashMap(); dataMap.put("id", "dialogAnnullamento"); %> - + - + - + - + - <% @@ -143,18 +139,20 @@ String randomId = StringUtil.randomId()+"_"+intPratica.getIntPraticaId(); boolean canEditVariante = ValidazionePraticaUtil.praticaCanEditVariante(intPratica.getIntPraticaId()); boolean canDeleteVariante = ValidazionePraticaUtil.praticaCanDeleteVariante(intPratica.getIntPraticaId()); %> - +
- "> - - + + @@ -162,136 +160,158 @@ String randomId = StringUtil.randomId()+"_"+intPratica.getIntPraticaId(); - + - + - +
<% boolean canAddIntegrazione = ValidazionePraticaUtil.praticaCanAddIntegrazione(intPratica.getIntPraticaId()); boolean canEditIntegrazione = ValidazionePraticaUtil.praticaCanEditIntegrazione(intPratica.getIntPraticaId()); - boolean canDeleteIntegrazione = ValidazionePraticaUtil.praticaCanDeleteIntegrazione(intPratica.getIntPraticaId()); + boolean canDeleteIntegrazione = ValidazionePraticaUtil.praticaCanDeleteIntegrazione( + intPratica.getIntPraticaId()); %>
- + - + - + - + - + - + - +
- +
- + - + - + - + - + - + - + - + - "> + || ValidazionePraticaUtil.praticaCanDeleteCollaudo(intPratica.getIntPraticaId(), + user.getScreenName()) %>">
- + - + - + - + - + - + - + @@ -301,7 +321,7 @@ String randomId = StringUtil.randomId()+"_"+intPratica.getIntPraticaId(); %> - + @@ -312,10 +332,11 @@ String randomId = StringUtil.randomId()+"_"+intPratica.getIntPraticaId(); %> - + - + <% } %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachment.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachment.java deleted file mode 100644 index b1d6e722..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachment.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.model; - -import com.liferay.portal.model.PersistedModel; - -/** - * The extended model interface for the EmailTemplateAttachment service. Represents a row in the "portos_Mail_EmailTemplateAttachment" database table, with each column mapped to a property of this class. - * - * @author - * @see EmailTemplateAttachmentModel - * @see it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentImpl - * @see it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl - * @generated - */ -public interface EmailTemplateAttachment extends EmailTemplateAttachmentModel, - PersistedModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this interface directly. Add methods to {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentClp.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentClp.java deleted file mode 100644 index bb4edc8d..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentClp.java +++ /dev/null @@ -1,301 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.model; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.ProxyUtil; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.model.BaseModel; -import com.liferay.portal.model.impl.BaseModelImpl; - -import it.tref.liferay.portos.mailmanager.service.ClpSerializer; -import it.tref.liferay.portos.mailmanager.service.EmailTemplateAttachmentLocalServiceUtil; -import it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK; - -import java.io.Serializable; - -import java.lang.reflect.Method; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author $author$ - */ -public class EmailTemplateAttachmentClp extends BaseModelImpl - implements EmailTemplateAttachment { - public EmailTemplateAttachmentClp() { - } - - @Override - public Class getModelClass() { - return EmailTemplateAttachment.class; - } - - @Override - public String getModelClassName() { - return EmailTemplateAttachment.class.getName(); - } - - @Override - public EmailTemplateAttachmentPK getPrimaryKey() { - return new EmailTemplateAttachmentPK(_emailTemplateId, _fileEntryId); - } - - @Override - public void setPrimaryKey(EmailTemplateAttachmentPK primaryKey) { - setEmailTemplateId(primaryKey.emailTemplateId); - setFileEntryId(primaryKey.fileEntryId); - } - - @Override - public Serializable getPrimaryKeyObj() { - return new EmailTemplateAttachmentPK(_emailTemplateId, _fileEntryId); - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey((EmailTemplateAttachmentPK)primaryKeyObj); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("emailTemplateId", getEmailTemplateId()); - attributes.put("fileEntryId", getFileEntryId()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - Long emailTemplateId = (Long)attributes.get("emailTemplateId"); - - if (emailTemplateId != null) { - setEmailTemplateId(emailTemplateId); - } - - Long fileEntryId = (Long)attributes.get("fileEntryId"); - - if (fileEntryId != null) { - setFileEntryId(fileEntryId); - } - } - - @Override - public long getEmailTemplateId() { - return _emailTemplateId; - } - - @Override - public void setEmailTemplateId(long emailTemplateId) { - _emailTemplateId = emailTemplateId; - - if (_emailTemplateAttachmentRemoteModel != null) { - try { - Class clazz = _emailTemplateAttachmentRemoteModel.getClass(); - - Method method = clazz.getMethod("setEmailTemplateId", long.class); - - method.invoke(_emailTemplateAttachmentRemoteModel, - emailTemplateId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - @Override - public long getFileEntryId() { - return _fileEntryId; - } - - @Override - public void setFileEntryId(long fileEntryId) { - _fileEntryId = fileEntryId; - - if (_emailTemplateAttachmentRemoteModel != null) { - try { - Class clazz = _emailTemplateAttachmentRemoteModel.getClass(); - - Method method = clazz.getMethod("setFileEntryId", long.class); - - method.invoke(_emailTemplateAttachmentRemoteModel, fileEntryId); - } - catch (Exception e) { - throw new UnsupportedOperationException(e); - } - } - } - - public BaseModel getEmailTemplateAttachmentRemoteModel() { - return _emailTemplateAttachmentRemoteModel; - } - - public void setEmailTemplateAttachmentRemoteModel( - BaseModel emailTemplateAttachmentRemoteModel) { - _emailTemplateAttachmentRemoteModel = emailTemplateAttachmentRemoteModel; - } - - public Object invokeOnRemoteModel(String methodName, - Class[] parameterTypes, Object[] parameterValues) - throws Exception { - Object[] remoteParameterValues = new Object[parameterValues.length]; - - for (int i = 0; i < parameterValues.length; i++) { - if (parameterValues[i] != null) { - remoteParameterValues[i] = ClpSerializer.translateInput(parameterValues[i]); - } - } - - Class remoteModelClass = _emailTemplateAttachmentRemoteModel.getClass(); - - ClassLoader remoteModelClassLoader = remoteModelClass.getClassLoader(); - - Class[] remoteParameterTypes = new Class[parameterTypes.length]; - - for (int i = 0; i < parameterTypes.length; i++) { - if (parameterTypes[i].isPrimitive()) { - remoteParameterTypes[i] = parameterTypes[i]; - } - else { - String parameterTypeName = parameterTypes[i].getName(); - - remoteParameterTypes[i] = remoteModelClassLoader.loadClass(parameterTypeName); - } - } - - Method method = remoteModelClass.getMethod(methodName, - remoteParameterTypes); - - Object returnValue = method.invoke(_emailTemplateAttachmentRemoteModel, - remoteParameterValues); - - if (returnValue != null) { - returnValue = ClpSerializer.translateOutput(returnValue); - } - - return returnValue; - } - - @Override - public void persist() throws SystemException { - if (this.isNew()) { - EmailTemplateAttachmentLocalServiceUtil.addEmailTemplateAttachment(this); - } - else { - EmailTemplateAttachmentLocalServiceUtil.updateEmailTemplateAttachment(this); - } - } - - @Override - public EmailTemplateAttachment toEscapedModel() { - return (EmailTemplateAttachment)ProxyUtil.newProxyInstance(EmailTemplateAttachment.class.getClassLoader(), - new Class[] { EmailTemplateAttachment.class }, - new AutoEscapeBeanHandler(this)); - } - - @Override - public Object clone() { - EmailTemplateAttachmentClp clone = new EmailTemplateAttachmentClp(); - - clone.setEmailTemplateId(getEmailTemplateId()); - clone.setFileEntryId(getFileEntryId()); - - return clone; - } - - @Override - public int compareTo(EmailTemplateAttachment emailTemplateAttachment) { - EmailTemplateAttachmentPK primaryKey = emailTemplateAttachment.getPrimaryKey(); - - return getPrimaryKey().compareTo(primaryKey); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof EmailTemplateAttachmentClp)) { - return false; - } - - EmailTemplateAttachmentClp emailTemplateAttachment = (EmailTemplateAttachmentClp)obj; - - EmailTemplateAttachmentPK primaryKey = emailTemplateAttachment.getPrimaryKey(); - - if (getPrimaryKey().equals(primaryKey)) { - return true; - } - else { - return false; - } - } - - public Class getClpSerializerClass() { - return _clpSerializerClass; - } - - @Override - public int hashCode() { - return getPrimaryKey().hashCode(); - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(5); - - sb.append("{emailTemplateId="); - sb.append(getEmailTemplateId()); - sb.append(", fileEntryId="); - sb.append(getFileEntryId()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(10); - - sb.append(""); - sb.append( - "it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment"); - sb.append(""); - - sb.append( - "emailTemplateId"); - sb.append( - "fileEntryId"); - - sb.append(""); - - return sb.toString(); - } - - private long _emailTemplateId; - private long _fileEntryId; - private BaseModel _emailTemplateAttachmentRemoteModel; - private Class _clpSerializerClass = it.tref.liferay.portos.mailmanager.service.ClpSerializer.class; -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentModel.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentModel.java deleted file mode 100644 index e3618589..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentModel.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.model; - -import com.liferay.portal.model.BaseModel; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.service.ServiceContext; - -import com.liferay.portlet.expando.model.ExpandoBridge; - -import it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK; - -import java.io.Serializable; - -/** - * The base model interface for the EmailTemplateAttachment service. Represents a row in the "portos_Mail_EmailTemplateAttachment" database table, with each column mapped to a property of this class. - * - *

- * This interface and its corresponding implementation {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentImpl}. - *

- * - * @author - * @see EmailTemplateAttachment - * @see it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentImpl - * @see it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl - * @generated - */ -public interface EmailTemplateAttachmentModel extends BaseModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. All methods that expect a email template attachment model instance should use the {@link EmailTemplateAttachment} interface instead. - */ - - /** - * Returns the primary key of this email template attachment. - * - * @return the primary key of this email template attachment - */ - public EmailTemplateAttachmentPK getPrimaryKey(); - - /** - * Sets the primary key of this email template attachment. - * - * @param primaryKey the primary key of this email template attachment - */ - public void setPrimaryKey(EmailTemplateAttachmentPK primaryKey); - - /** - * Returns the email template ID of this email template attachment. - * - * @return the email template ID of this email template attachment - */ - public long getEmailTemplateId(); - - /** - * Sets the email template ID of this email template attachment. - * - * @param emailTemplateId the email template ID of this email template attachment - */ - public void setEmailTemplateId(long emailTemplateId); - - /** - * Returns the file entry ID of this email template attachment. - * - * @return the file entry ID of this email template attachment - */ - public long getFileEntryId(); - - /** - * Sets the file entry ID of this email template attachment. - * - * @param fileEntryId the file entry ID of this email template attachment - */ - public void setFileEntryId(long fileEntryId); - - @Override - public boolean isNew(); - - @Override - public void setNew(boolean n); - - @Override - public boolean isCachedModel(); - - @Override - public void setCachedModel(boolean cachedModel); - - @Override - public boolean isEscapedModel(); - - @Override - public Serializable getPrimaryKeyObj(); - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj); - - @Override - public ExpandoBridge getExpandoBridge(); - - @Override - public void setExpandoBridgeAttributes(BaseModel baseModel); - - @Override - public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); - - @Override - public void setExpandoBridgeAttributes(ServiceContext serviceContext); - - @Override - public Object clone(); - - @Override - public int compareTo( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment); - - @Override - public int hashCode(); - - @Override - public CacheModel toCacheModel(); - - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment toEscapedModel(); - - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment toUnescapedModel(); - - @Override - public String toString(); - - @Override - public String toXmlString(); -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentSoap.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentSoap.java deleted file mode 100644 index 70217e19..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentSoap.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.model; - -import it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.List; - -/** - * This class is used by SOAP remote services. - * - * @author - * @generated - */ -public class EmailTemplateAttachmentSoap implements Serializable { - public static EmailTemplateAttachmentSoap toSoapModel( - EmailTemplateAttachment model) { - EmailTemplateAttachmentSoap soapModel = new EmailTemplateAttachmentSoap(); - - soapModel.setEmailTemplateId(model.getEmailTemplateId()); - soapModel.setFileEntryId(model.getFileEntryId()); - - return soapModel; - } - - public static EmailTemplateAttachmentSoap[] toSoapModels( - EmailTemplateAttachment[] models) { - EmailTemplateAttachmentSoap[] soapModels = new EmailTemplateAttachmentSoap[models.length]; - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModel(models[i]); - } - - return soapModels; - } - - public static EmailTemplateAttachmentSoap[][] toSoapModels( - EmailTemplateAttachment[][] models) { - EmailTemplateAttachmentSoap[][] soapModels = null; - - if (models.length > 0) { - soapModels = new EmailTemplateAttachmentSoap[models.length][models[0].length]; - } - else { - soapModels = new EmailTemplateAttachmentSoap[0][0]; - } - - for (int i = 0; i < models.length; i++) { - soapModels[i] = toSoapModels(models[i]); - } - - return soapModels; - } - - public static EmailTemplateAttachmentSoap[] toSoapModels( - List models) { - List soapModels = new ArrayList(models.size()); - - for (EmailTemplateAttachment model : models) { - soapModels.add(toSoapModel(model)); - } - - return soapModels.toArray(new EmailTemplateAttachmentSoap[soapModels.size()]); - } - - public EmailTemplateAttachmentSoap() { - } - - public EmailTemplateAttachmentPK getPrimaryKey() { - return new EmailTemplateAttachmentPK(_emailTemplateId, _fileEntryId); - } - - public void setPrimaryKey(EmailTemplateAttachmentPK pk) { - setEmailTemplateId(pk.emailTemplateId); - setFileEntryId(pk.fileEntryId); - } - - public long getEmailTemplateId() { - return _emailTemplateId; - } - - public void setEmailTemplateId(long emailTemplateId) { - _emailTemplateId = emailTemplateId; - } - - public long getFileEntryId() { - return _fileEntryId; - } - - public void setFileEntryId(long fileEntryId) { - _fileEntryId = fileEntryId; - } - - private long _emailTemplateId; - private long _fileEntryId; -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentWrapper.java deleted file mode 100644 index 7398b028..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/model/EmailTemplateAttachmentWrapper.java +++ /dev/null @@ -1,278 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.model; - -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.model.ModelWrapper; - -import java.util.HashMap; -import java.util.Map; - -/** - *

- * This class is a wrapper for {@link EmailTemplateAttachment}. - *

- * - * @author - * @see EmailTemplateAttachment - * @generated - */ -public class EmailTemplateAttachmentWrapper implements EmailTemplateAttachment, - ModelWrapper { - public EmailTemplateAttachmentWrapper( - EmailTemplateAttachment emailTemplateAttachment) { - _emailTemplateAttachment = emailTemplateAttachment; - } - - @Override - public Class getModelClass() { - return EmailTemplateAttachment.class; - } - - @Override - public String getModelClassName() { - return EmailTemplateAttachment.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("emailTemplateId", getEmailTemplateId()); - attributes.put("fileEntryId", getFileEntryId()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - Long emailTemplateId = (Long)attributes.get("emailTemplateId"); - - if (emailTemplateId != null) { - setEmailTemplateId(emailTemplateId); - } - - Long fileEntryId = (Long)attributes.get("fileEntryId"); - - if (fileEntryId != null) { - setFileEntryId(fileEntryId); - } - } - - /** - * Returns the primary key of this email template attachment. - * - * @return the primary key of this email template attachment - */ - @Override - public it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK getPrimaryKey() { - return _emailTemplateAttachment.getPrimaryKey(); - } - - /** - * Sets the primary key of this email template attachment. - * - * @param primaryKey the primary key of this email template attachment - */ - @Override - public void setPrimaryKey( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK primaryKey) { - _emailTemplateAttachment.setPrimaryKey(primaryKey); - } - - /** - * Returns the email template ID of this email template attachment. - * - * @return the email template ID of this email template attachment - */ - @Override - public long getEmailTemplateId() { - return _emailTemplateAttachment.getEmailTemplateId(); - } - - /** - * Sets the email template ID of this email template attachment. - * - * @param emailTemplateId the email template ID of this email template attachment - */ - @Override - public void setEmailTemplateId(long emailTemplateId) { - _emailTemplateAttachment.setEmailTemplateId(emailTemplateId); - } - - /** - * Returns the file entry ID of this email template attachment. - * - * @return the file entry ID of this email template attachment - */ - @Override - public long getFileEntryId() { - return _emailTemplateAttachment.getFileEntryId(); - } - - /** - * Sets the file entry ID of this email template attachment. - * - * @param fileEntryId the file entry ID of this email template attachment - */ - @Override - public void setFileEntryId(long fileEntryId) { - _emailTemplateAttachment.setFileEntryId(fileEntryId); - } - - @Override - public boolean isNew() { - return _emailTemplateAttachment.isNew(); - } - - @Override - public void setNew(boolean n) { - _emailTemplateAttachment.setNew(n); - } - - @Override - public boolean isCachedModel() { - return _emailTemplateAttachment.isCachedModel(); - } - - @Override - public void setCachedModel(boolean cachedModel) { - _emailTemplateAttachment.setCachedModel(cachedModel); - } - - @Override - public boolean isEscapedModel() { - return _emailTemplateAttachment.isEscapedModel(); - } - - @Override - public java.io.Serializable getPrimaryKeyObj() { - return _emailTemplateAttachment.getPrimaryKeyObj(); - } - - @Override - public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { - _emailTemplateAttachment.setPrimaryKeyObj(primaryKeyObj); - } - - @Override - public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { - return _emailTemplateAttachment.getExpandoBridge(); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.model.BaseModel baseModel) { - _emailTemplateAttachment.setExpandoBridgeAttributes(baseModel); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { - _emailTemplateAttachment.setExpandoBridgeAttributes(expandoBridge); - } - - @Override - public void setExpandoBridgeAttributes( - com.liferay.portal.service.ServiceContext serviceContext) { - _emailTemplateAttachment.setExpandoBridgeAttributes(serviceContext); - } - - @Override - public java.lang.Object clone() { - return new EmailTemplateAttachmentWrapper((EmailTemplateAttachment)_emailTemplateAttachment.clone()); - } - - @Override - public int compareTo( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) { - return _emailTemplateAttachment.compareTo(emailTemplateAttachment); - } - - @Override - public int hashCode() { - return _emailTemplateAttachment.hashCode(); - } - - @Override - public com.liferay.portal.model.CacheModel toCacheModel() { - return _emailTemplateAttachment.toCacheModel(); - } - - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment toEscapedModel() { - return new EmailTemplateAttachmentWrapper(_emailTemplateAttachment.toEscapedModel()); - } - - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment toUnescapedModel() { - return new EmailTemplateAttachmentWrapper(_emailTemplateAttachment.toUnescapedModel()); - } - - @Override - public java.lang.String toString() { - return _emailTemplateAttachment.toString(); - } - - @Override - public java.lang.String toXmlString() { - return _emailTemplateAttachment.toXmlString(); - } - - @Override - public void persist() - throws com.liferay.portal.kernel.exception.SystemException { - _emailTemplateAttachment.persist(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof EmailTemplateAttachmentWrapper)) { - return false; - } - - EmailTemplateAttachmentWrapper emailTemplateAttachmentWrapper = (EmailTemplateAttachmentWrapper)obj; - - if (Validator.equals(_emailTemplateAttachment, - emailTemplateAttachmentWrapper._emailTemplateAttachment)) { - return true; - } - - return false; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} - */ - public EmailTemplateAttachment getWrappedEmailTemplateAttachment() { - return _emailTemplateAttachment; - } - - @Override - public EmailTemplateAttachment getWrappedModel() { - return _emailTemplateAttachment; - } - - @Override - public void resetOriginalValues() { - _emailTemplateAttachment.resetOriginalValues(); - } - - private EmailTemplateAttachment _emailTemplateAttachment; -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalService.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalService.java deleted file mode 100644 index e72fd374..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalService.java +++ /dev/null @@ -1,256 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.service; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.search.IndexableType; -import com.liferay.portal.kernel.transaction.Isolation; -import com.liferay.portal.kernel.transaction.Propagation; -import com.liferay.portal.kernel.transaction.Transactional; -import com.liferay.portal.service.BaseLocalService; -import com.liferay.portal.service.InvokableLocalService; -import com.liferay.portal.service.PersistedModelLocalService; - -/** - * Provides the local service interface for EmailTemplateAttachment. 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. - * - * @author - * @see EmailTemplateAttachmentLocalServiceUtil - * @see it.tref.liferay.portos.mailmanager.service.base.EmailTemplateAttachmentLocalServiceBaseImpl - * @see it.tref.liferay.portos.mailmanager.service.impl.EmailTemplateAttachmentLocalServiceImpl - * @generated - */ -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface EmailTemplateAttachmentLocalService extends BaseLocalService, - InvokableLocalService, PersistedModelLocalService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link EmailTemplateAttachmentLocalServiceUtil} to access the email template attachment local service. Add custom service methods to {@link it.tref.liferay.portos.mailmanager.service.impl.EmailTemplateAttachmentLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - - /** - * Adds the email template attachment to the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachment the email template attachment - * @return the email template attachment that was added - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment addEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Creates a new email template attachment with the primary key. Does not add the email template attachment to the database. - * - * @param emailTemplateAttachmentPK the primary key for the new email template attachment - * @return the new email template attachment - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment createEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK); - - /** - * Deletes the email template attachment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment that was removed - * @throws PortalException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment deleteEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Deletes the email template attachment from the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachment the email template attachment - * @return the email template attachment that was removed - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment deleteEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException; - - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); - - /** - * Performs a dynamic query on the database and returns the matching rows. - * - * @param dynamicQuery the dynamic query - * @return the matching rows - * @throws SystemException if a system exception occurred - */ - @SuppressWarnings("rawtypes") - public java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - throws com.liferay.portal.kernel.exception.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 {@link com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 dynamicQuery the dynamic query - * @param start the lower bound of the range of model instances - * @param end the upper bound of the range of model instances (not inclusive) - * @return the range of matching rows - * @throws SystemException if a system exception occurred - */ - @SuppressWarnings("rawtypes") - public java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, - int end) throws com.liferay.portal.kernel.exception.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 {@link com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 dynamicQuery the dynamic query - * @param start the lower bound of the range of model instances - * @param end the upper bound of the range of model instances (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching rows - * @throws SystemException if a system exception occurred - */ - @SuppressWarnings("rawtypes") - public java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of rows that match the dynamic query. - * - * @param dynamicQuery the dynamic query - * @return the number of rows that match the dynamic query - * @throws SystemException if a system exception occurred - */ - public long dynamicQueryCount( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of rows that match the dynamic query. - * - * @param dynamicQuery the dynamic query - * @param projection the projection to apply to the query - * @return the number of rows that match the dynamic query - * @throws SystemException if a system exception occurred - */ - public long dynamicQueryCount( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, - com.liferay.portal.kernel.dao.orm.Projection projection) - throws com.liferay.portal.kernel.exception.SystemException; - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the email template attachment with the primary key. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment - * @throws PortalException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment getEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - @Override - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public com.liferay.portal.model.PersistedModel getPersistedModel( - java.io.Serializable primaryKeyObj) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the email template attachments. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @return the range of email template attachments - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public java.util.List getEmailTemplateAttachments( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of email template attachments. - * - * @return the number of email template attachments - * @throws SystemException if a system exception occurred - */ - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public int getEmailTemplateAttachmentsCount() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Updates the email template attachment in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachment the email template attachment - * @return the email template attachment that was updated - * @throws SystemException if a system exception occurred - */ - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment updateEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - public java.lang.String getBeanIdentifier(); - - /** - * Sets the Spring bean ID for this bean. - * - * @param beanIdentifier the Spring bean ID for this bean - */ - public void setBeanIdentifier(java.lang.String beanIdentifier); - - @Override - public java.lang.Object invokeMethod(java.lang.String name, - java.lang.String[] parameterTypes, java.lang.Object[] arguments) - throws java.lang.Throwable; -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalServiceClp.java deleted file mode 100644 index 0e395f01..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalServiceClp.java +++ /dev/null @@ -1,733 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.service; - -import com.liferay.portal.service.InvokableLocalService; - -/** - * @author - * @generated - */ -public class EmailTemplateAttachmentLocalServiceClp - implements EmailTemplateAttachmentLocalService { - public EmailTemplateAttachmentLocalServiceClp( - InvokableLocalService invokableLocalService) { - _invokableLocalService = invokableLocalService; - - _methodName0 = "addEmailTemplateAttachment"; - - _methodParameterTypes0 = new String[] { - "it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment" - }; - - _methodName1 = "createEmailTemplateAttachment"; - - _methodParameterTypes1 = new String[] { - "it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK" - }; - - _methodName2 = "deleteEmailTemplateAttachment"; - - _methodParameterTypes2 = new String[] { - "it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK" - }; - - _methodName3 = "deleteEmailTemplateAttachment"; - - _methodParameterTypes3 = new String[] { - "it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment" - }; - - _methodName4 = "dynamicQuery"; - - _methodParameterTypes4 = new String[] { }; - - _methodName5 = "dynamicQuery"; - - _methodParameterTypes5 = new String[] { - "com.liferay.portal.kernel.dao.orm.DynamicQuery" - }; - - _methodName6 = "dynamicQuery"; - - _methodParameterTypes6 = new String[] { - "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int" - }; - - _methodName7 = "dynamicQuery"; - - _methodParameterTypes7 = new String[] { - "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName8 = "dynamicQueryCount"; - - _methodParameterTypes8 = new String[] { - "com.liferay.portal.kernel.dao.orm.DynamicQuery" - }; - - _methodName9 = "dynamicQueryCount"; - - _methodParameterTypes9 = new String[] { - "com.liferay.portal.kernel.dao.orm.DynamicQuery", - "com.liferay.portal.kernel.dao.orm.Projection" - }; - - _methodName10 = "fetchEmailTemplateAttachment"; - - _methodParameterTypes10 = new String[] { - "it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK" - }; - - _methodName11 = "getEmailTemplateAttachment"; - - _methodParameterTypes11 = new String[] { - "it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK" - }; - - _methodName12 = "getPersistedModel"; - - _methodParameterTypes12 = new String[] { "java.io.Serializable" }; - - _methodName13 = "getEmailTemplateAttachments"; - - _methodParameterTypes13 = new String[] { "int", "int" }; - - _methodName14 = "getEmailTemplateAttachmentsCount"; - - _methodParameterTypes14 = new String[] { }; - - _methodName15 = "updateEmailTemplateAttachment"; - - _methodParameterTypes15 = new String[] { - "it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment" - }; - - _methodName16 = "getBeanIdentifier"; - - _methodParameterTypes16 = new String[] { }; - - _methodName17 = "setBeanIdentifier"; - - _methodParameterTypes17 = new String[] { "java.lang.String" }; - } - - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment addEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName0, - _methodParameterTypes0, - new Object[] { - ClpSerializer.translateInput(emailTemplateAttachment) - }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment createEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName1, - _methodParameterTypes1, - new Object[] { - ClpSerializer.translateInput(emailTemplateAttachmentPK) - }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment deleteEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName2, - _methodParameterTypes2, - new Object[] { - ClpSerializer.translateInput(emailTemplateAttachmentPK) - }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.PortalException) { - throw (com.liferay.portal.kernel.exception.PortalException)t; - } - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment deleteEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName3, - _methodParameterTypes3, - new Object[] { - ClpSerializer.translateInput(emailTemplateAttachment) - }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName4, - _methodParameterTypes4, new Object[] { }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (com.liferay.portal.kernel.dao.orm.DynamicQuery)ClpSerializer.translateOutput(returnObj); - } - - @Override - @SuppressWarnings("rawtypes") - public java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName5, - _methodParameterTypes5, - new Object[] { ClpSerializer.translateInput(dynamicQuery) }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (java.util.List)ClpSerializer.translateOutput(returnObj); - } - - @Override - @SuppressWarnings("rawtypes") - public java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName6, - _methodParameterTypes6, - new Object[] { - ClpSerializer.translateInput(dynamicQuery), - - start, - - end - }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (java.util.List)ClpSerializer.translateOutput(returnObj); - } - - @Override - @SuppressWarnings("rawtypes") - public java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName7, - _methodParameterTypes7, - new Object[] { - ClpSerializer.translateInput(dynamicQuery), - - start, - - end, - - ClpSerializer.translateInput(orderByComparator) - }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (java.util.List)ClpSerializer.translateOutput(returnObj); - } - - @Override - public long dynamicQueryCount( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName8, - _methodParameterTypes8, - new Object[] { ClpSerializer.translateInput(dynamicQuery) }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return ((Long)returnObj).longValue(); - } - - @Override - public long dynamicQueryCount( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, - com.liferay.portal.kernel.dao.orm.Projection projection) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName9, - _methodParameterTypes9, - new Object[] { - ClpSerializer.translateInput(dynamicQuery), - - ClpSerializer.translateInput(projection) - }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return ((Long)returnObj).longValue(); - } - - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName10, - _methodParameterTypes10, - new Object[] { - ClpSerializer.translateInput(emailTemplateAttachmentPK) - }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment getEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName11, - _methodParameterTypes11, - new Object[] { - ClpSerializer.translateInput(emailTemplateAttachmentPK) - }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.PortalException) { - throw (com.liferay.portal.kernel.exception.PortalException)t; - } - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public com.liferay.portal.model.PersistedModel getPersistedModel( - java.io.Serializable primaryKeyObj) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName12, - _methodParameterTypes12, - new Object[] { ClpSerializer.translateInput(primaryKeyObj) }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.PortalException) { - throw (com.liferay.portal.kernel.exception.PortalException)t; - } - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (com.liferay.portal.model.PersistedModel)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.util.List getEmailTemplateAttachments( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName13, - _methodParameterTypes13, new Object[] { start, end }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (java.util.List)ClpSerializer.translateOutput(returnObj); - } - - @Override - public int getEmailTemplateAttachmentsCount() - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName14, - _methodParameterTypes14, new Object[] { }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return ((Integer)returnObj).intValue(); - } - - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment updateEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName15, - _methodParameterTypes15, - new Object[] { - ClpSerializer.translateInput(emailTemplateAttachment) - }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof com.liferay.portal.kernel.exception.SystemException) { - throw (com.liferay.portal.kernel.exception.SystemException)t; - } - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment)ClpSerializer.translateOutput(returnObj); - } - - @Override - public java.lang.String getBeanIdentifier() { - Object returnObj = null; - - try { - returnObj = _invokableLocalService.invokeMethod(_methodName16, - _methodParameterTypes16, new Object[] { }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - - return (java.lang.String)ClpSerializer.translateOutput(returnObj); - } - - @Override - public void setBeanIdentifier(java.lang.String beanIdentifier) { - try { - _invokableLocalService.invokeMethod(_methodName17, - _methodParameterTypes17, - new Object[] { ClpSerializer.translateInput(beanIdentifier) }); - } - catch (Throwable t) { - t = ClpSerializer.translateThrowable(t); - - if (t instanceof RuntimeException) { - throw (RuntimeException)t; - } - else { - throw new RuntimeException(t.getClass().getName() + - " is not a valid exception"); - } - } - } - - @Override - public java.lang.Object invokeMethod(java.lang.String name, - java.lang.String[] parameterTypes, java.lang.Object[] arguments) - throws java.lang.Throwable { - throw new UnsupportedOperationException(); - } - - private InvokableLocalService _invokableLocalService; - private String _methodName0; - private String[] _methodParameterTypes0; - private String _methodName1; - private String[] _methodParameterTypes1; - private String _methodName2; - private String[] _methodParameterTypes2; - private String _methodName3; - private String[] _methodParameterTypes3; - private String _methodName4; - private String[] _methodParameterTypes4; - private String _methodName5; - private String[] _methodParameterTypes5; - private String _methodName6; - private String[] _methodParameterTypes6; - private String _methodName7; - private String[] _methodParameterTypes7; - private String _methodName8; - private String[] _methodParameterTypes8; - private String _methodName9; - private String[] _methodParameterTypes9; - private String _methodName10; - private String[] _methodParameterTypes10; - private String _methodName11; - private String[] _methodParameterTypes11; - private String _methodName12; - private String[] _methodParameterTypes12; - private String _methodName13; - private String[] _methodParameterTypes13; - private String _methodName14; - private String[] _methodParameterTypes14; - private String _methodName15; - private String[] _methodParameterTypes15; - private String _methodName16; - private String[] _methodParameterTypes16; - private String _methodName17; - private String[] _methodParameterTypes17; -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalServiceUtil.java deleted file mode 100644 index 4228e961..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalServiceUtil.java +++ /dev/null @@ -1,313 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.service; - -import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; -import com.liferay.portal.kernel.util.ReferenceRegistry; -import com.liferay.portal.service.InvokableLocalService; - -/** - * Provides the local service utility for EmailTemplateAttachment. This utility wraps - * {@link it.tref.liferay.portos.mailmanager.service.impl.EmailTemplateAttachmentLocalServiceImpl} and is the - * primary access point for service operations in application layer code running - * on the local server. 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. - * - * @author - * @see EmailTemplateAttachmentLocalService - * @see it.tref.liferay.portos.mailmanager.service.base.EmailTemplateAttachmentLocalServiceBaseImpl - * @see it.tref.liferay.portos.mailmanager.service.impl.EmailTemplateAttachmentLocalServiceImpl - * @generated - */ -public class EmailTemplateAttachmentLocalServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link it.tref.liferay.portos.mailmanager.service.impl.EmailTemplateAttachmentLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Adds the email template attachment to the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachment the email template attachment - * @return the email template attachment that was added - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment addEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().addEmailTemplateAttachment(emailTemplateAttachment); - } - - /** - * Creates a new email template attachment with the primary key. Does not add the email template attachment to the database. - * - * @param emailTemplateAttachmentPK the primary key for the new email template attachment - * @return the new email template attachment - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment createEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) { - return getService() - .createEmailTemplateAttachment(emailTemplateAttachmentPK); - } - - /** - * Deletes the email template attachment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment that was removed - * @throws PortalException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment deleteEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService() - .deleteEmailTemplateAttachment(emailTemplateAttachmentPK); - } - - /** - * Deletes the email template attachment from the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachment the email template attachment - * @return the email template attachment that was removed - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment deleteEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .deleteEmailTemplateAttachment(emailTemplateAttachment); - } - - public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - return getService().dynamicQuery(); - } - - /** - * Performs a dynamic query on the database and returns the matching rows. - * - * @param dynamicQuery the dynamic query - * @return the matching rows - * @throws SystemException if a system exception occurred - */ - @SuppressWarnings("rawtypes") - public static java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().dynamicQuery(dynamicQuery); - } - - /** - * 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 {@link com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 dynamicQuery the dynamic query - * @param start the lower bound of the range of model instances - * @param end the upper bound of the range of model instances (not inclusive) - * @return the range of matching rows - * @throws SystemException if a system exception occurred - */ - @SuppressWarnings("rawtypes") - public static java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return getService().dynamicQuery(dynamicQuery, start, end); - } - - /** - * 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 {@link com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 dynamicQuery the dynamic query - * @param start the lower bound of the range of model instances - * @param end the upper bound of the range of model instances (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching rows - * @throws SystemException if a system exception occurred - */ - @SuppressWarnings("rawtypes") - public static java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .dynamicQuery(dynamicQuery, start, end, orderByComparator); - } - - /** - * Returns the number of rows that match the dynamic query. - * - * @param dynamicQuery the dynamic query - * @return the number of rows that match the dynamic query - * @throws SystemException if a system exception occurred - */ - public static long dynamicQueryCount( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().dynamicQueryCount(dynamicQuery); - } - - /** - * Returns the number of rows that match the dynamic query. - * - * @param dynamicQuery the dynamic query - * @param projection the projection to apply to the query - * @return the number of rows that match the dynamic query - * @throws SystemException if a system exception occurred - */ - public static long dynamicQueryCount( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, - com.liferay.portal.kernel.dao.orm.Projection projection) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().dynamicQueryCount(dynamicQuery, projection); - } - - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .fetchEmailTemplateAttachment(emailTemplateAttachmentPK); - } - - /** - * Returns the email template attachment with the primary key. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment - * @throws PortalException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment getEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getEmailTemplateAttachment(emailTemplateAttachmentPK); - } - - public static com.liferay.portal.model.PersistedModel getPersistedModel( - java.io.Serializable primaryKeyObj) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return getService().getPersistedModel(primaryKeyObj); - } - - /** - * Returns a range of all the email template attachments. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @return the range of email template attachments - * @throws SystemException if a system exception occurred - */ - public static java.util.List getEmailTemplateAttachments( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getEmailTemplateAttachments(start, end); - } - - /** - * Returns the number of email template attachments. - * - * @return the number of email template attachments - * @throws SystemException if a system exception occurred - */ - public static int getEmailTemplateAttachmentsCount() - throws com.liferay.portal.kernel.exception.SystemException { - return getService().getEmailTemplateAttachmentsCount(); - } - - /** - * Updates the email template attachment in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachment the email template attachment - * @return the email template attachment that was updated - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment updateEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateEmailTemplateAttachment(emailTemplateAttachment); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - public static java.lang.String getBeanIdentifier() { - return getService().getBeanIdentifier(); - } - - /** - * Sets the Spring bean ID for this bean. - * - * @param beanIdentifier the Spring bean ID for this bean - */ - public static void setBeanIdentifier(java.lang.String beanIdentifier) { - getService().setBeanIdentifier(beanIdentifier); - } - - public static java.lang.Object invokeMethod(java.lang.String name, - java.lang.String[] parameterTypes, java.lang.Object[] arguments) - throws java.lang.Throwable { - return getService().invokeMethod(name, parameterTypes, arguments); - } - - public static void clearService() { - _service = null; - } - - public static EmailTemplateAttachmentLocalService getService() { - if (_service == null) { - InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), - EmailTemplateAttachmentLocalService.class.getName()); - - if (invokableLocalService instanceof EmailTemplateAttachmentLocalService) { - _service = (EmailTemplateAttachmentLocalService)invokableLocalService; - } - else { - _service = new EmailTemplateAttachmentLocalServiceClp(invokableLocalService); - } - - ReferenceRegistry.registerReference(EmailTemplateAttachmentLocalServiceUtil.class, - "_service"); - } - - return _service; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setService(EmailTemplateAttachmentLocalService service) { - } - - private static EmailTemplateAttachmentLocalService _service; -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalServiceWrapper.java deleted file mode 100644 index 61a823b0..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/EmailTemplateAttachmentLocalServiceWrapper.java +++ /dev/null @@ -1,320 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.service; - -import com.liferay.portal.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link EmailTemplateAttachmentLocalService}. - * - * @author - * @see EmailTemplateAttachmentLocalService - * @generated - */ -public class EmailTemplateAttachmentLocalServiceWrapper - implements EmailTemplateAttachmentLocalService, - ServiceWrapper { - public EmailTemplateAttachmentLocalServiceWrapper( - EmailTemplateAttachmentLocalService emailTemplateAttachmentLocalService) { - _emailTemplateAttachmentLocalService = emailTemplateAttachmentLocalService; - } - - /** - * Adds the email template attachment to the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachment the email template attachment - * @return the email template attachment that was added - * @throws SystemException if a system exception occurred - */ - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment addEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.addEmailTemplateAttachment(emailTemplateAttachment); - } - - /** - * Creates a new email template attachment with the primary key. Does not add the email template attachment to the database. - * - * @param emailTemplateAttachmentPK the primary key for the new email template attachment - * @return the new email template attachment - */ - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment createEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) { - return _emailTemplateAttachmentLocalService.createEmailTemplateAttachment(emailTemplateAttachmentPK); - } - - /** - * Deletes the email template attachment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment that was removed - * @throws PortalException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment deleteEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.deleteEmailTemplateAttachment(emailTemplateAttachmentPK); - } - - /** - * Deletes the email template attachment from the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachment the email template attachment - * @return the email template attachment that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment deleteEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.deleteEmailTemplateAttachment(emailTemplateAttachment); - } - - @Override - public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { - return _emailTemplateAttachmentLocalService.dynamicQuery(); - } - - /** - * Performs a dynamic query on the database and returns the matching rows. - * - * @param dynamicQuery the dynamic query - * @return the matching rows - * @throws SystemException if a system exception occurred - */ - @Override - @SuppressWarnings("rawtypes") - public java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - throws com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.dynamicQuery(dynamicQuery); - } - - /** - * 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 {@link com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 dynamicQuery the dynamic query - * @param start the lower bound of the range of model instances - * @param end the upper bound of the range of model instances (not inclusive) - * @return the range of matching rows - * @throws SystemException if a system exception occurred - */ - @Override - @SuppressWarnings("rawtypes") - public java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, - int end) throws com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.dynamicQuery(dynamicQuery, - start, end); - } - - /** - * 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 {@link com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 dynamicQuery the dynamic query - * @param start the lower bound of the range of model instances - * @param end the upper bound of the range of model instances (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching rows - * @throws SystemException if a system exception occurred - */ - @Override - @SuppressWarnings("rawtypes") - public java.util.List dynamicQuery( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, - int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.dynamicQuery(dynamicQuery, - start, end, orderByComparator); - } - - /** - * Returns the number of rows that match the dynamic query. - * - * @param dynamicQuery the dynamic query - * @return the number of rows that match the dynamic query - * @throws SystemException if a system exception occurred - */ - @Override - public long dynamicQueryCount( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - throws com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.dynamicQueryCount(dynamicQuery); - } - - /** - * Returns the number of rows that match the dynamic query. - * - * @param dynamicQuery the dynamic query - * @param projection the projection to apply to the query - * @return the number of rows that match the dynamic query - * @throws SystemException if a system exception occurred - */ - @Override - public long dynamicQueryCount( - com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, - com.liferay.portal.kernel.dao.orm.Projection projection) - throws com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.dynamicQueryCount(dynamicQuery, - projection); - } - - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.fetchEmailTemplateAttachment(emailTemplateAttachmentPK); - } - - /** - * Returns the email template attachment with the primary key. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment - * @throws PortalException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment getEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.getEmailTemplateAttachment(emailTemplateAttachmentPK); - } - - @Override - public com.liferay.portal.model.PersistedModel getPersistedModel( - java.io.Serializable primaryKeyObj) - throws com.liferay.portal.kernel.exception.PortalException, - com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.getPersistedModel(primaryKeyObj); - } - - /** - * Returns a range of all the email template attachments. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @return the range of email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public java.util.List getEmailTemplateAttachments( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.getEmailTemplateAttachments(start, - end); - } - - /** - * Returns the number of email template attachments. - * - * @return the number of email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public int getEmailTemplateAttachmentsCount() - throws com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.getEmailTemplateAttachmentsCount(); - } - - /** - * Updates the email template attachment in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachment the email template attachment - * @return the email template attachment that was updated - * @throws SystemException if a system exception occurred - */ - @Override - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment updateEmailTemplateAttachment( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException { - return _emailTemplateAttachmentLocalService.updateEmailTemplateAttachment(emailTemplateAttachment); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public java.lang.String getBeanIdentifier() { - return _emailTemplateAttachmentLocalService.getBeanIdentifier(); - } - - /** - * Sets the Spring bean ID for this bean. - * - * @param beanIdentifier the Spring bean ID for this bean - */ - @Override - public void setBeanIdentifier(java.lang.String beanIdentifier) { - _emailTemplateAttachmentLocalService.setBeanIdentifier(beanIdentifier); - } - - @Override - public java.lang.Object invokeMethod(java.lang.String name, - java.lang.String[] parameterTypes, java.lang.Object[] arguments) - throws java.lang.Throwable { - return _emailTemplateAttachmentLocalService.invokeMethod(name, - parameterTypes, arguments); - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} - */ - public EmailTemplateAttachmentLocalService getWrappedEmailTemplateAttachmentLocalService() { - return _emailTemplateAttachmentLocalService; - } - - /** - * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} - */ - public void setWrappedEmailTemplateAttachmentLocalService( - EmailTemplateAttachmentLocalService emailTemplateAttachmentLocalService) { - _emailTemplateAttachmentLocalService = emailTemplateAttachmentLocalService; - } - - @Override - public EmailTemplateAttachmentLocalService getWrappedService() { - return _emailTemplateAttachmentLocalService; - } - - @Override - public void setWrappedService( - EmailTemplateAttachmentLocalService emailTemplateAttachmentLocalService) { - _emailTemplateAttachmentLocalService = emailTemplateAttachmentLocalService; - } - - private EmailTemplateAttachmentLocalService _emailTemplateAttachmentLocalService; -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentActionableDynamicQuery.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentActionableDynamicQuery.java deleted file mode 100644 index 87bc9012..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentActionableDynamicQuery.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.service.persistence; - -import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; -import com.liferay.portal.kernel.exception.SystemException; - -import it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment; -import it.tref.liferay.portos.mailmanager.service.EmailTemplateAttachmentLocalServiceUtil; - -/** - * @author - * @generated - */ -public abstract class EmailTemplateAttachmentActionableDynamicQuery - extends BaseActionableDynamicQuery { - public EmailTemplateAttachmentActionableDynamicQuery() - throws SystemException { - setBaseLocalService(EmailTemplateAttachmentLocalServiceUtil.getService()); - setClass(EmailTemplateAttachment.class); - - setClassLoader(it.tref.liferay.portos.mailmanager.service.ClpSerializer.class.getClassLoader()); - - setPrimaryKeyPropertyName("primaryKey.emailTemplateId"); - } -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentPK.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentPK.java deleted file mode 100644 index f81f9368..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentPK.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.service.persistence; - -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; - -import java.io.Serializable; - -/** - * @author - * @generated - */ -public class EmailTemplateAttachmentPK implements Comparable, - Serializable { - public long emailTemplateId; - public long fileEntryId; - - public EmailTemplateAttachmentPK() { - } - - public EmailTemplateAttachmentPK(long emailTemplateId, long fileEntryId) { - this.emailTemplateId = emailTemplateId; - this.fileEntryId = fileEntryId; - } - - public long getEmailTemplateId() { - return emailTemplateId; - } - - public void setEmailTemplateId(long emailTemplateId) { - this.emailTemplateId = emailTemplateId; - } - - public long getFileEntryId() { - return fileEntryId; - } - - public void setFileEntryId(long fileEntryId) { - this.fileEntryId = fileEntryId; - } - - @Override - public int compareTo(EmailTemplateAttachmentPK pk) { - if (pk == null) { - return -1; - } - - int value = 0; - - if (emailTemplateId < pk.emailTemplateId) { - value = -1; - } - else if (emailTemplateId > pk.emailTemplateId) { - value = 1; - } - else { - value = 0; - } - - if (value != 0) { - return value; - } - - if (fileEntryId < pk.fileEntryId) { - value = -1; - } - else if (fileEntryId > pk.fileEntryId) { - value = 1; - } - else { - value = 0; - } - - if (value != 0) { - return value; - } - - return 0; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof EmailTemplateAttachmentPK)) { - return false; - } - - EmailTemplateAttachmentPK pk = (EmailTemplateAttachmentPK)obj; - - if ((emailTemplateId == pk.emailTemplateId) && - (fileEntryId == pk.fileEntryId)) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return (String.valueOf(emailTemplateId) + String.valueOf(fileEntryId)).hashCode(); - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(10); - - sb.append(StringPool.OPEN_CURLY_BRACE); - - sb.append("emailTemplateId"); - sb.append(StringPool.EQUAL); - sb.append(emailTemplateId); - - sb.append(StringPool.COMMA); - sb.append(StringPool.SPACE); - sb.append("fileEntryId"); - sb.append(StringPool.EQUAL); - sb.append(fileEntryId); - - sb.append(StringPool.CLOSE_CURLY_BRACE); - - return sb.toString(); - } -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentPersistence.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentPersistence.java deleted file mode 100644 index 88be0961..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentPersistence.java +++ /dev/null @@ -1,362 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.service.persistence; - -import com.liferay.portal.service.persistence.BasePersistence; - -import it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment; - -/** - * The persistence interface for the email template attachment service. - * - *

- * Caching information and settings can be found in portal.properties - *

- * - * @author - * @see EmailTemplateAttachmentPersistenceImpl - * @see EmailTemplateAttachmentUtil - * @generated - */ -public interface EmailTemplateAttachmentPersistence extends BasePersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link EmailTemplateAttachmentUtil} to access the email template attachment persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. - */ - - /** - * Returns all the email template attachments where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @return the matching email template attachments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByEmailTemplateId( - long emailTemplateId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the email template attachments where emailTemplateId = ?. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 emailTemplateId the email template ID - * @param start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @return the range of matching email template attachments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByEmailTemplateId( - long emailTemplateId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the email template attachments where emailTemplateId = ?. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 emailTemplateId the email template ID - * @param start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching email template attachments - * @throws SystemException if a system exception occurred - */ - public java.util.List findByEmailTemplateId( - long emailTemplateId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment findByEmailTemplateId_First( - long emailTemplateId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException; - - /** - * Returns the first email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching email template attachment, or null if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchByEmailTemplateId_First( - long emailTemplateId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the last email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment findByEmailTemplateId_Last( - long emailTemplateId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException; - - /** - * Returns the last email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching email template attachment, or null if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchByEmailTemplateId_Last( - long emailTemplateId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the email template attachments before and after the current email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateAttachmentPK the primary key of the current email template attachment - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment[] findByEmailTemplateId_PrevAndNext( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK, - long emailTemplateId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException; - - /** - * Removes all the email template attachments where emailTemplateId = ? from the database. - * - * @param emailTemplateId the email template ID - * @throws SystemException if a system exception occurred - */ - public void removeByEmailTemplateId(long emailTemplateId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of email template attachments where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @return the number of matching email template attachments - * @throws SystemException if a system exception occurred - */ - public int countByEmailTemplateId(long emailTemplateId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the email template attachment where fileEntryId = ? or throws a {@link it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException} if it could not be found. - * - * @param fileEntryId the file entry ID - * @return the matching email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment findByFileEntryId( - long fileEntryId) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException; - - /** - * Returns the email template attachment where fileEntryId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param fileEntryId the file entry ID - * @return the matching email template attachment, or null if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchByFileEntryId( - long fileEntryId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the email template attachment where fileEntryId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param fileEntryId the file entry ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching email template attachment, or null if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchByFileEntryId( - long fileEntryId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes the email template attachment where fileEntryId = ? from the database. - * - * @param fileEntryId the file entry ID - * @return the email template attachment that was removed - * @throws SystemException if a system exception occurred - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment removeByFileEntryId( - long fileEntryId) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException; - - /** - * Returns the number of email template attachments where fileEntryId = ?. - * - * @param fileEntryId the file entry ID - * @return the number of matching email template attachments - * @throws SystemException if a system exception occurred - */ - public int countByFileEntryId(long fileEntryId) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Caches the email template attachment in the entity cache if it is enabled. - * - * @param emailTemplateAttachment the email template attachment - */ - public void cacheResult( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment); - - /** - * Caches the email template attachments in the entity cache if it is enabled. - * - * @param emailTemplateAttachments the email template attachments - */ - public void cacheResult( - java.util.List emailTemplateAttachments); - - /** - * Creates a new email template attachment with the primary key. Does not add the email template attachment to the database. - * - * @param emailTemplateAttachmentPK the primary key for the new email template attachment - * @return the new email template attachment - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment create( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK); - - /** - * Removes the email template attachment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment that was removed - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment remove( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException; - - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment updateImpl( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the email template attachment with the primary key or throws a {@link it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException} if it could not be found. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment findByPrimaryKey( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException; - - /** - * Returns the email template attachment with the primary key or returns null if it could not be found. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment, or null if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchByPrimaryKey( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns all the email template attachments. - * - * @return the email template attachments - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the email template attachments. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @return the range of email template attachments - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the email template attachments. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of email template attachments - * @throws SystemException if a system exception occurred - */ - public java.util.List findAll( - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Removes all the email template attachments from the database. - * - * @throws SystemException if a system exception occurred - */ - public void removeAll() - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the number of email template attachments. - * - * @return the number of email template attachments - * @throws SystemException if a system exception occurred - */ - public int countAll() - throws com.liferay.portal.kernel.exception.SystemException; -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentUtil.java deleted file mode 100644 index f6387abf..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentUtil.java +++ /dev/null @@ -1,526 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.service.persistence; - -import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.ReferenceRegistry; -import com.liferay.portal.service.ServiceContext; - -import it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment; - -import java.util.List; - -/** - * The persistence utility for the email template attachment service. This utility wraps {@link EmailTemplateAttachmentPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. - * - *

- * Caching information and settings can be found in portal.properties - *

- * - * @author - * @see EmailTemplateAttachmentPersistence - * @see EmailTemplateAttachmentPersistenceImpl - * @generated - */ -public class EmailTemplateAttachmentUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() - */ - public static void clearCache() { - getPersistence().clearCache(); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) - */ - public static void clearCache( - EmailTemplateAttachment emailTemplateAttachment) { - getPersistence().clearCache(emailTemplateAttachment); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) - */ - public static long countWithDynamicQuery(DynamicQuery dynamicQuery) - throws SystemException { - return getPersistence().countWithDynamicQuery(dynamicQuery); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) - */ - public static List findWithDynamicQuery( - DynamicQuery dynamicQuery) throws SystemException { - return getPersistence().findWithDynamicQuery(dynamicQuery); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) - */ - public static List findWithDynamicQuery( - DynamicQuery dynamicQuery, int start, int end) - throws SystemException { - return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) - */ - public static List findWithDynamicQuery( - DynamicQuery dynamicQuery, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - return getPersistence() - .findWithDynamicQuery(dynamicQuery, start, end, - orderByComparator); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) - */ - public static EmailTemplateAttachment update( - EmailTemplateAttachment emailTemplateAttachment) - throws SystemException { - return getPersistence().update(emailTemplateAttachment); - } - - /** - * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) - */ - public static EmailTemplateAttachment update( - EmailTemplateAttachment emailTemplateAttachment, - ServiceContext serviceContext) throws SystemException { - return getPersistence().update(emailTemplateAttachment, serviceContext); - } - - /** - * Returns all the email template attachments where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @return the matching email template attachments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByEmailTemplateId( - long emailTemplateId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findByEmailTemplateId(emailTemplateId); - } - - /** - * Returns a range of all the email template attachments where emailTemplateId = ?. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 emailTemplateId the email template ID - * @param start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @return the range of matching email template attachments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByEmailTemplateId( - long emailTemplateId, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByEmailTemplateId(emailTemplateId, start, end); - } - - /** - * Returns an ordered range of all the email template attachments where emailTemplateId = ?. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 emailTemplateId the email template ID - * @param start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching email template attachments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findByEmailTemplateId( - long emailTemplateId, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .findByEmailTemplateId(emailTemplateId, start, end, - orderByComparator); - } - - /** - * Returns the first email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment findByEmailTemplateId_First( - long emailTemplateId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException { - return getPersistence() - .findByEmailTemplateId_First(emailTemplateId, - orderByComparator); - } - - /** - * Returns the first email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching email template attachment, or null if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchByEmailTemplateId_First( - long emailTemplateId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByEmailTemplateId_First(emailTemplateId, - orderByComparator); - } - - /** - * Returns the last email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment findByEmailTemplateId_Last( - long emailTemplateId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException { - return getPersistence() - .findByEmailTemplateId_Last(emailTemplateId, - orderByComparator); - } - - /** - * Returns the last email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching email template attachment, or null if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchByEmailTemplateId_Last( - long emailTemplateId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByEmailTemplateId_Last(emailTemplateId, - orderByComparator); - } - - /** - * Returns the email template attachments before and after the current email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateAttachmentPK the primary key of the current email template attachment - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment[] findByEmailTemplateId_PrevAndNext( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK, - long emailTemplateId, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException { - return getPersistence() - .findByEmailTemplateId_PrevAndNext(emailTemplateAttachmentPK, - emailTemplateId, orderByComparator); - } - - /** - * Removes all the email template attachments where emailTemplateId = ? from the database. - * - * @param emailTemplateId the email template ID - * @throws SystemException if a system exception occurred - */ - public static void removeByEmailTemplateId(long emailTemplateId) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeByEmailTemplateId(emailTemplateId); - } - - /** - * Returns the number of email template attachments where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @return the number of matching email template attachments - * @throws SystemException if a system exception occurred - */ - public static int countByEmailTemplateId(long emailTemplateId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByEmailTemplateId(emailTemplateId); - } - - /** - * Returns the email template attachment where fileEntryId = ? or throws a {@link it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException} if it could not be found. - * - * @param fileEntryId the file entry ID - * @return the matching email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment findByFileEntryId( - long fileEntryId) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException { - return getPersistence().findByFileEntryId(fileEntryId); - } - - /** - * Returns the email template attachment where fileEntryId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param fileEntryId the file entry ID - * @return the matching email template attachment, or null if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchByFileEntryId( - long fileEntryId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByFileEntryId(fileEntryId); - } - - /** - * Returns the email template attachment where fileEntryId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param fileEntryId the file entry ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching email template attachment, or null if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchByFileEntryId( - long fileEntryId, boolean retrieveFromCache) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence() - .fetchByFileEntryId(fileEntryId, retrieveFromCache); - } - - /** - * Removes the email template attachment where fileEntryId = ? from the database. - * - * @param fileEntryId the file entry ID - * @return the email template attachment that was removed - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment removeByFileEntryId( - long fileEntryId) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException { - return getPersistence().removeByFileEntryId(fileEntryId); - } - - /** - * Returns the number of email template attachments where fileEntryId = ?. - * - * @param fileEntryId the file entry ID - * @return the number of matching email template attachments - * @throws SystemException if a system exception occurred - */ - public static int countByFileEntryId(long fileEntryId) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countByFileEntryId(fileEntryId); - } - - /** - * Caches the email template attachment in the entity cache if it is enabled. - * - * @param emailTemplateAttachment the email template attachment - */ - public static void cacheResult( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) { - getPersistence().cacheResult(emailTemplateAttachment); - } - - /** - * Caches the email template attachments in the entity cache if it is enabled. - * - * @param emailTemplateAttachments the email template attachments - */ - public static void cacheResult( - java.util.List emailTemplateAttachments) { - getPersistence().cacheResult(emailTemplateAttachments); - } - - /** - * Creates a new email template attachment with the primary key. Does not add the email template attachment to the database. - * - * @param emailTemplateAttachmentPK the primary key for the new email template attachment - * @return the new email template attachment - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment create( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) { - return getPersistence().create(emailTemplateAttachmentPK); - } - - /** - * Removes the email template attachment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment that was removed - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment remove( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException { - return getPersistence().remove(emailTemplateAttachmentPK); - } - - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment updateImpl( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().updateImpl(emailTemplateAttachment); - } - - /** - * Returns the email template attachment with the primary key or throws a {@link it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException} if it could not be found. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment findByPrimaryKey( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.SystemException, - it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException { - return getPersistence().findByPrimaryKey(emailTemplateAttachmentPK); - } - - /** - * Returns the email template attachment with the primary key or returns null if it could not be found. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment, or null if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - public static it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment fetchByPrimaryKey( - it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchByPrimaryKey(emailTemplateAttachmentPK); - } - - /** - * Returns all the email template attachments. - * - * @return the email template attachments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(); - } - - /** - * Returns a range of all the email template attachments. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @return the range of email template attachments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll( - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(start, end); - } - - /** - * Returns an ordered range of all the email template attachments. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of email template attachments - * @throws SystemException if a system exception occurred - */ - public static java.util.List findAll( - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findAll(start, end, orderByComparator); - } - - /** - * Removes all the email template attachments from the database. - * - * @throws SystemException if a system exception occurred - */ - public static void removeAll() - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeAll(); - } - - /** - * Returns the number of email template attachments. - * - * @return the number of email template attachments - * @throws SystemException if a system exception occurred - */ - public static int countAll() - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().countAll(); - } - - public static EmailTemplateAttachmentPersistence getPersistence() { - if (_persistence == null) { - _persistence = (EmailTemplateAttachmentPersistence)PortletBeanLocatorUtil.locate(it.tref.liferay.portos.mailmanager.service.ClpSerializer.getServletContextName(), - EmailTemplateAttachmentPersistence.class.getName()); - - ReferenceRegistry.registerReference(EmailTemplateAttachmentUtil.class, - "_persistence"); - } - - return _persistence; - } - - /** - * @deprecated As of 6.2.0 - */ - public void setPersistence(EmailTemplateAttachmentPersistence persistence) { - } - - private static EmailTemplateAttachmentPersistence _persistence; -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentBaseImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentBaseImpl.java deleted file mode 100644 index 7936a52f..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentBaseImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.model.impl; - -import com.liferay.portal.kernel.exception.SystemException; - -import it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment; -import it.tref.liferay.portos.mailmanager.service.EmailTemplateAttachmentLocalServiceUtil; - -/** - * The extended model base implementation for the EmailTemplateAttachment service. Represents a row in the "portos_Mail_EmailTemplateAttachment" database table, with each column mapped to a property of this class. - * - *

- * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link EmailTemplateAttachmentImpl}. - *

- * - * @author - * @see EmailTemplateAttachmentImpl - * @see it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment - * @generated - */ -public abstract class EmailTemplateAttachmentBaseImpl - extends EmailTemplateAttachmentModelImpl implements EmailTemplateAttachment { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a email template attachment model instance should use the {@link EmailTemplateAttachment} interface instead. - */ - @Override - public void persist() throws SystemException { - if (this.isNew()) { - EmailTemplateAttachmentLocalServiceUtil.addEmailTemplateAttachment(this); - } - else { - EmailTemplateAttachmentLocalServiceUtil.updateEmailTemplateAttachment(this); - } - } -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentCacheModel.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentCacheModel.java deleted file mode 100644 index 5fdaf2c2..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentCacheModel.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.model.impl; - -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.model.CacheModel; - -import it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment; - -import java.io.Externalizable; -import java.io.IOException; -import java.io.ObjectInput; -import java.io.ObjectOutput; - -/** - * The cache model class for representing EmailTemplateAttachment in entity cache. - * - * @author - * @see EmailTemplateAttachment - * @generated - */ -public class EmailTemplateAttachmentCacheModel implements CacheModel, - Externalizable { - @Override - public String toString() { - StringBundler sb = new StringBundler(5); - - sb.append("{emailTemplateId="); - sb.append(emailTemplateId); - sb.append(", fileEntryId="); - sb.append(fileEntryId); - sb.append("}"); - - return sb.toString(); - } - - @Override - public EmailTemplateAttachment toEntityModel() { - EmailTemplateAttachmentImpl emailTemplateAttachmentImpl = new EmailTemplateAttachmentImpl(); - - emailTemplateAttachmentImpl.setEmailTemplateId(emailTemplateId); - emailTemplateAttachmentImpl.setFileEntryId(fileEntryId); - - emailTemplateAttachmentImpl.resetOriginalValues(); - - return emailTemplateAttachmentImpl; - } - - @Override - public void readExternal(ObjectInput objectInput) throws IOException { - emailTemplateId = objectInput.readLong(); - fileEntryId = objectInput.readLong(); - } - - @Override - public void writeExternal(ObjectOutput objectOutput) - throws IOException { - objectOutput.writeLong(emailTemplateId); - objectOutput.writeLong(fileEntryId); - } - - public long emailTemplateId; - public long fileEntryId; -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentImpl.java deleted file mode 100644 index 47a5a5a8..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.model.impl; - -/** - * The extended model implementation for the EmailTemplateAttachment service. Represents a row in the "portos_Mail_EmailTemplateAttachment" database table, with each column mapped to a property of this class. - * - *

- * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment} interface. - *

- * - * @author - */ -public class EmailTemplateAttachmentImpl extends EmailTemplateAttachmentBaseImpl { - /* - * NOTE FOR DEVELOPERS: - * - * Never reference this class directly. All methods that expect a email template attachment model instance should use the {@link it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment} interface instead. - */ - public EmailTemplateAttachmentImpl() { - } -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentModelImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentModelImpl.java deleted file mode 100644 index 771a7473..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/model/impl/EmailTemplateAttachmentModelImpl.java +++ /dev/null @@ -1,318 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.model.impl; - -import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.ProxyUtil; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.impl.BaseModelImpl; - -import it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment; -import it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachmentModel; -import it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK; - -import java.io.Serializable; - -import java.sql.Types; - -import java.util.HashMap; -import java.util.Map; - -/** - * The base model implementation for the EmailTemplateAttachment service. Represents a row in the "portos_Mail_EmailTemplateAttachment" database table, with each column mapped to a property of this class. - * - *

- * This implementation and its corresponding interface {@link it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachmentModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link EmailTemplateAttachmentImpl}. - *

- * - * @author - * @see EmailTemplateAttachmentImpl - * @see it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment - * @see it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachmentModel - * @generated - */ -public class EmailTemplateAttachmentModelImpl extends BaseModelImpl - implements EmailTemplateAttachmentModel { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. All methods that expect a email template attachment model instance should use the {@link it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment} interface instead. - */ - public static final String TABLE_NAME = "portos_Mail_EmailTemplateAttachment"; - public static final Object[][] TABLE_COLUMNS = { - { "emailTemplateId", Types.BIGINT }, - { "fileEntryId", Types.BIGINT } - }; - public static final String TABLE_SQL_CREATE = "create table portos_Mail_EmailTemplateAttachment (emailTemplateId LONG not null,fileEntryId LONG not null,primary key (emailTemplateId, fileEntryId))"; - public static final String TABLE_SQL_DROP = "drop table portos_Mail_EmailTemplateAttachment"; - public static final String ORDER_BY_JPQL = " ORDER BY emailTemplateAttachment.id.emailTemplateId ASC, emailTemplateAttachment.id.fileEntryId ASC"; - public static final String ORDER_BY_SQL = " ORDER BY portos_Mail_EmailTemplateAttachment.emailTemplateId ASC, portos_Mail_EmailTemplateAttachment.fileEntryId ASC"; - public static final String DATA_SOURCE = "liferayDataSource"; - public static final String SESSION_FACTORY = "liferaySessionFactory"; - public static final String TX_MANAGER = "liferayTransactionManager"; - public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.entity.cache.enabled.it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment"), - true); - public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.finder.cache.enabled.it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment"), - true); - public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( - "value.object.column.bitmask.enabled.it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment"), - true); - public static long EMAILTEMPLATEID_COLUMN_BITMASK = 1L; - public static long FILEENTRYID_COLUMN_BITMASK = 2L; - public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get( - "lock.expiration.time.it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment")); - - public EmailTemplateAttachmentModelImpl() { - } - - @Override - public EmailTemplateAttachmentPK getPrimaryKey() { - return new EmailTemplateAttachmentPK(_emailTemplateId, _fileEntryId); - } - - @Override - public void setPrimaryKey(EmailTemplateAttachmentPK primaryKey) { - setEmailTemplateId(primaryKey.emailTemplateId); - setFileEntryId(primaryKey.fileEntryId); - } - - @Override - public Serializable getPrimaryKeyObj() { - return new EmailTemplateAttachmentPK(_emailTemplateId, _fileEntryId); - } - - @Override - public void setPrimaryKeyObj(Serializable primaryKeyObj) { - setPrimaryKey((EmailTemplateAttachmentPK)primaryKeyObj); - } - - @Override - public Class getModelClass() { - return EmailTemplateAttachment.class; - } - - @Override - public String getModelClassName() { - return EmailTemplateAttachment.class.getName(); - } - - @Override - public Map getModelAttributes() { - Map attributes = new HashMap(); - - attributes.put("emailTemplateId", getEmailTemplateId()); - attributes.put("fileEntryId", getFileEntryId()); - - return attributes; - } - - @Override - public void setModelAttributes(Map attributes) { - Long emailTemplateId = (Long)attributes.get("emailTemplateId"); - - if (emailTemplateId != null) { - setEmailTemplateId(emailTemplateId); - } - - Long fileEntryId = (Long)attributes.get("fileEntryId"); - - if (fileEntryId != null) { - setFileEntryId(fileEntryId); - } - } - - @Override - public long getEmailTemplateId() { - return _emailTemplateId; - } - - @Override - public void setEmailTemplateId(long emailTemplateId) { - _columnBitmask |= EMAILTEMPLATEID_COLUMN_BITMASK; - - if (!_setOriginalEmailTemplateId) { - _setOriginalEmailTemplateId = true; - - _originalEmailTemplateId = _emailTemplateId; - } - - _emailTemplateId = emailTemplateId; - } - - public long getOriginalEmailTemplateId() { - return _originalEmailTemplateId; - } - - @Override - public long getFileEntryId() { - return _fileEntryId; - } - - @Override - public void setFileEntryId(long fileEntryId) { - _columnBitmask |= FILEENTRYID_COLUMN_BITMASK; - - if (!_setOriginalFileEntryId) { - _setOriginalFileEntryId = true; - - _originalFileEntryId = _fileEntryId; - } - - _fileEntryId = fileEntryId; - } - - public long getOriginalFileEntryId() { - return _originalFileEntryId; - } - - public long getColumnBitmask() { - return _columnBitmask; - } - - @Override - public EmailTemplateAttachment toEscapedModel() { - if (_escapedModel == null) { - _escapedModel = (EmailTemplateAttachment)ProxyUtil.newProxyInstance(_classLoader, - _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); - } - - return _escapedModel; - } - - @Override - public Object clone() { - EmailTemplateAttachmentImpl emailTemplateAttachmentImpl = new EmailTemplateAttachmentImpl(); - - emailTemplateAttachmentImpl.setEmailTemplateId(getEmailTemplateId()); - emailTemplateAttachmentImpl.setFileEntryId(getFileEntryId()); - - emailTemplateAttachmentImpl.resetOriginalValues(); - - return emailTemplateAttachmentImpl; - } - - @Override - public int compareTo(EmailTemplateAttachment emailTemplateAttachment) { - EmailTemplateAttachmentPK primaryKey = emailTemplateAttachment.getPrimaryKey(); - - return getPrimaryKey().compareTo(primaryKey); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof EmailTemplateAttachment)) { - return false; - } - - EmailTemplateAttachment emailTemplateAttachment = (EmailTemplateAttachment)obj; - - EmailTemplateAttachmentPK primaryKey = emailTemplateAttachment.getPrimaryKey(); - - if (getPrimaryKey().equals(primaryKey)) { - return true; - } - else { - return false; - } - } - - @Override - public int hashCode() { - return getPrimaryKey().hashCode(); - } - - @Override - public void resetOriginalValues() { - EmailTemplateAttachmentModelImpl emailTemplateAttachmentModelImpl = this; - - emailTemplateAttachmentModelImpl._originalEmailTemplateId = emailTemplateAttachmentModelImpl._emailTemplateId; - - emailTemplateAttachmentModelImpl._setOriginalEmailTemplateId = false; - - emailTemplateAttachmentModelImpl._originalFileEntryId = emailTemplateAttachmentModelImpl._fileEntryId; - - emailTemplateAttachmentModelImpl._setOriginalFileEntryId = false; - - emailTemplateAttachmentModelImpl._columnBitmask = 0; - } - - @Override - public CacheModel toCacheModel() { - EmailTemplateAttachmentCacheModel emailTemplateAttachmentCacheModel = new EmailTemplateAttachmentCacheModel(); - - emailTemplateAttachmentCacheModel.emailTemplateId = getEmailTemplateId(); - - emailTemplateAttachmentCacheModel.fileEntryId = getFileEntryId(); - - return emailTemplateAttachmentCacheModel; - } - - @Override - public String toString() { - StringBundler sb = new StringBundler(5); - - sb.append("{emailTemplateId="); - sb.append(getEmailTemplateId()); - sb.append(", fileEntryId="); - sb.append(getFileEntryId()); - sb.append("}"); - - return sb.toString(); - } - - @Override - public String toXmlString() { - StringBundler sb = new StringBundler(10); - - sb.append(""); - sb.append( - "it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment"); - sb.append(""); - - sb.append( - "emailTemplateId"); - sb.append( - "fileEntryId"); - - sb.append(""); - - return sb.toString(); - } - - private static ClassLoader _classLoader = EmailTemplateAttachment.class.getClassLoader(); - private static Class[] _escapedModelInterfaces = new Class[] { - EmailTemplateAttachment.class - }; - private long _emailTemplateId; - private long _originalEmailTemplateId; - private boolean _setOriginalEmailTemplateId; - private long _fileEntryId; - private long _originalFileEntryId; - private boolean _setOriginalFileEntryId; - private long _columnBitmask; - private EmailTemplateAttachment _escapedModel; -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/base/EmailTemplateAttachmentLocalServiceBaseImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/base/EmailTemplateAttachmentLocalServiceBaseImpl.java deleted file mode 100644 index 26fdc98f..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/base/EmailTemplateAttachmentLocalServiceBaseImpl.java +++ /dev/null @@ -1,797 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.service.base; - -import com.liferay.portal.kernel.bean.BeanReference; -import com.liferay.portal.kernel.bean.IdentifiableBean; -import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; -import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; -import com.liferay.portal.kernel.dao.orm.DynamicQuery; -import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; -import com.liferay.portal.kernel.dao.orm.Projection; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.search.Indexable; -import com.liferay.portal.kernel.search.IndexableType; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.model.PersistedModel; -import com.liferay.portal.service.BaseLocalServiceImpl; -import com.liferay.portal.service.PersistedModelLocalServiceRegistryUtil; -import com.liferay.portal.service.persistence.CompanyPersistence; -import com.liferay.portal.service.persistence.UserPersistence; - -import it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment; -import it.tref.liferay.portos.mailmanager.service.EmailTemplateAttachmentLocalService; -import it.tref.liferay.portos.mailmanager.service.persistence.EmailAttachmentPersistence; -import it.tref.liferay.portos.mailmanager.service.persistence.EmailPersistence; -import it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK; -import it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPersistence; -import it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplatePersistence; - -import java.io.Serializable; - -import java.util.List; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the email template attachment local service. - * - *

- * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link it.tref.liferay.portos.mailmanager.service.impl.EmailTemplateAttachmentLocalServiceImpl}. - *

- * - * @author - * @see it.tref.liferay.portos.mailmanager.service.impl.EmailTemplateAttachmentLocalServiceImpl - * @see it.tref.liferay.portos.mailmanager.service.EmailTemplateAttachmentLocalServiceUtil - * @generated - */ -public abstract class EmailTemplateAttachmentLocalServiceBaseImpl - extends BaseLocalServiceImpl implements EmailTemplateAttachmentLocalService, - IdentifiableBean { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link it.tref.liferay.portos.mailmanager.service.EmailTemplateAttachmentLocalServiceUtil} to access the email template attachment local service. - */ - - /** - * Adds the email template attachment to the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachment the email template attachment - * @return the email template attachment that was added - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public EmailTemplateAttachment addEmailTemplateAttachment( - EmailTemplateAttachment emailTemplateAttachment) - throws SystemException { - emailTemplateAttachment.setNew(true); - - return emailTemplateAttachmentPersistence.update(emailTemplateAttachment); - } - - /** - * Creates a new email template attachment with the primary key. Does not add the email template attachment to the database. - * - * @param emailTemplateAttachmentPK the primary key for the new email template attachment - * @return the new email template attachment - */ - @Override - public EmailTemplateAttachment createEmailTemplateAttachment( - EmailTemplateAttachmentPK emailTemplateAttachmentPK) { - return emailTemplateAttachmentPersistence.create(emailTemplateAttachmentPK); - } - - /** - * Deletes the email template attachment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment that was removed - * @throws PortalException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public EmailTemplateAttachment deleteEmailTemplateAttachment( - EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws PortalException, SystemException { - return emailTemplateAttachmentPersistence.remove(emailTemplateAttachmentPK); - } - - /** - * Deletes the email template attachment from the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachment the email template attachment - * @return the email template attachment that was removed - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.DELETE) - @Override - public EmailTemplateAttachment deleteEmailTemplateAttachment( - EmailTemplateAttachment emailTemplateAttachment) - throws SystemException { - return emailTemplateAttachmentPersistence.remove(emailTemplateAttachment); - } - - @Override - public DynamicQuery dynamicQuery() { - Class clazz = getClass(); - - return DynamicQueryFactoryUtil.forClass(EmailTemplateAttachment.class, - clazz.getClassLoader()); - } - - /** - * Performs a dynamic query on the database and returns the matching rows. - * - * @param dynamicQuery the dynamic query - * @return the matching rows - * @throws SystemException if a system exception occurred - */ - @Override - @SuppressWarnings("rawtypes") - public List dynamicQuery(DynamicQuery dynamicQuery) - throws SystemException { - return emailTemplateAttachmentPersistence.findWithDynamicQuery(dynamicQuery); - } - - /** - * 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 {@link com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 dynamicQuery the dynamic query - * @param start the lower bound of the range of model instances - * @param end the upper bound of the range of model instances (not inclusive) - * @return the range of matching rows - * @throws SystemException if a system exception occurred - */ - @Override - @SuppressWarnings("rawtypes") - public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end) - throws SystemException { - return emailTemplateAttachmentPersistence.findWithDynamicQuery(dynamicQuery, - start, end); - } - - /** - * 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 {@link com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 dynamicQuery the dynamic query - * @param start the lower bound of the range of model instances - * @param end the upper bound of the range of model instances (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching rows - * @throws SystemException if a system exception occurred - */ - @Override - @SuppressWarnings("rawtypes") - public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - return emailTemplateAttachmentPersistence.findWithDynamicQuery(dynamicQuery, - start, end, orderByComparator); - } - - /** - * Returns the number of rows that match the dynamic query. - * - * @param dynamicQuery the dynamic query - * @return the number of rows that match the dynamic query - * @throws SystemException if a system exception occurred - */ - @Override - public long dynamicQueryCount(DynamicQuery dynamicQuery) - throws SystemException { - return emailTemplateAttachmentPersistence.countWithDynamicQuery(dynamicQuery); - } - - /** - * Returns the number of rows that match the dynamic query. - * - * @param dynamicQuery the dynamic query - * @param projection the projection to apply to the query - * @return the number of rows that match the dynamic query - * @throws SystemException if a system exception occurred - */ - @Override - public long dynamicQueryCount(DynamicQuery dynamicQuery, - Projection projection) throws SystemException { - return emailTemplateAttachmentPersistence.countWithDynamicQuery(dynamicQuery, - projection); - } - - @Override - public EmailTemplateAttachment fetchEmailTemplateAttachment( - EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws SystemException { - return emailTemplateAttachmentPersistence.fetchByPrimaryKey(emailTemplateAttachmentPK); - } - - /** - * Returns the email template attachment with the primary key. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment - * @throws PortalException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment getEmailTemplateAttachment( - EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws PortalException, SystemException { - return emailTemplateAttachmentPersistence.findByPrimaryKey(emailTemplateAttachmentPK); - } - - @Override - public PersistedModel getPersistedModel(Serializable primaryKeyObj) - throws PortalException, SystemException { - return emailTemplateAttachmentPersistence.findByPrimaryKey(primaryKeyObj); - } - - /** - * Returns a range of all the email template attachments. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @return the range of email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public List getEmailTemplateAttachments( - int start, int end) throws SystemException { - return emailTemplateAttachmentPersistence.findAll(start, end); - } - - /** - * Returns the number of email template attachments. - * - * @return the number of email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public int getEmailTemplateAttachmentsCount() throws SystemException { - return emailTemplateAttachmentPersistence.countAll(); - } - - /** - * Updates the email template attachment in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachment the email template attachment - * @return the email template attachment that was updated - * @throws SystemException if a system exception occurred - */ - @Indexable(type = IndexableType.REINDEX) - @Override - public EmailTemplateAttachment updateEmailTemplateAttachment( - EmailTemplateAttachment emailTemplateAttachment) - throws SystemException { - return emailTemplateAttachmentPersistence.update(emailTemplateAttachment); - } - - /** - * Returns the email local service. - * - * @return the email local service - */ - public it.tref.liferay.portos.mailmanager.service.EmailLocalService getEmailLocalService() { - return emailLocalService; - } - - /** - * Sets the email local service. - * - * @param emailLocalService the email local service - */ - public void setEmailLocalService( - it.tref.liferay.portos.mailmanager.service.EmailLocalService emailLocalService) { - this.emailLocalService = emailLocalService; - } - - /** - * Returns the email remote service. - * - * @return the email remote service - */ - public it.tref.liferay.portos.mailmanager.service.EmailService getEmailService() { - return emailService; - } - - /** - * Sets the email remote service. - * - * @param emailService the email remote service - */ - public void setEmailService( - it.tref.liferay.portos.mailmanager.service.EmailService emailService) { - this.emailService = emailService; - } - - /** - * Returns the email persistence. - * - * @return the email persistence - */ - public EmailPersistence getEmailPersistence() { - return emailPersistence; - } - - /** - * Sets the email persistence. - * - * @param emailPersistence the email persistence - */ - public void setEmailPersistence(EmailPersistence emailPersistence) { - this.emailPersistence = emailPersistence; - } - - /** - * Returns the email attachment local service. - * - * @return the email attachment local service - */ - public it.tref.liferay.portos.mailmanager.service.EmailAttachmentLocalService getEmailAttachmentLocalService() { - return emailAttachmentLocalService; - } - - /** - * Sets the email attachment local service. - * - * @param emailAttachmentLocalService the email attachment local service - */ - public void setEmailAttachmentLocalService( - it.tref.liferay.portos.mailmanager.service.EmailAttachmentLocalService emailAttachmentLocalService) { - this.emailAttachmentLocalService = emailAttachmentLocalService; - } - - /** - * Returns the email attachment persistence. - * - * @return the email attachment persistence - */ - public EmailAttachmentPersistence getEmailAttachmentPersistence() { - return emailAttachmentPersistence; - } - - /** - * Sets the email attachment persistence. - * - * @param emailAttachmentPersistence the email attachment persistence - */ - public void setEmailAttachmentPersistence( - EmailAttachmentPersistence emailAttachmentPersistence) { - this.emailAttachmentPersistence = emailAttachmentPersistence; - } - - /** - * Returns the email template local service. - * - * @return the email template local service - */ - public it.tref.liferay.portos.mailmanager.service.EmailTemplateLocalService getEmailTemplateLocalService() { - return emailTemplateLocalService; - } - - /** - * Sets the email template local service. - * - * @param emailTemplateLocalService the email template local service - */ - public void setEmailTemplateLocalService( - it.tref.liferay.portos.mailmanager.service.EmailTemplateLocalService emailTemplateLocalService) { - this.emailTemplateLocalService = emailTemplateLocalService; - } - - /** - * Returns the email template remote service. - * - * @return the email template remote service - */ - public it.tref.liferay.portos.mailmanager.service.EmailTemplateService getEmailTemplateService() { - return emailTemplateService; - } - - /** - * Sets the email template remote service. - * - * @param emailTemplateService the email template remote service - */ - public void setEmailTemplateService( - it.tref.liferay.portos.mailmanager.service.EmailTemplateService emailTemplateService) { - this.emailTemplateService = emailTemplateService; - } - - /** - * Returns the email template persistence. - * - * @return the email template persistence - */ - public EmailTemplatePersistence getEmailTemplatePersistence() { - return emailTemplatePersistence; - } - - /** - * Sets the email template persistence. - * - * @param emailTemplatePersistence the email template persistence - */ - public void setEmailTemplatePersistence( - EmailTemplatePersistence emailTemplatePersistence) { - this.emailTemplatePersistence = emailTemplatePersistence; - } - - /** - * Returns the email template attachment local service. - * - * @return the email template attachment local service - */ - public it.tref.liferay.portos.mailmanager.service.EmailTemplateAttachmentLocalService getEmailTemplateAttachmentLocalService() { - return emailTemplateAttachmentLocalService; - } - - /** - * Sets the email template attachment local service. - * - * @param emailTemplateAttachmentLocalService the email template attachment local service - */ - public void setEmailTemplateAttachmentLocalService( - it.tref.liferay.portos.mailmanager.service.EmailTemplateAttachmentLocalService emailTemplateAttachmentLocalService) { - this.emailTemplateAttachmentLocalService = emailTemplateAttachmentLocalService; - } - - /** - * Returns the email template attachment persistence. - * - * @return the email template attachment persistence - */ - public EmailTemplateAttachmentPersistence getEmailTemplateAttachmentPersistence() { - return emailTemplateAttachmentPersistence; - } - - /** - * Sets the email template attachment persistence. - * - * @param emailTemplateAttachmentPersistence the email template attachment persistence - */ - public void setEmailTemplateAttachmentPersistence( - EmailTemplateAttachmentPersistence emailTemplateAttachmentPersistence) { - this.emailTemplateAttachmentPersistence = emailTemplateAttachmentPersistence; - } - - /** - * Returns the counter local service. - * - * @return the counter local service - */ - public com.liferay.counter.service.CounterLocalService getCounterLocalService() { - return counterLocalService; - } - - /** - * Sets the counter local service. - * - * @param counterLocalService the counter local service - */ - public void setCounterLocalService( - com.liferay.counter.service.CounterLocalService counterLocalService) { - this.counterLocalService = counterLocalService; - } - - /** - * Returns the company local service. - * - * @return the company local service - */ - public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() { - return companyLocalService; - } - - /** - * Sets the company local service. - * - * @param companyLocalService the company local service - */ - public void setCompanyLocalService( - com.liferay.portal.service.CompanyLocalService companyLocalService) { - this.companyLocalService = companyLocalService; - } - - /** - * Returns the company remote service. - * - * @return the company remote service - */ - public com.liferay.portal.service.CompanyService getCompanyService() { - return companyService; - } - - /** - * Sets the company remote service. - * - * @param companyService the company remote service - */ - public void setCompanyService( - com.liferay.portal.service.CompanyService companyService) { - this.companyService = companyService; - } - - /** - * Returns the company persistence. - * - * @return the company persistence - */ - public CompanyPersistence getCompanyPersistence() { - return companyPersistence; - } - - /** - * Sets the company persistence. - * - * @param companyPersistence the company persistence - */ - public void setCompanyPersistence(CompanyPersistence companyPersistence) { - this.companyPersistence = companyPersistence; - } - - /** - * Returns the resource local service. - * - * @return the resource local service - */ - public com.liferay.portal.service.ResourceLocalService getResourceLocalService() { - return resourceLocalService; - } - - /** - * Sets the resource local service. - * - * @param resourceLocalService the resource local service - */ - public void setResourceLocalService( - com.liferay.portal.service.ResourceLocalService resourceLocalService) { - this.resourceLocalService = resourceLocalService; - } - - /** - * Returns the user local service. - * - * @return the user local service - */ - public com.liferay.portal.service.UserLocalService getUserLocalService() { - return userLocalService; - } - - /** - * Sets the user local service. - * - * @param userLocalService the user local service - */ - public void setUserLocalService( - com.liferay.portal.service.UserLocalService userLocalService) { - this.userLocalService = userLocalService; - } - - /** - * Returns the user remote service. - * - * @return the user remote service - */ - public com.liferay.portal.service.UserService getUserService() { - return userService; - } - - /** - * Sets the user remote service. - * - * @param userService the user remote service - */ - public void setUserService( - com.liferay.portal.service.UserService userService) { - this.userService = userService; - } - - /** - * Returns the user persistence. - * - * @return the user persistence - */ - public UserPersistence getUserPersistence() { - return userPersistence; - } - - /** - * Sets the user persistence. - * - * @param userPersistence the user persistence - */ - public void setUserPersistence(UserPersistence userPersistence) { - this.userPersistence = userPersistence; - } - - /** - * Returns the d l app local service. - * - * @return the d l app local service - */ - public com.liferay.portlet.documentlibrary.service.DLAppLocalService getDLAppLocalService() { - return dlAppLocalService; - } - - /** - * Sets the d l app local service. - * - * @param dlAppLocalService the d l app local service - */ - public void setDLAppLocalService( - com.liferay.portlet.documentlibrary.service.DLAppLocalService dlAppLocalService) { - this.dlAppLocalService = dlAppLocalService; - } - - /** - * Returns the d l app remote service. - * - * @return the d l app remote service - */ - public com.liferay.portlet.documentlibrary.service.DLAppService getDLAppService() { - return dlAppService; - } - - /** - * Sets the d l app remote service. - * - * @param dlAppService the d l app remote service - */ - public void setDLAppService( - com.liferay.portlet.documentlibrary.service.DLAppService dlAppService) { - this.dlAppService = dlAppService; - } - - public void afterPropertiesSet() { - Class clazz = getClass(); - - _classLoader = clazz.getClassLoader(); - - PersistedModelLocalServiceRegistryUtil.register("it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment", - emailTemplateAttachmentLocalService); - } - - public void destroy() { - PersistedModelLocalServiceRegistryUtil.unregister( - "it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment"); - } - - /** - * Returns the Spring bean ID for this bean. - * - * @return the Spring bean ID for this bean - */ - @Override - public String getBeanIdentifier() { - return _beanIdentifier; - } - - /** - * Sets the Spring bean ID for this bean. - * - * @param beanIdentifier the Spring bean ID for this bean - */ - @Override - public void setBeanIdentifier(String beanIdentifier) { - _beanIdentifier = beanIdentifier; - } - - @Override - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - Thread currentThread = Thread.currentThread(); - - ClassLoader contextClassLoader = currentThread.getContextClassLoader(); - - if (contextClassLoader != _classLoader) { - currentThread.setContextClassLoader(_classLoader); - } - - try { - return _clpInvoker.invokeMethod(name, parameterTypes, arguments); - } - finally { - if (contextClassLoader != _classLoader) { - currentThread.setContextClassLoader(contextClassLoader); - } - } - } - - protected Class getModelClass() { - return EmailTemplateAttachment.class; - } - - protected String getModelClassName() { - return EmailTemplateAttachment.class.getName(); - } - - /** - * Performs an SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) throws SystemException { - try { - DataSource dataSource = emailTemplateAttachmentPersistence.getDataSource(); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql, new int[0]); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = it.tref.liferay.portos.mailmanager.service.EmailLocalService.class) - protected it.tref.liferay.portos.mailmanager.service.EmailLocalService emailLocalService; - @BeanReference(type = it.tref.liferay.portos.mailmanager.service.EmailService.class) - protected it.tref.liferay.portos.mailmanager.service.EmailService emailService; - @BeanReference(type = EmailPersistence.class) - protected EmailPersistence emailPersistence; - @BeanReference(type = it.tref.liferay.portos.mailmanager.service.EmailAttachmentLocalService.class) - protected it.tref.liferay.portos.mailmanager.service.EmailAttachmentLocalService emailAttachmentLocalService; - @BeanReference(type = EmailAttachmentPersistence.class) - protected EmailAttachmentPersistence emailAttachmentPersistence; - @BeanReference(type = it.tref.liferay.portos.mailmanager.service.EmailTemplateLocalService.class) - protected it.tref.liferay.portos.mailmanager.service.EmailTemplateLocalService emailTemplateLocalService; - @BeanReference(type = it.tref.liferay.portos.mailmanager.service.EmailTemplateService.class) - protected it.tref.liferay.portos.mailmanager.service.EmailTemplateService emailTemplateService; - @BeanReference(type = EmailTemplatePersistence.class) - protected EmailTemplatePersistence emailTemplatePersistence; - @BeanReference(type = it.tref.liferay.portos.mailmanager.service.EmailTemplateAttachmentLocalService.class) - protected it.tref.liferay.portos.mailmanager.service.EmailTemplateAttachmentLocalService emailTemplateAttachmentLocalService; - @BeanReference(type = EmailTemplateAttachmentPersistence.class) - protected EmailTemplateAttachmentPersistence emailTemplateAttachmentPersistence; - @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) - protected com.liferay.counter.service.CounterLocalService counterLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class) - protected com.liferay.portal.service.CompanyLocalService companyLocalService; - @BeanReference(type = com.liferay.portal.service.CompanyService.class) - protected com.liferay.portal.service.CompanyService companyService; - @BeanReference(type = CompanyPersistence.class) - protected CompanyPersistence companyPersistence; - @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) - protected com.liferay.portal.service.ResourceLocalService resourceLocalService; - @BeanReference(type = com.liferay.portal.service.UserLocalService.class) - protected com.liferay.portal.service.UserLocalService userLocalService; - @BeanReference(type = com.liferay.portal.service.UserService.class) - protected com.liferay.portal.service.UserService userService; - @BeanReference(type = UserPersistence.class) - protected UserPersistence userPersistence; - @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLAppLocalService.class) - protected com.liferay.portlet.documentlibrary.service.DLAppLocalService dlAppLocalService; - @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLAppService.class) - protected com.liferay.portlet.documentlibrary.service.DLAppService dlAppService; - private String _beanIdentifier; - private ClassLoader _classLoader; - private EmailTemplateAttachmentLocalServiceClpInvoker _clpInvoker = new EmailTemplateAttachmentLocalServiceClpInvoker(); -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/base/EmailTemplateAttachmentLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/base/EmailTemplateAttachmentLocalServiceClpInvoker.java deleted file mode 100644 index 63c9b89d..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/base/EmailTemplateAttachmentLocalServiceClpInvoker.java +++ /dev/null @@ -1,266 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.service.base; - -import it.tref.liferay.portos.mailmanager.service.EmailTemplateAttachmentLocalServiceUtil; - -import java.util.Arrays; - -/** - * @author - * @generated - */ -public class EmailTemplateAttachmentLocalServiceClpInvoker { - public EmailTemplateAttachmentLocalServiceClpInvoker() { - _methodName0 = "addEmailTemplateAttachment"; - - _methodParameterTypes0 = new String[] { - "it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment" - }; - - _methodName1 = "createEmailTemplateAttachment"; - - _methodParameterTypes1 = new String[] { - "it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK" - }; - - _methodName2 = "deleteEmailTemplateAttachment"; - - _methodParameterTypes2 = new String[] { - "it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK" - }; - - _methodName3 = "deleteEmailTemplateAttachment"; - - _methodParameterTypes3 = new String[] { - "it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment" - }; - - _methodName4 = "dynamicQuery"; - - _methodParameterTypes4 = new String[] { }; - - _methodName5 = "dynamicQuery"; - - _methodParameterTypes5 = new String[] { - "com.liferay.portal.kernel.dao.orm.DynamicQuery" - }; - - _methodName6 = "dynamicQuery"; - - _methodParameterTypes6 = new String[] { - "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int" - }; - - _methodName7 = "dynamicQuery"; - - _methodParameterTypes7 = new String[] { - "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int", - "com.liferay.portal.kernel.util.OrderByComparator" - }; - - _methodName8 = "dynamicQueryCount"; - - _methodParameterTypes8 = new String[] { - "com.liferay.portal.kernel.dao.orm.DynamicQuery" - }; - - _methodName9 = "dynamicQueryCount"; - - _methodParameterTypes9 = new String[] { - "com.liferay.portal.kernel.dao.orm.DynamicQuery", - "com.liferay.portal.kernel.dao.orm.Projection" - }; - - _methodName10 = "fetchEmailTemplateAttachment"; - - _methodParameterTypes10 = new String[] { - "it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK" - }; - - _methodName11 = "getEmailTemplateAttachment"; - - _methodParameterTypes11 = new String[] { - "it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK" - }; - - _methodName12 = "getPersistedModel"; - - _methodParameterTypes12 = new String[] { "java.io.Serializable" }; - - _methodName13 = "getEmailTemplateAttachments"; - - _methodParameterTypes13 = new String[] { "int", "int" }; - - _methodName14 = "getEmailTemplateAttachmentsCount"; - - _methodParameterTypes14 = new String[] { }; - - _methodName15 = "updateEmailTemplateAttachment"; - - _methodParameterTypes15 = new String[] { - "it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment" - }; - - _methodName58 = "getBeanIdentifier"; - - _methodParameterTypes58 = new String[] { }; - - _methodName59 = "setBeanIdentifier"; - - _methodParameterTypes59 = new String[] { "java.lang.String" }; - } - - public Object invokeMethod(String name, String[] parameterTypes, - Object[] arguments) throws Throwable { - if (_methodName0.equals(name) && - Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.addEmailTemplateAttachment((it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment)arguments[0]); - } - - if (_methodName1.equals(name) && - Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.createEmailTemplateAttachment((it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK)arguments[0]); - } - - if (_methodName2.equals(name) && - Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.deleteEmailTemplateAttachment((it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK)arguments[0]); - } - - if (_methodName3.equals(name) && - Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.deleteEmailTemplateAttachment((it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment)arguments[0]); - } - - if (_methodName4.equals(name) && - Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.dynamicQuery(); - } - - if (_methodName5.equals(name) && - Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName6.equals(name) && - Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue()); - } - - if (_methodName7.equals(name) && - Arrays.deepEquals(_methodParameterTypes7, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); - } - - if (_methodName8.equals(name) && - Arrays.deepEquals(_methodParameterTypes8, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); - } - - if (_methodName9.equals(name) && - Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], - (com.liferay.portal.kernel.dao.orm.Projection)arguments[1]); - } - - if (_methodName10.equals(name) && - Arrays.deepEquals(_methodParameterTypes10, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.fetchEmailTemplateAttachment((it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK)arguments[0]); - } - - if (_methodName11.equals(name) && - Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.getEmailTemplateAttachment((it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplateAttachmentPK)arguments[0]); - } - - if (_methodName12.equals(name) && - Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); - } - - if (_methodName13.equals(name) && - Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.getEmailTemplateAttachments(((Integer)arguments[0]).intValue(), - ((Integer)arguments[1]).intValue()); - } - - if (_methodName14.equals(name) && - Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.getEmailTemplateAttachmentsCount(); - } - - if (_methodName15.equals(name) && - Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.updateEmailTemplateAttachment((it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment)arguments[0]); - } - - if (_methodName58.equals(name) && - Arrays.deepEquals(_methodParameterTypes58, parameterTypes)) { - return EmailTemplateAttachmentLocalServiceUtil.getBeanIdentifier(); - } - - if (_methodName59.equals(name) && - Arrays.deepEquals(_methodParameterTypes59, parameterTypes)) { - EmailTemplateAttachmentLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); - - return null; - } - - throw new UnsupportedOperationException(); - } - - private String _methodName0; - private String[] _methodParameterTypes0; - private String _methodName1; - private String[] _methodParameterTypes1; - private String _methodName2; - private String[] _methodParameterTypes2; - private String _methodName3; - private String[] _methodParameterTypes3; - private String _methodName4; - private String[] _methodParameterTypes4; - private String _methodName5; - private String[] _methodParameterTypes5; - private String _methodName6; - private String[] _methodParameterTypes6; - private String _methodName7; - private String[] _methodParameterTypes7; - private String _methodName8; - private String[] _methodParameterTypes8; - private String _methodName9; - private String[] _methodParameterTypes9; - private String _methodName10; - private String[] _methodParameterTypes10; - private String _methodName11; - private String[] _methodParameterTypes11; - private String _methodName12; - private String[] _methodParameterTypes12; - private String _methodName13; - private String[] _methodParameterTypes13; - private String _methodName14; - private String[] _methodParameterTypes14; - private String _methodName15; - private String[] _methodParameterTypes15; - private String _methodName58; - private String[] _methodParameterTypes58; - private String _methodName59; - private String[] _methodParameterTypes59; -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentPersistenceImpl.java deleted file mode 100644 index e4b7375a..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplateAttachmentPersistenceImpl.java +++ /dev/null @@ -1,1491 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package it.tref.liferay.portos.mailmanager.service.persistence; - -import com.liferay.portal.kernel.cache.CacheRegistryUtil; -import com.liferay.portal.kernel.dao.orm.EntityCacheUtil; -import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; -import com.liferay.portal.kernel.dao.orm.FinderPath; -import com.liferay.portal.kernel.dao.orm.Query; -import com.liferay.portal.kernel.dao.orm.QueryPos; -import com.liferay.portal.kernel.dao.orm.QueryUtil; -import com.liferay.portal.kernel.dao.orm.Session; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.portal.kernel.util.InstanceFactory; -import com.liferay.portal.kernel.util.OrderByComparator; -import com.liferay.portal.kernel.util.PropsKeys; -import com.liferay.portal.kernel.util.PropsUtil; -import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.UnmodifiableList; -import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.ModelListener; -import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; - -import it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException; -import it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment; -import it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentImpl; -import it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -/** - * The persistence implementation for the email template attachment service. - * - *

- * Caching information and settings can be found in portal.properties - *

- * - * @author - * @see EmailTemplateAttachmentPersistence - * @see EmailTemplateAttachmentUtil - * @generated - */ -public class EmailTemplateAttachmentPersistenceImpl extends BasePersistenceImpl - implements EmailTemplateAttachmentPersistence { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link EmailTemplateAttachmentUtil} to access the email template attachment persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. - */ - public static final String FINDER_CLASS_NAME_ENTITY = EmailTemplateAttachmentImpl.class.getName(); - public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + - ".List1"; - public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + - ".List2"; - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentModelImpl.FINDER_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentModelImpl.FINDER_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); - public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_EMAILTEMPLATEID = - new FinderPath(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentModelImpl.FINDER_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByEmailTemplateId", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_EMAILTEMPLATEID = - new FinderPath(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentModelImpl.FINDER_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByEmailTemplateId", - new String[] { Long.class.getName() }, - EmailTemplateAttachmentModelImpl.EMAILTEMPLATEID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_EMAILTEMPLATEID = new FinderPath(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, - "countByEmailTemplateId", new String[] { Long.class.getName() }); - - /** - * Returns all the email template attachments where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @return the matching email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByEmailTemplateId( - long emailTemplateId) throws SystemException { - return findByEmailTemplateId(emailTemplateId, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the email template attachments where emailTemplateId = ?. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 emailTemplateId the email template ID - * @param start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @return the range of matching email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByEmailTemplateId( - long emailTemplateId, int start, int end) throws SystemException { - return findByEmailTemplateId(emailTemplateId, start, end, null); - } - - /** - * Returns an ordered range of all the email template attachments where emailTemplateId = ?. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 emailTemplateId the email template ID - * @param start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public List findByEmailTemplateId( - long emailTemplateId, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - 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_EMAILTEMPLATEID; - finderArgs = new Object[] { emailTemplateId }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_EMAILTEMPLATEID; - finderArgs = new Object[] { - emailTemplateId, - - start, end, orderByComparator - }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if ((list != null) && !list.isEmpty()) { - for (EmailTemplateAttachment emailTemplateAttachment : list) { - if ((emailTemplateId != emailTemplateAttachment.getEmailTemplateId())) { - 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_EMAILTEMPLATEATTACHMENT_WHERE); - - query.append(_FINDER_COLUMN_EMAILTEMPLATEID_EMAILTEMPLATEID_2); - - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(EmailTemplateAttachmentModelImpl.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(emailTemplateId); - - if (!pagination) { - list = (List)QueryUtil.list(q, - getDialect(), start, end, false); - - Collections.sort(list); - - list = new 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 email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment findByEmailTemplateId_First( - long emailTemplateId, OrderByComparator orderByComparator) - throws NoSuchEmailTemplateAttachmentException, SystemException { - EmailTemplateAttachment emailTemplateAttachment = fetchByEmailTemplateId_First(emailTemplateId, - orderByComparator); - - if (emailTemplateAttachment != null) { - return emailTemplateAttachment; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("emailTemplateId="); - msg.append(emailTemplateId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchEmailTemplateAttachmentException(msg.toString()); - } - - /** - * Returns the first email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching email template attachment, or null if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment fetchByEmailTemplateId_First( - long emailTemplateId, OrderByComparator orderByComparator) - throws SystemException { - List list = findByEmailTemplateId(emailTemplateId, - 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the last email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment findByEmailTemplateId_Last( - long emailTemplateId, OrderByComparator orderByComparator) - throws NoSuchEmailTemplateAttachmentException, SystemException { - EmailTemplateAttachment emailTemplateAttachment = fetchByEmailTemplateId_Last(emailTemplateId, - orderByComparator); - - if (emailTemplateAttachment != null) { - return emailTemplateAttachment; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("emailTemplateId="); - msg.append(emailTemplateId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchEmailTemplateAttachmentException(msg.toString()); - } - - /** - * Returns the last email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching email template attachment, or null if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment fetchByEmailTemplateId_Last( - long emailTemplateId, OrderByComparator orderByComparator) - throws SystemException { - int count = countByEmailTemplateId(emailTemplateId); - - if (count == 0) { - return null; - } - - List list = findByEmailTemplateId(emailTemplateId, - count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Returns the email template attachments before and after the current email template attachment in the ordered set where emailTemplateId = ?. - * - * @param emailTemplateAttachmentPK the primary key of the current email template attachment - * @param emailTemplateId the email template ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the previous, current, and next email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment[] findByEmailTemplateId_PrevAndNext( - EmailTemplateAttachmentPK emailTemplateAttachmentPK, - long emailTemplateId, OrderByComparator orderByComparator) - throws NoSuchEmailTemplateAttachmentException, SystemException { - EmailTemplateAttachment emailTemplateAttachment = findByPrimaryKey(emailTemplateAttachmentPK); - - Session session = null; - - try { - session = openSession(); - - EmailTemplateAttachment[] array = new EmailTemplateAttachmentImpl[3]; - - array[0] = getByEmailTemplateId_PrevAndNext(session, - emailTemplateAttachment, emailTemplateId, - orderByComparator, true); - - array[1] = emailTemplateAttachment; - - array[2] = getByEmailTemplateId_PrevAndNext(session, - emailTemplateAttachment, emailTemplateId, - orderByComparator, false); - - return array; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - protected EmailTemplateAttachment getByEmailTemplateId_PrevAndNext( - Session session, EmailTemplateAttachment emailTemplateAttachment, - long emailTemplateId, 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_EMAILTEMPLATEATTACHMENT_WHERE); - - query.append(_FINDER_COLUMN_EMAILTEMPLATEID_EMAILTEMPLATEID_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(EmailTemplateAttachmentModelImpl.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(emailTemplateId); - - if (orderByComparator != null) { - Object[] values = orderByComparator.getOrderByConditionValues(emailTemplateAttachment); - - 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 email template attachments where emailTemplateId = ? from the database. - * - * @param emailTemplateId the email template ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeByEmailTemplateId(long emailTemplateId) - throws SystemException { - for (EmailTemplateAttachment emailTemplateAttachment : findByEmailTemplateId( - emailTemplateId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { - remove(emailTemplateAttachment); - } - } - - /** - * Returns the number of email template attachments where emailTemplateId = ?. - * - * @param emailTemplateId the email template ID - * @return the number of matching email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public int countByEmailTemplateId(long emailTemplateId) - throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_EMAILTEMPLATEID; - - Object[] finderArgs = new Object[] { emailTemplateId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_EMAILTEMPLATEATTACHMENT_WHERE); - - query.append(_FINDER_COLUMN_EMAILTEMPLATEID_EMAILTEMPLATEID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(emailTemplateId); - - 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_EMAILTEMPLATEID_EMAILTEMPLATEID_2 = - "emailTemplateAttachment.id.emailTemplateId = ?"; - public static final FinderPath FINDER_PATH_FETCH_BY_FILEENTRYID = new FinderPath(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentModelImpl.FINDER_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, FINDER_CLASS_NAME_ENTITY, - "fetchByFileEntryId", new String[] { Long.class.getName() }, - EmailTemplateAttachmentModelImpl.FILEENTRYID_COLUMN_BITMASK); - public static final FinderPath FINDER_PATH_COUNT_BY_FILEENTRYID = new FinderPath(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentModelImpl.FINDER_CACHE_ENABLED, Long.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByFileEntryId", - new String[] { Long.class.getName() }); - - /** - * Returns the email template attachment where fileEntryId = ? or throws a {@link it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException} if it could not be found. - * - * @param fileEntryId the file entry ID - * @return the matching email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment findByFileEntryId(long fileEntryId) - throws NoSuchEmailTemplateAttachmentException, SystemException { - EmailTemplateAttachment emailTemplateAttachment = fetchByFileEntryId(fileEntryId); - - if (emailTemplateAttachment == null) { - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("fileEntryId="); - msg.append(fileEntryId); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - if (_log.isWarnEnabled()) { - _log.warn(msg.toString()); - } - - throw new NoSuchEmailTemplateAttachmentException(msg.toString()); - } - - return emailTemplateAttachment; - } - - /** - * Returns the email template attachment where fileEntryId = ? or returns null if it could not be found. Uses the finder cache. - * - * @param fileEntryId the file entry ID - * @return the matching email template attachment, or null if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment fetchByFileEntryId(long fileEntryId) - throws SystemException { - return fetchByFileEntryId(fileEntryId, true); - } - - /** - * Returns the email template attachment where fileEntryId = ? or returns null if it could not be found, optionally using the finder cache. - * - * @param fileEntryId the file entry ID - * @param retrieveFromCache whether to use the finder cache - * @return the matching email template attachment, or null if a matching email template attachment could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment fetchByFileEntryId(long fileEntryId, - boolean retrieveFromCache) throws SystemException { - Object[] finderArgs = new Object[] { fileEntryId }; - - Object result = null; - - if (retrieveFromCache) { - result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_FILEENTRYID, - finderArgs, this); - } - - if (result instanceof EmailTemplateAttachment) { - EmailTemplateAttachment emailTemplateAttachment = (EmailTemplateAttachment)result; - - if ((fileEntryId != emailTemplateAttachment.getFileEntryId())) { - result = null; - } - } - - if (result == null) { - StringBundler query = new StringBundler(3); - - query.append(_SQL_SELECT_EMAILTEMPLATEATTACHMENT_WHERE); - - query.append(_FINDER_COLUMN_FILEENTRYID_FILEENTRYID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(fileEntryId); - - List list = q.list(); - - if (list.isEmpty()) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_FILEENTRYID, - finderArgs, list); - } - else { - if ((list.size() > 1) && _log.isWarnEnabled()) { - _log.warn( - "EmailTemplateAttachmentPersistenceImpl.fetchByFileEntryId(long, boolean) with parameters (" + - StringUtil.merge(finderArgs) + - ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); - } - - EmailTemplateAttachment emailTemplateAttachment = list.get(0); - - result = emailTemplateAttachment; - - cacheResult(emailTemplateAttachment); - - if ((emailTemplateAttachment.getFileEntryId() != fileEntryId)) { - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_FILEENTRYID, - finderArgs, emailTemplateAttachment); - } - } - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_FILEENTRYID, - finderArgs); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - if (result instanceof List) { - return null; - } - else { - return (EmailTemplateAttachment)result; - } - } - - /** - * Removes the email template attachment where fileEntryId = ? from the database. - * - * @param fileEntryId the file entry ID - * @return the email template attachment that was removed - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment removeByFileEntryId(long fileEntryId) - throws NoSuchEmailTemplateAttachmentException, SystemException { - EmailTemplateAttachment emailTemplateAttachment = findByFileEntryId(fileEntryId); - - return remove(emailTemplateAttachment); - } - - /** - * Returns the number of email template attachments where fileEntryId = ?. - * - * @param fileEntryId the file entry ID - * @return the number of matching email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public int countByFileEntryId(long fileEntryId) throws SystemException { - FinderPath finderPath = FINDER_PATH_COUNT_BY_FILEENTRYID; - - Object[] finderArgs = new Object[] { fileEntryId }; - - Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, - this); - - if (count == null) { - StringBundler query = new StringBundler(2); - - query.append(_SQL_COUNT_EMAILTEMPLATEATTACHMENT_WHERE); - - query.append(_FINDER_COLUMN_FILEENTRYID_FILEENTRYID_2); - - String sql = query.toString(); - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - QueryPos qPos = QueryPos.getInstance(q); - - qPos.add(fileEntryId); - - 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_FILEENTRYID_FILEENTRYID_2 = "emailTemplateAttachment.id.fileEntryId = ?"; - - public EmailTemplateAttachmentPersistenceImpl() { - setModelClass(EmailTemplateAttachment.class); - } - - /** - * Caches the email template attachment in the entity cache if it is enabled. - * - * @param emailTemplateAttachment the email template attachment - */ - @Override - public void cacheResult(EmailTemplateAttachment emailTemplateAttachment) { - EntityCacheUtil.putResult(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, - emailTemplateAttachment.getPrimaryKey(), emailTemplateAttachment); - - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_FILEENTRYID, - new Object[] { emailTemplateAttachment.getFileEntryId() }, - emailTemplateAttachment); - - emailTemplateAttachment.resetOriginalValues(); - } - - /** - * Caches the email template attachments in the entity cache if it is enabled. - * - * @param emailTemplateAttachments the email template attachments - */ - @Override - public void cacheResult( - List emailTemplateAttachments) { - for (EmailTemplateAttachment emailTemplateAttachment : emailTemplateAttachments) { - if (EntityCacheUtil.getResult( - EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, - emailTemplateAttachment.getPrimaryKey()) == null) { - cacheResult(emailTemplateAttachment); - } - else { - emailTemplateAttachment.resetOriginalValues(); - } - } - } - - /** - * Clears the cache for all email template attachments. - * - *

- * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

- */ - @Override - public void clearCache() { - if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { - CacheRegistryUtil.clear(EmailTemplateAttachmentImpl.class.getName()); - } - - EntityCacheUtil.clearCache(EmailTemplateAttachmentImpl.class.getName()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - /** - * Clears the cache for the email template attachment. - * - *

- * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. - *

- */ - @Override - public void clearCache(EmailTemplateAttachment emailTemplateAttachment) { - EntityCacheUtil.removeResult(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, - emailTemplateAttachment.getPrimaryKey()); - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - clearUniqueFindersCache(emailTemplateAttachment); - } - - @Override - public void clearCache( - List emailTemplateAttachments) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - - for (EmailTemplateAttachment emailTemplateAttachment : emailTemplateAttachments) { - EntityCacheUtil.removeResult(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, - emailTemplateAttachment.getPrimaryKey()); - - clearUniqueFindersCache(emailTemplateAttachment); - } - } - - protected void cacheUniqueFindersCache( - EmailTemplateAttachment emailTemplateAttachment) { - if (emailTemplateAttachment.isNew()) { - Object[] args = new Object[] { - emailTemplateAttachment.getFileEntryId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_FILEENTRYID, args, - Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_FILEENTRYID, args, - emailTemplateAttachment); - } - else { - EmailTemplateAttachmentModelImpl emailTemplateAttachmentModelImpl = (EmailTemplateAttachmentModelImpl)emailTemplateAttachment; - - if ((emailTemplateAttachmentModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_FILEENTRYID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - emailTemplateAttachment.getFileEntryId() - }; - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_FILEENTRYID, - args, Long.valueOf(1)); - FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_FILEENTRYID, - args, emailTemplateAttachment); - } - } - } - - protected void clearUniqueFindersCache( - EmailTemplateAttachment emailTemplateAttachment) { - EmailTemplateAttachmentModelImpl emailTemplateAttachmentModelImpl = (EmailTemplateAttachmentModelImpl)emailTemplateAttachment; - - Object[] args = new Object[] { emailTemplateAttachment.getFileEntryId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_FILEENTRYID, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_FILEENTRYID, args); - - if ((emailTemplateAttachmentModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_FILEENTRYID.getColumnBitmask()) != 0) { - args = new Object[] { - emailTemplateAttachmentModelImpl.getOriginalFileEntryId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_FILEENTRYID, args); - FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_FILEENTRYID, args); - } - } - - /** - * Creates a new email template attachment with the primary key. Does not add the email template attachment to the database. - * - * @param emailTemplateAttachmentPK the primary key for the new email template attachment - * @return the new email template attachment - */ - @Override - public EmailTemplateAttachment create( - EmailTemplateAttachmentPK emailTemplateAttachmentPK) { - EmailTemplateAttachment emailTemplateAttachment = new EmailTemplateAttachmentImpl(); - - emailTemplateAttachment.setNew(true); - emailTemplateAttachment.setPrimaryKey(emailTemplateAttachmentPK); - - return emailTemplateAttachment; - } - - /** - * Removes the email template attachment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment that was removed - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment remove( - EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws NoSuchEmailTemplateAttachmentException, SystemException { - return remove((Serializable)emailTemplateAttachmentPK); - } - - /** - * Removes the email template attachment with the primary key from the database. Also notifies the appropriate model listeners. - * - * @param primaryKey the primary key of the email template attachment - * @return the email template attachment that was removed - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment remove(Serializable primaryKey) - throws NoSuchEmailTemplateAttachmentException, SystemException { - Session session = null; - - try { - session = openSession(); - - EmailTemplateAttachment emailTemplateAttachment = (EmailTemplateAttachment)session.get(EmailTemplateAttachmentImpl.class, - primaryKey); - - if (emailTemplateAttachment == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchEmailTemplateAttachmentException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return remove(emailTemplateAttachment); - } - catch (NoSuchEmailTemplateAttachmentException nsee) { - throw nsee; - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - } - - @Override - protected EmailTemplateAttachment removeImpl( - EmailTemplateAttachment emailTemplateAttachment) - throws SystemException { - emailTemplateAttachment = toUnwrappedModel(emailTemplateAttachment); - - Session session = null; - - try { - session = openSession(); - - if (!session.contains(emailTemplateAttachment)) { - emailTemplateAttachment = (EmailTemplateAttachment)session.get(EmailTemplateAttachmentImpl.class, - emailTemplateAttachment.getPrimaryKeyObj()); - } - - if (emailTemplateAttachment != null) { - session.delete(emailTemplateAttachment); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - if (emailTemplateAttachment != null) { - clearCache(emailTemplateAttachment); - } - - return emailTemplateAttachment; - } - - @Override - public EmailTemplateAttachment updateImpl( - it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment emailTemplateAttachment) - throws SystemException { - emailTemplateAttachment = toUnwrappedModel(emailTemplateAttachment); - - boolean isNew = emailTemplateAttachment.isNew(); - - EmailTemplateAttachmentModelImpl emailTemplateAttachmentModelImpl = (EmailTemplateAttachmentModelImpl)emailTemplateAttachment; - - Session session = null; - - try { - session = openSession(); - - if (emailTemplateAttachment.isNew()) { - session.save(emailTemplateAttachment); - - emailTemplateAttachment.setNew(false); - } - else { - session.merge(emailTemplateAttachment); - } - } - catch (Exception e) { - throw processException(e); - } - finally { - closeSession(session); - } - - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - - if (isNew || !EmailTemplateAttachmentModelImpl.COLUMN_BITMASK_ENABLED) { - FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - else { - if ((emailTemplateAttachmentModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_EMAILTEMPLATEID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - emailTemplateAttachmentModelImpl.getOriginalEmailTemplateId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_EMAILTEMPLATEID, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_EMAILTEMPLATEID, - args); - - args = new Object[] { - emailTemplateAttachmentModelImpl.getEmailTemplateId() - }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_EMAILTEMPLATEID, - args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_EMAILTEMPLATEID, - args); - } - } - - EntityCacheUtil.putResult(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, - emailTemplateAttachment.getPrimaryKey(), emailTemplateAttachment); - - clearUniqueFindersCache(emailTemplateAttachment); - cacheUniqueFindersCache(emailTemplateAttachment); - - return emailTemplateAttachment; - } - - protected EmailTemplateAttachment toUnwrappedModel( - EmailTemplateAttachment emailTemplateAttachment) { - if (emailTemplateAttachment instanceof EmailTemplateAttachmentImpl) { - return emailTemplateAttachment; - } - - EmailTemplateAttachmentImpl emailTemplateAttachmentImpl = new EmailTemplateAttachmentImpl(); - - emailTemplateAttachmentImpl.setNew(emailTemplateAttachment.isNew()); - emailTemplateAttachmentImpl.setPrimaryKey(emailTemplateAttachment.getPrimaryKey()); - - emailTemplateAttachmentImpl.setEmailTemplateId(emailTemplateAttachment.getEmailTemplateId()); - emailTemplateAttachmentImpl.setFileEntryId(emailTemplateAttachment.getFileEntryId()); - - return emailTemplateAttachmentImpl; - } - - /** - * Returns the email template attachment with the primary key or throws a {@link com.liferay.portal.NoSuchModelException} if it could not be found. - * - * @param primaryKey the primary key of the email template attachment - * @return the email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment findByPrimaryKey(Serializable primaryKey) - throws NoSuchEmailTemplateAttachmentException, SystemException { - EmailTemplateAttachment emailTemplateAttachment = fetchByPrimaryKey(primaryKey); - - if (emailTemplateAttachment == null) { - if (_log.isWarnEnabled()) { - _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); - } - - throw new NoSuchEmailTemplateAttachmentException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + - primaryKey); - } - - return emailTemplateAttachment; - } - - /** - * Returns the email template attachment with the primary key or throws a {@link it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException} if it could not be found. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment - * @throws it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateAttachmentException if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment findByPrimaryKey( - EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws NoSuchEmailTemplateAttachmentException, SystemException { - return findByPrimaryKey((Serializable)emailTemplateAttachmentPK); - } - - /** - * Returns the email template attachment with the primary key or returns null if it could not be found. - * - * @param primaryKey the primary key of the email template attachment - * @return the email template attachment, or null if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment fetchByPrimaryKey(Serializable primaryKey) - throws SystemException { - EmailTemplateAttachment emailTemplateAttachment = (EmailTemplateAttachment)EntityCacheUtil.getResult(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, primaryKey); - - if (emailTemplateAttachment == _nullEmailTemplateAttachment) { - return null; - } - - if (emailTemplateAttachment == null) { - Session session = null; - - try { - session = openSession(); - - emailTemplateAttachment = (EmailTemplateAttachment)session.get(EmailTemplateAttachmentImpl.class, - primaryKey); - - if (emailTemplateAttachment != null) { - cacheResult(emailTemplateAttachment); - } - else { - EntityCacheUtil.putResult(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, primaryKey, - _nullEmailTemplateAttachment); - } - } - catch (Exception e) { - EntityCacheUtil.removeResult(EmailTemplateAttachmentModelImpl.ENTITY_CACHE_ENABLED, - EmailTemplateAttachmentImpl.class, primaryKey); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return emailTemplateAttachment; - } - - /** - * Returns the email template attachment with the primary key or returns null if it could not be found. - * - * @param emailTemplateAttachmentPK the primary key of the email template attachment - * @return the email template attachment, or null if a email template attachment with the primary key could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public EmailTemplateAttachment fetchByPrimaryKey( - EmailTemplateAttachmentPK emailTemplateAttachmentPK) - throws SystemException { - return fetchByPrimaryKey((Serializable)emailTemplateAttachmentPK); - } - - /** - * Returns all the email template attachments. - * - * @return the email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll() throws SystemException { - return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); - } - - /** - * Returns a range of all the email template attachments. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @return the range of email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end) - throws SystemException { - return findAll(start, end, null); - } - - /** - * Returns an ordered range of all the email template attachments. - * - *

- * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateAttachmentModelImpl}. 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 start the lower bound of the range of email template attachments - * @param end the upper bound of the range of email template attachments (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public List findAll(int start, int end, - OrderByComparator orderByComparator) throws SystemException { - 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_ALL; - finderArgs = FINDER_ARGS_EMPTY; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; - finderArgs = new Object[] { start, end, orderByComparator }; - } - - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); - - if (list == null) { - StringBundler query = null; - String sql = null; - - if (orderByComparator != null) { - query = new StringBundler(2 + - (orderByComparator.getOrderByFields().length * 3)); - - query.append(_SQL_SELECT_EMAILTEMPLATEATTACHMENT); - - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - - sql = query.toString(); - } - else { - sql = _SQL_SELECT_EMAILTEMPLATEATTACHMENT; - - if (pagination) { - sql = sql.concat(EmailTemplateAttachmentModelImpl.ORDER_BY_JPQL); - } - } - - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(sql); - - if (!pagination) { - list = (List)QueryUtil.list(q, - getDialect(), start, end, false); - - Collections.sort(list); - - list = new 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; - } - - /** - * Removes all the email template attachments from the database. - * - * @throws SystemException if a system exception occurred - */ - @Override - public void removeAll() throws SystemException { - for (EmailTemplateAttachment emailTemplateAttachment : findAll()) { - remove(emailTemplateAttachment); - } - } - - /** - * Returns the number of email template attachments. - * - * @return the number of email template attachments - * @throws SystemException if a system exception occurred - */ - @Override - public int countAll() throws SystemException { - Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL, - FINDER_ARGS_EMPTY, this); - - if (count == null) { - Session session = null; - - try { - session = openSession(); - - Query q = session.createQuery(_SQL_COUNT_EMAILTEMPLATEATTACHMENT); - - count = (Long)q.uniqueResult(); - - FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, - FINDER_ARGS_EMPTY, count); - } - catch (Exception e) { - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL, - FINDER_ARGS_EMPTY); - - throw processException(e); - } - finally { - closeSession(session); - } - } - - return count.intValue(); - } - - /** - * Initializes the email template attachment persistence. - */ - public void afterPropertiesSet() { - String[] listenerClassNames = StringUtil.split(GetterUtil.getString( - com.liferay.util.service.ServiceProps.get( - "value.object.listener.it.tref.liferay.portos.mailmanager.model.EmailTemplateAttachment"))); - - if (listenerClassNames.length > 0) { - try { - List> listenersList = new ArrayList>(); - - for (String listenerClassName : listenerClassNames) { - listenersList.add((ModelListener)InstanceFactory.newInstance( - getClassLoader(), listenerClassName)); - } - - listeners = listenersList.toArray(new ModelListener[listenersList.size()]); - } - catch (Exception e) { - _log.error(e); - } - } - } - - public void destroy() { - EntityCacheUtil.removeCache(EmailTemplateAttachmentImpl.class.getName()); - FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY); - FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); - } - - private static final String _SQL_SELECT_EMAILTEMPLATEATTACHMENT = "SELECT emailTemplateAttachment FROM EmailTemplateAttachment emailTemplateAttachment"; - private static final String _SQL_SELECT_EMAILTEMPLATEATTACHMENT_WHERE = "SELECT emailTemplateAttachment FROM EmailTemplateAttachment emailTemplateAttachment WHERE "; - private static final String _SQL_COUNT_EMAILTEMPLATEATTACHMENT = "SELECT COUNT(emailTemplateAttachment) FROM EmailTemplateAttachment emailTemplateAttachment"; - private static final String _SQL_COUNT_EMAILTEMPLATEATTACHMENT_WHERE = "SELECT COUNT(emailTemplateAttachment) FROM EmailTemplateAttachment emailTemplateAttachment WHERE "; - private static final String _ORDER_BY_ENTITY_ALIAS = "emailTemplateAttachment."; - private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No EmailTemplateAttachment exists with the primary key "; - private static final String _NO_SUCH_ENTITY_WITH_KEY = "No EmailTemplateAttachment exists with the key {"; - private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = GetterUtil.getBoolean(PropsUtil.get( - PropsKeys.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE)); - private static Log _log = LogFactoryUtil.getLog(EmailTemplateAttachmentPersistenceImpl.class); - private static EmailTemplateAttachment _nullEmailTemplateAttachment = new EmailTemplateAttachmentImpl() { - @Override - public Object clone() { - return this; - } - - @Override - public CacheModel toCacheModel() { - return _nullEmailTemplateAttachmentCacheModel; - } - }; - - private static CacheModel _nullEmailTemplateAttachmentCacheModel = - new CacheModel() { - @Override - public EmailTemplateAttachment toEntityModel() { - return _nullEmailTemplateAttachment; - } - }; -} \ No newline at end of file