Interface IDatabaseResourceDAO
-
- All Known Implementing Classes:
DatabaseResourceDAO
public interface IDatabaseResourceDAOInterface of DAO to manage database resources
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBEAN_NAMEThe name of the bean of the DAO
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a resource from the databasejava.util.List<DatabaseResource>findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of resourcesjava.util.List<java.lang.Integer>findAllId(DatabaseResourceSort resourceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of resource idsjava.util.List<DatabaseResource>findByListId(java.util.List<java.lang.Integer> listId, DatabaseResourceSort resourceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of database resources from an id listDatabaseResourcefindByPrimaryKey(int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)Find a resource from its primary keyjava.util.List<DatabaseResource>findByResourceType(java.lang.String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of resources that have a given resource typevoidinsert(DatabaseResource resource, fr.paris.lutece.portal.service.plugin.Plugin plugin)insert a new resource into the databasevoidupdate(DatabaseResource resource, fr.paris.lutece.portal.service.plugin.Plugin plugin)Updates a database resource
-
-
-
Field Detail
-
BEAN_NAME
static final java.lang.String BEAN_NAME
The name of the bean of the DAO- See Also:
- Constant Field Values
-
-
Method Detail
-
insert
void insert(DatabaseResource resource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
insert a new resource into the database- Parameters:
resource- The resource to createsplugin- The plugin
-
update
void update(DatabaseResource resource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Updates a database resource- Parameters:
resource- The resourceplugin- The plugin
-
delete
void delete(int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a resource from the database- Parameters:
nIdResource- the id of the resourceplugin- the plugin
-
findByPrimaryKey
DatabaseResource findByPrimaryKey(int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find a resource from its primary key- Parameters:
nIdResource- the id of the resourceplugin- The plugin- Returns:
- The resource, or null if no resource has the given primary key
-
findAll
java.util.List<DatabaseResource> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of resources- Parameters:
plugin- the plugin- Returns:
- The list of resources
-
findAllId
java.util.List<java.lang.Integer> findAllId(DatabaseResourceSort resourceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of resource ids- Parameters:
resourceSort- The sort parametersplugin- The plugin- Returns:
- the list of resource ids
-
findByListId
java.util.List<DatabaseResource> findByListId(java.util.List<java.lang.Integer> listId, DatabaseResourceSort resourceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of database resources from an id list- Parameters:
listId- The list of ids of resources to getresourceSort- The sort parametersplugin- The plugin- Returns:
- The list of resources
-
findByResourceType
java.util.List<DatabaseResource> findByResourceType(java.lang.String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of resources that have a given resource type- Parameters:
strResourceType- The resource typeplugin- The plugin- Returns:
- The list of resources, or an empty list if no resource has the given resource type
-
-