Skip to content

Commit 716017e

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

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,6 @@ public interface IDemandServiceProvider
5353
*/
5454
public void setDemandDao( IDemandDAO dao );
5555

56-
/**
57-
* init DAO
58-
*
59-
* @param dao
60-
*/
61-
public void setDemandTypeDao( IDemandTypeDAO dao );
62-
6356
/**
6457
* init DAO
6558
*
@@ -185,12 +178,12 @@ public interface IDemandServiceProvider
185178
public List<DemandType> getDemandTypesList( );
186179

187180
/**
188-
* get demand type
181+
* get demand type by type_id
189182
*
190183
* @param id
191184
* @return the demand type as optional
192185
*/
193-
public Optional<DemandType> getDemandType( int id );
186+
public Optional<DemandType> getDemandType( String type_id );
194187

195188
/**
196189
* 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)