Class DatabaseResourceHome
- java.lang.Object
-
- fr.paris.lutece.plugins.resource.business.database.DatabaseResourceHome
-
public final class DatabaseResourceHome extends java.lang.ObjectDatabase resource home
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcreate(DatabaseResource resource)Create a new database resourcestatic voiddelete(int nIdResource)Remove a resource from the databasestatic java.util.List<DatabaseResource>findAll()Get the list of resourcesstatic java.util.List<java.lang.Integer>findAllId(DatabaseResourceSort resourceSort)Get the list of ids of resourcesstatic java.util.List<DatabaseResource>findByListId(java.util.List<java.lang.Integer> listId, DatabaseResourceSort resourceSort)Get the list of database resources from an id liststatic DatabaseResourcefindByPrimaryKey(int nIdResource)Find a resource from its primary keystatic java.util.List<DatabaseResource>findByResourceType(java.lang.String strResourceType)Get the list of resources that have a given resource typestatic voidupdate(DatabaseResource resource)Updates a database resource
-
-
-
Method Detail
-
create
public static void create(DatabaseResource resource)
Create a new database resource- Parameters:
resource- The resource to creates
-
update
public static void update(DatabaseResource resource)
Updates a database resource- Parameters:
resource- The resource
-
delete
public static void delete(int nIdResource)
Remove a resource from the database- Parameters:
nIdResource- the id of the resource
-
findByPrimaryKey
public static DatabaseResource findByPrimaryKey(int nIdResource)
Find a resource from its primary key- Parameters:
nIdResource- the id of the resource- Returns:
- The resource, or null if no resource has the given primary key
-
findAll
public static java.util.List<DatabaseResource> findAll()
Get the list of resources- Returns:
- The list of resources
-
findAllId
public static java.util.List<java.lang.Integer> findAllId(DatabaseResourceSort resourceSort)
Get the list of ids of resources- Parameters:
resourceSort- The sort parameters- Returns:
- The list of ids of resources
-
findByListId
public static java.util.List<DatabaseResource> findByListId(java.util.List<java.lang.Integer> listId, DatabaseResourceSort resourceSort)
Get the list of database resources from an id list- Parameters:
listId- The list of ids of resources to getresourceSort- The sort parameters- Returns:
- The list of resources
-
findByResourceType
public static java.util.List<DatabaseResource> findByResourceType(java.lang.String strResourceType)
Get the list of resources that have a given resource type- Parameters:
strResourceType- The resource type- Returns:
- The list of resources, or an empty list if no resource has the given resource type
-
-