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
mainEntityManagerFactoryFields inherited from interface org.europa.together.business.GenericDAO
FEATURE_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.booleandelete(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.voidupdate(String id, ResourcesDO object) Deprecated.voidupdate(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, serializeAsJsonMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
updatein interfaceorg.europa.together.business.GenericDAO<ResourcesDO,String> - Overrides:
updatein classorg.europa.together.application.GenericHbmDAO<ResourcesDO,String>
-
delete
Deprecated.- Specified by:
deletein interfaceorg.europa.together.business.GenericDAO<ResourcesDO,String> - Overrides:
deletein classorg.europa.together.application.GenericHbmDAO<ResourcesDO,String>
-
find
- Specified by:
findin interfaceorg.europa.together.business.GenericDAO<ResourcesDO,String> - Overrides:
findin classorg.europa.together.application.GenericHbmDAO<ResourcesDO,String>
-
find
Description copied from interface:ResourcesDAOFetch a specific resource defined by the resource name and the view.- Specified by:
findin interfaceResourcesDAO- Parameters:
resource- as Stringview- as String- Returns:
- ResourceDo as Object
-
update
Description copied from interface:ResourcesDAOOverwrite the regular DAO update method, because of composite Primary Key.- Specified by:
updatein interfaceResourcesDAO- Parameters:
resource- as ResourceDO- Throws:
jakarta.persistence.EntityNotFoundException
-
delete
Description copied from interface:ResourcesDAOIf the resource object exist in the persistence context and is not protected, it will be deleted.- Specified by:
deletein interfaceResourcesDAO- Parameters:
resource- as ResourceDO- Returns:
- true on success
- Throws:
jakarta.persistence.EntityNotFoundException
-
listResourcesOfSameType
Description copied from interface:ResourcesDAOFetch 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:
listResourcesOfSameTypein interfaceResourcesDAO- Parameters:
resource- as string- Returns:
- List of ResourcesDO
-
listProtectedResources
Description copied from interface:ResourcesDAOReturn a list of all resources which protected against deleting, to prevent accidents.- Specified by:
listProtectedResourcesin interfaceResourcesDAO- Returns:
- List of ResourcesDO
-