@ -45,6 +45,7 @@ import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.workflow.WorkflowConstants ;
import com.liferay.portal.model.RoleConstants ;
import com.liferay.portal.model.User ;
import com.liferay.portal.security.permission.ActionKeys ;
import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil ;
import com.liferay.portal.security.permission.PermissionThreadLocal ;
import com.liferay.portal.service.RoleLocalServiceUtil ;
@ -57,13 +58,14 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
* The implementation of the doc pratica local service .
*
* < p >
* All custom service methods should be put in this class . Whenever methods are added , rerun
* ServiceBuilder to copy their definitions into the
* All custom service methods should be put in this class . Whenever methods are
* added , rerun ServiceBuilder to copy their definitions into the
* { @link it . tref . liferay . portos . bo . service . DocPraticaLocalService } interface .
*
* < p >
* This is a local service . Methods of this service will not have security checks based on the
* propagated JAAS credentials because this service can only be accessed from within the same VM .
* This is a local service . Methods of this service will not have security
* checks based on the propagated JAAS credentials because this service can only
* be accessed from within the same VM .
* < / p >
*
* @author Davide Barbagallo , 3F Consulting
@ -72,9 +74,9 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
* /
public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
/ *
* NOTE FOR DEVELOPERS : Never reference this interface directly . Always use { @link
* it . tref . liferay . portos . bo . service . DocPraticaLocalServiceUtil } to access the doc pratica local
* service .
* NOTE FOR DEVELOPERS : Never reference this interface directly . Always use
* { @link it . tref . liferay . portos . bo . service . DocPraticaLocalServiceUtil } to
* access the doc pratica local service .
* /
private Log _log = LogFactoryUtil . getLog ( DocPraticaLocalServiceImpl . class ) ;
@ -100,21 +102,22 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return deleteDocPratica ( docPraticaLocalService . getDocPratica ( docPraticaId ) ) ;
}
public DocPratica addDocPratica ( long userId , String className , long classPk , long intPraticaId , byte [ ] dlFileEntry ,
String fileName , String version , boolean praticaValidata , String descLong , String tipologia , String sha256 ,
boolean aggiornato , String jsonFirmatari , long dettPraticaIdRimozione , Date dtDataRimozione ,
ServiceContext serviceContext ) throws PortalException , SystemException {
public DocPratica addDocPratica ( long userId , String className , long classPk , long intPraticaId ,
byte [ ] dlFileEntry , String fileName , String version , boolean praticaValidata , String descLong ,
String tipologia , String sha256 , boolean aggiornato , String jsonFirmatari ,
long dettPraticaIdRimozione , Date dtDataRimozione , ServiceContext serviceContext )
throws PortalException , SystemException {
User user = userPersistence . findByPrimaryKey ( userId ) ;
Date now = new Date ( ) ;
validate ( serviceContext . getScopeGroupId ( ) , 0L , className , classPk , intPraticaId , dlFileEntry , fileName , version ,
praticaValidata , descLong , tipologia , sha256 , aggiornato , jsonFirmatari , dettPraticaIdRimozione ,
dtDataRimozione ) ;
validate ( serviceContext . getScopeGroupId ( ) , 0L , className , classPk , intPraticaId , dlFileEntry ,
fileName , version , praticaValidata , descLong , tipologia , sha256 , aggiornato , jsonFirmatari ,
dettPraticaIdRimozione , dtDataRimozione ) ;
DocPratica docPratica = docPraticaPersistence . create ( counterLocalService . increment ( DocPratica . class . getName ( ) ) ) ;
DocPratica docPratica = docPraticaPersistence . create ( counterLocalService . increment ( DocPratica . class
. getName ( ) ) ) ;
FileEntry fileEntry = addAttachment ( classPk , intPraticaId , userId , fileName , dlFileEntry , tipologia ) ;
@ -146,15 +149,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPratica ;
}
public DocPratica addDocPratica ( long userId , String className , long classPk , long intPraticaId , byte [ ] dlFileEntry ,
String fileName , String tipologia , String jsonFirmatari , ServiceContext serviceContext ) throws PortalException ,
SystemException {
public DocPratica addDocPratica ( long userId , String className , long classPk , long intPraticaId ,
byte [ ] dlFileEntry , String fileName , String tipologia , String jsonFirmatari ,
ServiceContext serviceContext ) throws PortalException , SystemException {
User user = userPersistence . findByPrimaryKey ( userId ) ;
Date now = new Date ( ) ;
DocPratica docPratica = docPraticaPersistence . create ( counterLocalService . increment ( DocPratica . class . getName ( ) ) ) ;
DocPratica docPratica = docPraticaPersistence . create ( counterLocalService . increment ( DocPratica . class
. getName ( ) ) ) ;
FileEntry fileEntry = addAttachment ( classPk , intPraticaId , userId , fileName , dlFileEntry , tipologia ) ;
@ -185,15 +189,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPratica ;
}
public DocPratica addDocPratica ( long userId , String className , long classPk , long intPraticaId , long fileEntry Id ,
String fileName , String tipologia , String jsonFirmatari , ServiceContext serviceContext ) throws PortalException ,
SystemException {
public DocPratica addDocPratica ( long userId , String className , long classPk , long intPraticaId ,
long fileEntryId , String fileName , String tipologia , String jsonFirmatari ,
ServiceContext serviceContext ) throws PortalException , SystemException {
User user = userPersistence . findByPrimaryKey ( userId ) ;
Date now = new Date ( ) ;
DocPratica docPratica = docPraticaPersistence . create ( counterLocalService . increment ( DocPratica . class . getName ( ) ) ) ;
DocPratica docPratica = docPraticaPersistence . create ( counterLocalService . increment ( DocPratica . class
. getName ( ) ) ) ;
docPratica . setCompanyId ( serviceContext . getCompanyId ( ) ) ;
docPratica . setUserId ( user . getUserId ( ) ) ;
@ -223,18 +228,19 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
}
public DocPratica addDocPraticaForImport ( long userId , String className , long classPk , long intPraticaId ,
byte [ ] dlFileEntry , String fileName , String version , boolean praticaValidata , String descLong , String tipologia ,
String sha256 , boolean aggiornato , String jsonFirmatari , long dettPraticaIdRimozione , Date dtDataRimozione ,
long oldDocPraticaId , ServiceContext serviceContext ) throws PortalException , SystemException {
byte [ ] dlFileEntry , String fileName , String version , boolean praticaValidata , String descLong ,
String tipologia , String sha256 , boolean aggiornato , String jsonFirmatari ,
long dettPraticaIdRimozione , Date dtDataRimozione , long oldDocPraticaId ,
ServiceContext serviceContext ) throws PortalException , SystemException {
Date now = new Date ( ) ;
validate ( serviceContext . getScopeGroupId ( ) , 0L , className , classPk , intPraticaId , dlFileEntry , fileName , version ,
praticaValidata , descLong , tipologia , sha256 , aggiornato , jsonFirmatari , dettPraticaIdRimozione ,
dtDataRimozione ) ;
validate ( serviceContext . getScopeGroupId ( ) , 0L , className , classPk , intPraticaId , dlFileEntry ,
fileName , version , praticaValidata , descLong , tipologia , sha256 , aggiornato , jsonFirmatari ,
dettPraticaIdRimozione , dtDataRimozione ) ;
DocPratica docPratica = docPraticaPersistence . create ( counterLocalService . increment ( DocPratica . class . getName ( ) ) ) ;
DocPratica docPratica = docPraticaPersistence . create ( counterLocalService . increment ( DocPratica . class
. getName ( ) ) ) ;
docPratica . setCompanyId ( serviceContext . getCompanyId ( ) ) ;
docPratica . setUserId ( userId ) ;
@ -269,7 +275,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
FileEntry fileEntry = null ;
// DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
// DettPratica dettPratica =
// dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
IntPratica intPratica = intPraticaPersistence . fetchByPrimaryKey ( intPraticaId ) ;
Territorio territorio = territorioPersistence . fetchByPrimaryKey ( intPratica . getTerritorioId ( ) ) ;
@ -277,9 +284,9 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
long groupId = territorio . getGroupId ( ) ;
// TODO forse è meglio ragionare con un'altra logica per i permessi
User user =
UserLocalServiceUtil . getRoleUsers (
RoleLocalServiceUtil . getRole ( intPratica . getCompanyId ( ) , RoleConstants . ADMINISTRATOR ) . getRoleId ( ) ) . get ( 0 ) ;
User user = UserLocalServiceUtil . getRoleUsers (
RoleLocalServiceUtil . getRole ( intPratica . getCompanyId ( ) , RoleConstants . ADMINISTRATOR )
. getRoleId ( ) ) . get ( 0 ) ;
try {
PermissionThreadLocal . setPermissionChecker ( PermissionCheckerFactoryUtil . create ( user ) ) ;
} catch ( Exception e ) {
@ -292,11 +299,10 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
serviceContext . setCompanyId ( companyId ) ;
serviceContext . setScopeGroupId ( groupId ) ;
serviceContext . setUserId ( userId ) ;
serviceContext . setGroupPermissions ( new String [ ] { ActionKeys . VIEW } ) ;
// TODO forse mettiamo i permesssi ma non mi pare sicuro.
long defaultFolderId =
configurazioneLocalService . findByC_ChiaveLong ( companyId , ConfigurazioneConstants . ATTACHMENT_FOLDER_ID ) ;
long defaultFolderId = configurazioneLocalService . findByC_ChiaveLong ( companyId ,
ConfigurazioneConstants . ATTACHMENT_FOLDER_ID ) ;
Folder defaultFolder = dlAppLocalService . getFolder ( defaultFolderId ) ;
@ -304,12 +310,12 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
Folder folder = null ;
try {
folder = dlAppLocalService . getFolder ( defaultFolder . getRepositoryId ( ) , defaultFolder . getFolderId ( ) , folderName ) ;
folder = dlAppLocalService . getFolder ( defaultFolder . getRepositoryId ( ) ,
defaultFolder . getFolderId ( ) , folderName ) ;
} catch ( NoSuchFolderException e ) {
// cartella non presente -> creo cartella
folder =
dlAppLocalService . addFolder ( userId , defaultFolder . getRepositoryId ( ) , defaultFolder . getFolderId ( ) , folderName ,
StringPool . BLANK , serviceContext ) ;
folder = dlAppLocalService . addFolder ( userId , defaultFolder . getRepositoryId ( ) ,
defaultFolder . getFolderId ( ) , folderName , StringPool . BLANK , serviceContext ) ;
}
Date now = new Date ( ) ;
String title = tipoAllegato + StringPool . UNDERLINE + sourceFileName ;
@ -317,13 +323,13 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
String mimeType = MimeTypesUtil . getContentType ( sourceFileName ) ;
String changeLog = StringPool . BLANK ;
fileEntry =
dlAppLocalService . addFileEntry ( userId , folder . getRepositoryId ( ) , folder . getFolderId ( ) , now . getTime ( ) + "_"
+ sourceFileName , mimeType , title , description , changeLog , content , serviceContext ) ;
fileEntry = dlAppLocalService . addFileEntry ( userId , folder . getRepositoryId ( ) , folder . getFolderId ( ) ,
now . getTime ( ) + "_" + sourceFileName , mimeType , title , description , changeLog , content ,
serviceContext ) ;
try {
PermissionThreadLocal . setPermissionChecker ( PermissionCheckerFactoryUtil . create ( UserLocalService Util
. getUser ( delegaUserId ) ) ) ;
PermissionThreadLocal . setPermissionChecker ( PermissionCheckerFactoryUtil
. create ( UserLocalServiceUtil . getUser ( delegaUserId ) ) ) ;
} catch ( Exception e ) {
throw new SystemException ( e ) ;
@ -344,7 +350,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
docPraticaLocalService . updateDocPratica ( docPratica ) ;
}
public void addFirmeAndApprova ( long docPraticaId , List < String > codiciFiscali ) throws PortalException , SystemException {
public void addFirmeAndApprova ( long docPraticaId , List < String > codiciFiscali ) throws PortalException ,
SystemException {
DocPratica docPratica = docPraticaLocalService . getDocPratica ( docPraticaId ) ;
String jsonFirmatari = docPratica . getJsonFirmatari ( ) ;
@ -357,7 +364,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
docPraticaLocalService . updateDocPratica ( docPratica ) ;
}
public void addErrorAndApprova ( long docPraticaId , String errorCode ) throws PortalException , SystemException {
public void addErrorAndApprova ( long docPraticaId , String errorCode ) throws PortalException ,
SystemException {
DocPratica docPratica = docPraticaLocalService . getDocPratica ( docPraticaId ) ;
docPratica . setModifiedDate ( new Date ( ) ) ;
@ -376,16 +384,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
}
private void validate ( long groupId , long docPraticaId , String className , long classPk , long intPraticaId ,
byte [ ] dlFileEntry , String fileName , String version , boolean praticaValidata , String descLong , String tipologia ,
String sha256 , boolean aggiornato , String jsonFirmatari , long dettPraticaIdRimozione , Date dtDataRimozione )
throws PortalException , SystemException {
byte [ ] dlFileEntry , String fileName , String version , boolean praticaValidata , String descLong ,
String tipologia , String sha256 , boolean aggiornato , String jsonFirmatari ,
long dettPraticaIdRimozione , Date dtDataRimozione ) throws PortalException , SystemException {
// TODO Write your own validation code
}
public DocPratica updateDocPraticaAggiornato ( long docPraticaId , boolean aggiornato ) throws SystemException {
public DocPratica updateDocPraticaAggiornato ( long docPraticaId , boolean aggiornato )
throws SystemException {
DocPratica docPratica = docPraticaPersistence . fetchByPrimaryKey ( docPraticaId ) ;
docPratica . setAggiornato ( aggiornato ) ;
@ -436,7 +444,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPraticaPersistence . findByClassPk ( classPk ) ;
}
public List < DocPratica > findByStaus ( int status , int start , int end , OrderByComparator order ) throws SystemException {
public List < DocPratica > findByStaus ( int status , int start , int end , OrderByComparator order )
throws SystemException {
return docPraticaPersistence . findByStatus ( status , start , end , order ) ;
}
@ -467,8 +476,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return soggettoPersistence . findWithDynamicQuery ( dynamicQuery , start , end ) ;
}
public List < DocPratica > findByIntPratica_ClassPk_Tipologia ( long intPraticaId , long classPk , String tipologia ,
int start , int end ) throws SystemException {
public List < DocPratica > findByIntPratica_ClassPk_Tipologia ( long intPraticaId , long classPk ,
String tipologia , int start , int end ) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery ( ) ;
dynamicQuery . add ( RestrictionsFactoryUtil . eq ( "intPraticaId" , intPraticaId ) ) ;
@ -478,8 +487,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery ( dynamicQuery , start , end ) ;
}
public List < DocPratica > findByIntPratica_ClassPk_Tipologie ( long intPraticaId , long classPk , List < String > tipologie )
throws SystemException {
public List < DocPratica > findByIntPratica_ClassPk_Tipologie ( long intPraticaId , long classPk ,
List < String > tipologie ) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery ( ) ;
dynamicQuery . add ( RestrictionsFactoryUtil . eq ( "intPraticaId" , intPraticaId ) ) ;
@ -500,7 +509,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery ( dynamicQuery ) ;
}
public DocPratica fetchByC_Group_DlFileEntry_Version ( long dlFileEntryId , String version ) throws SystemException {
public DocPratica fetchByC_Group_DlFileEntry_Version ( long dlFileEntryId , String version )
throws SystemException {
return docPraticaPersistence . fetchByDlFileEntry_Version ( dlFileEntryId , version ) ;
}
@ -520,7 +530,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
throws SystemException {
DynamicQuery dynamicQuery = docPraticaLocalService . dynamicQuery ( ) ;
dynamicQuery . setProjection ( ProjectionFactoryUtil . distinct ( ProjectionFactoryUtil . property ( "dlFileEntryId" ) ) ) ;
dynamicQuery . setProjection ( ProjectionFactoryUtil . distinct ( ProjectionFactoryUtil
. property ( "dlFileEntryId" ) ) ) ;
dynamicQuery . add ( PropertyFactoryUtil . forName ( "tipologia" ) . eq ( tipologia ) ) ;
Junction or = RestrictionsFactoryUtil . disjunction ( ) ;
for ( long classPk : classPks ) {
@ -540,8 +551,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery ( dynamicQuery ) ;
}
public List < DocPratica > getValidByIntPratica_Tipologia ( long intPraticaId , String tipologia , int start , int end )
throws SystemException {
public List < DocPratica > getValidByIntPratica_Tipologia ( long intPraticaId , String tipologia , int start ,
int end ) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery ( ) ;
dynamicQuery . add ( RestrictionsFactoryUtil . eq ( "intPraticaId" , intPraticaId ) ) ;
@ -551,7 +562,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery ( dynamicQuery , start , end ) ;
}
public int countValidTmpByIntPratica_Tipologia ( long intPraticaId , String tipologia ) throws SystemException {
public int countValidTmpByIntPratica_Tipologia ( long intPraticaId , String tipologia )
throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica ( intPraticaId ) ;
dynamicQuery . add ( RestrictionsFactoryUtil . eq ( "tipologia" , tipologia ) ) ;
@ -559,8 +571,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return ( int ) docPraticaPersistence . countWithDynamicQuery ( dynamicQuery ) ;
}
public List < DocPratica > getValidTmpByIntPratica_Tipologia ( long intPraticaId , String tipologia , int start , int end )
throws SystemException {
public List < DocPratica > getValidTmpByIntPratica_Tipologia ( long intPraticaId , String tipologia , int start ,
int end ) throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica ( intPraticaId ) ;
dynamicQuery . add ( RestrictionsFactoryUtil . eq ( "tipologia" , tipologia ) ) ;
@ -569,8 +581,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery ( dynamicQuery , start , end ) ;
}
public List < DocPratica > getValidTmpByIntPratica_DettPratica_Tipologia ( long intPraticaId , long dettPraticaId , String tipologia , int start , int end )
throws SystemException {
public List < DocPratica > getValidTmpByIntPratica_DettPratica_Tipologia ( long intPraticaId ,
long dettPraticaId , String tipologia , int start , int end ) throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica ( intPraticaId ) ;
dynamicQuery . add ( RestrictionsFactoryUtil . eq ( "tipologia" , tipologia ) ) ;
@ -581,8 +593,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery ( dynamicQuery , start , end ) ;
}
public List < DocPratica > getValidTmpByIntPratica_Tipologie ( long intPraticaId , String [ ] tipologie , int start , int end )
throws SystemException {
public List < DocPratica > getValidTmpByIntPratica_Tipologie ( long intPraticaId , String [ ] tipologie ,
int start , int end ) throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica ( intPraticaId ) ;
dynamicQuery . add ( RestrictionsFactoryUtil . in ( "tipologia" , tipologie ) ) ;
@ -591,7 +603,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery ( dynamicQuery , start , end ) ;
}
public int countValidTmpByIntPratica_Tipologie ( long intPraticaId , String [ ] tipologie ) throws SystemException {
public int countValidTmpByIntPratica_Tipologie ( long intPraticaId , String [ ] tipologie )
throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica ( intPraticaId ) ;
dynamicQuery . add ( RestrictionsFactoryUtil . in ( "tipologia" , tipologie ) ) ;
@ -626,14 +639,15 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery ( dynamicQuery ) ;
}
public List < DocPratica > getValidUntilClassPkByIntPratica ( long intPraticaId , long classPk , String tipologia ,
int start , int end ) throws SystemException {
public List < DocPratica > getValidUntilClassPkByIntPratica ( long intPraticaId , long classPk ,
String tipologia , int start , int end ) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery ( ) ;
dynamicQuery . add ( RestrictionsFactoryUtil . eq ( "intPraticaId" , intPraticaId ) ) ;
dynamicQuery . add ( RestrictionsFactoryUtil . le ( "classPk" , classPk ) ) ;
dynamicQuery . add ( RestrictionsFactoryUtil . eq ( "tipologia" , tipologia ) ) ;
// dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione", null));
// dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione",
// null));
dynamicQuery . add ( RestrictionsFactoryUtil . eq ( "rimosso" , false ) ) ;
dynamicQuery . addOrder ( OrderFactoryUtil . desc ( "classPk" ) ) ;
return dynamicQuery ( dynamicQuery , start , end ) ;
@ -661,15 +675,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
}
// ADT BUG FE ID = 9
public DocPratica addDocPraticaAnnullamento ( long userId , String className , long classPk , long intPraticaId , long fileEntryId ,
String fileName , String tipologia , String sha256 , String jsonFirmatari , ServiceContext serviceContext ) throws PortalException ,
SystemException {
public DocPratica addDocPraticaAnnullamento ( long userId , String className , long classPk ,
long intPraticaId , long fileEntryId , String fileName , String tipologia , String sha256 ,
String jsonFirmatari , ServiceContext serviceContext ) throws PortalException , SystemException {
User user = userPersistence . findByPrimaryKey ( userId ) ;
Date now = new Date ( ) ;
DocPratica docPratica = docPraticaPersistence . create ( counterLocalService . increment ( DocPratica . class . getName ( ) ) ) ;
DocPratica docPratica = docPraticaPersistence . create ( counterLocalService . increment ( DocPratica . class
. getName ( ) ) ) ;
docPratica . setCompanyId ( serviceContext . getCompanyId ( ) ) ;
docPratica . setUserId ( user . getUserId ( ) ) ;
@ -699,7 +714,6 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPratica ;
}
/ * *
* Metodo nuovo ADT
*
@ -711,8 +725,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
* @return
* @throws SystemException
* /
public List < DocPratica > findByIntPratica_ClassPk_TipologiaNew ( long intPraticaId , long classPk , String tipologia ,
int start , int end ) throws SystemException {
public List < DocPratica > findByIntPratica_ClassPk_TipologiaNew ( long intPraticaId , long classPk ,
String tipologia , int start , int end ) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery ( ) ;
dynamicQuery . add ( RestrictionsFactoryUtil . eq ( "intPraticaId" , intPraticaId ) ) ;