public final class DatabaseResourceHome extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
create(DatabaseResource resource)
Create a new database resource
|
static void |
delete(int nIdResource)
Remove a resource from the database
|
static List<DatabaseResource> |
findAll()
Get the list of resources
|
static List<Integer> |
findAllId(DatabaseResourceSort resourceSort)
Get the list of ids of resources
|
static List<DatabaseResource> |
findByListId(List<Integer> listId,
DatabaseResourceSort resourceSort)
Get the list of database resources from an id list
|
static DatabaseResource |
findByPrimaryKey(int nIdResource)
Find a resource from its primary key
|
static List<DatabaseResource> |
findByResourceType(String strResourceType)
Get the list of resources that have a given resource type
|
static void |
update(DatabaseResource resource)
Updates a database resource
|
public static void create(DatabaseResource resource)
resource - The resource to createspublic static void update(DatabaseResource resource)
resource - The resourcepublic static void delete(int nIdResource)
nIdResource - the id of the resourcepublic static DatabaseResource findByPrimaryKey(int nIdResource)
nIdResource - the id of the resourcepublic static List<DatabaseResource> findAll()
public static List<Integer> findAllId(DatabaseResourceSort resourceSort)
resourceSort - The sort parameterspublic static List<DatabaseResource> findByListId(List<Integer> listId, DatabaseResourceSort resourceSort)
listId - The list of ids of resources to getresourceSort - The sort parameterspublic static List<DatabaseResource> findByResourceType(String strResourceType)
strResourceType - The resource typeCopyright © 2021 City of Paris. All rights reserved.