Skip to content

Commit 961461d

Browse files
committed
LUT-25865 : add a method to get DemandType by demand type
1 parent d08857e commit 961461d

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/java/fr/paris/lutece/plugins/grubusiness/business/demand/IDemandServiceProvider.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939

4040
import fr.paris.lutece.plugins.grubusiness.business.notification.INotificationDAO;
4141
import fr.paris.lutece.plugins.grubusiness.business.notification.INotificationEventDAO;
42-
import fr.paris.lutece.plugins.grubusiness.business.notification.INotificationListener;
4342
import fr.paris.lutece.plugins.grubusiness.business.notification.Notification;
4443
import fr.paris.lutece.plugins.grubusiness.business.notification.NotificationEvent;
4544

@@ -53,13 +52,6 @@ public interface IDemandServiceProvider
5352
*/
5453
public void setDemandDao( IDemandDAO dao );
5554

56-
/**
57-
* init DAO
58-
*
59-
* @param dao
60-
*/
61-
public void setDemandTypeDao( IDemandTypeDAO dao );
62-
6355
/**
6456
* init DAO
6557
*
@@ -185,12 +177,12 @@ public interface IDemandServiceProvider
185177
public List<DemandType> getDemandTypesList( );
186178

187179
/**
188-
* get demand type
180+
* get demand type by type_id
189181
*
190182
* @param id
191183
* @return the demand type as optional
192184
*/
193-
public Optional<DemandType> getDemandType( int id );
185+
public Optional<DemandType> getDemandType( String type_id );
194186

195187
/**
196188
* get demand Ids by customer Id and demand Type

src/java/fr/paris/lutece/plugins/grubusiness/business/demand/IDemandTypeDAO.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ public interface IDemandTypeDAO
7777
*/
7878
Optional<DemandType> load( int nKey );
7979

80+
/**
81+
* Load the data from the table by type_id
82+
*
83+
* @param sKey
84+
* The type_id of the demandType
85+
* @return The instance of the demandType
86+
*/
87+
Optional<DemandType> selectByTypeId( String sKey );
88+
8089
/**
8190
* Load the data of all the demandType objects and returns them as a list
8291
*

0 commit comments

Comments
 (0)