Class ResourcesHbmDAO
java.lang.Object
org.europa.together.application.GenericHbmDAO<ResourcesDO,String>
org.europa.together.application.acl.ResourcesHbmDAO
- All Implemented Interfaces:
Serializable
,ResourcesDAO
,org.europa.together.business.GenericDAO<ResourcesDO,
String>
@Repository
@Transactional
public class ResourcesHbmDAO
extends org.europa.together.application.GenericHbmDAO<ResourcesDO,String>
implements ResourcesDAO
Implementation of the ResourcesDAO.
- See Also:
-
Field Summary
Fields inherited from class org.europa.together.application.GenericHbmDAO
mainEntityManagerFactory
Fields inherited from interface org.europa.together.business.GenericDAO
FEATURE_ID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.boolean
delete
(ResourcesDO resource) If the resource object exist in the persistence context and is not protected, it will be deleted.Fetch a specific resource defined by the resource name and the view.Return a list of all resources which protected against deleting, to prevent accidents.listResourcesOfSameType
(String resource) Fetch a list of resources with the same name.void
update
(String id, ResourcesDO object) Deprecated.void
update
(ResourcesDO resource) Overwrite the regular DAO update method, because of composite Primary Key.Methods inherited from class org.europa.together.application.GenericHbmDAO
countAllElements, create, deserializeJsonAsList, deserializeJsonAsObject, getPrimaryKeyOfObject, listAllElements, serializeAsJson
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.europa.together.business.GenericDAO
countAllElements, create, deserializeJsonAsList, deserializeJsonAsObject, getPrimaryKeyOfObject, listAllElements, serializeAsJson
-
Constructor Details
-
ResourcesHbmDAO
public ResourcesHbmDAO()Default Constructor.
-
-
Method Details
-
update
Deprecated.- Specified by:
update
in interfaceorg.europa.together.business.GenericDAO<ResourcesDO,
String> - Overrides:
update
in classorg.europa.together.application.GenericHbmDAO<ResourcesDO,
String>
-
delete
Deprecated.- Specified by:
delete
in interfaceorg.europa.together.business.GenericDAO<ResourcesDO,
String> - Overrides:
delete
in classorg.europa.together.application.GenericHbmDAO<ResourcesDO,
String>
-
find
- Specified by:
find
in interfaceorg.europa.together.business.GenericDAO<ResourcesDO,
String> - Overrides:
find
in classorg.europa.together.application.GenericHbmDAO<ResourcesDO,
String>
-
find
Description copied from interface:ResourcesDAO
Fetch a specific resource defined by the resource name and the view.- Specified by:
find
in interfaceResourcesDAO
- Parameters:
resource
- as Stringview
- as String- Returns:
- ResourceDo as Object
-
update
Description copied from interface:ResourcesDAO
Overwrite the regular DAO update method, because of composite Primary Key.- Specified by:
update
in interfaceResourcesDAO
- Parameters:
resource
- as ResourceDO- Throws:
jakarta.persistence.EntityNotFoundException
-
delete
Description copied from interface:ResourcesDAO
If the resource object exist in the persistence context and is not protected, it will be deleted.- Specified by:
delete
in interfaceResourcesDAO
- Parameters:
resource
- as ResourceDO- Returns:
- true on success
- Throws:
jakarta.persistence.EntityNotFoundException
-
listResourcesOfSameType
Description copied from interface:ResourcesDAO
Fetch a list of resources with the same name. A system could contain multiply resources with the same name. To distinguish this resources a view is defined. The default entry for views is default.- Specified by:
listResourcesOfSameType
in interfaceResourcesDAO
- Parameters:
resource
- as string- Returns:
- List of ResourcesDO
-
listProtectedResources
Description copied from interface:ResourcesDAO
Return a list of all resources which protected against deleting, to prevent accidents.- Specified by:
listProtectedResources
in interfaceResourcesDAO
- Returns:
- List of ResourcesDO
-