Sfoglia il codice sorgente

fix contains method on array

develop
marcoalderighi 2 anni fa
parent
commit
89998d1d93
  1. 10
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/src/it/nextmind/liferay/portos/advanced/operation/portlet/AdvancedOperationPortlet.java

10
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/src/it/nextmind/liferay/portos/advanced/operation/portlet/AdvancedOperationPortlet.java

@ -5,6 +5,7 @@ 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.servlet.SessionErrors;
import com.liferay.portal.kernel.util.ArrayUtil;
import com.liferay.portal.kernel.util.DateFormatFactoryUtil;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.Validator;
@ -43,8 +44,15 @@ public class AdvancedOperationPortlet extends MVCPortlet {
if (intPraticaId != 0L) {
List<ControlloPratica> controlloPraticaList =
ControlloPraticaLocalServiceUtil.findByIntPratica(intPraticaId);
if(_log.isDebugEnabled()){
_log.debug("AdvancedOperationPortlet --- There are " + controlloPraticaList.size() +" ControlloPratica");
}
for(ControlloPratica cp : controlloPraticaList){
if(Arrays.asList(AdvancedOperationUtil.STATUS_ARRAY).contains(cp.getStatus())){
if(_log.isDebugEnabled()){
_log.debug("AdvancedOperationPortlet --- Cycling... ControlloPraticaID " + cp.getCompanyId()
+ " Status " + cp.getStatus());
}
if(ArrayUtil.contains(AdvancedOperationUtil.STATUS_ARRAY, cp.getStatus())){
_log.info("AdvancedOperationPortlet --- Deleting ControlloPratica " + cp.getControlloPraticaId() +
" with Status " + cp.getStatus() +" of IntPraticaId " + intPraticaId);
ControlloPraticaLocalServiceUtil.deleteControlloPratica(cp);

Caricamento…
Annulla
Salva