Class AiFeatureDAO
java.lang.Object
fr.paris.lutece.plugins.wiki.modules.ai.business.AiFeatureDAO
- All Implemented Interfaces:
IAiFeatureDAO
AiFeatureDAO implementation for database operations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Deletes an AI feature by identifiervoidInserts a new AI feature into the databaseload(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Loads an AI feature by identifierselectActiveFeatures(fr.paris.lutece.portal.service.plugin.Plugin plugin) Retrieves all active AI featuresselectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin) Retrieves all AI featuresselectFeaturesByType(String strType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Retrieves active AI features by typevoidshiftOrdersDown(int nOrder, int nExcludeId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Shifts order numbers down after removing a feature from specified positionvoidshiftOrdersUp(int nOrder, int nExcludeId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Shifts order numbers up to make room for insertion at specified positionvoidUpdates an existing AI feature
-
Constructor Details
-
AiFeatureDAO
public AiFeatureDAO()
-
-
Method Details
-
insert
Inserts a new AI feature into the database- Specified by:
insertin interfaceIAiFeatureDAO- Parameters:
aiFeature- the AI feature to insertplugin- the plugin
-
load
Loads an AI feature by identifier- Specified by:
loadin interfaceIAiFeatureDAO- Parameters:
nId- the feature identifierplugin- the plugin- Returns:
- an Optional containing the AI feature if found, empty otherwise
-
store
Updates an existing AI feature- Specified by:
storein interfaceIAiFeatureDAO- Parameters:
aiFeature- the AI feature to updateplugin- the plugin
-
delete
public void delete(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Deletes an AI feature by identifier- Specified by:
deletein interfaceIAiFeatureDAO- Parameters:
nId- the feature identifierplugin- the plugin
-
selectAll
Retrieves all AI features- Specified by:
selectAllin interfaceIAiFeatureDAO- Parameters:
plugin- the plugin- Returns:
- a list of all AI features
-
selectActiveFeatures
Retrieves all active AI features- Specified by:
selectActiveFeaturesin interfaceIAiFeatureDAO- Parameters:
plugin- the plugin- Returns:
- a list of active AI features
-
selectFeaturesByType
public List<AiFeature> selectFeaturesByType(String strType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Retrieves active AI features by type- Specified by:
selectFeaturesByTypein interfaceIAiFeatureDAO- Parameters:
strType- the feature typeplugin- the plugin- Returns:
- a list of active AI features matching the specified type
-
shiftOrdersUp
public void shiftOrdersUp(int nOrder, int nExcludeId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAiFeatureDAOShifts order numbers up to make room for insertion at specified position- Specified by:
shiftOrdersUpin interfaceIAiFeatureDAO- Parameters:
nOrder- the order position where the feature will be insertednExcludeId- the feature id to exclude from shifting (-1 for new features)plugin- the plugin
-
shiftOrdersDown
public void shiftOrdersDown(int nOrder, int nExcludeId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAiFeatureDAOShifts order numbers down after removing a feature from specified position- Specified by:
shiftOrdersDownin interfaceIAiFeatureDAO- Parameters:
nOrder- the order position being vacatednExcludeId- the feature id to exclude from shiftingplugin- the plugin
-