Package org.dspace.content.dao.impl
Class BitstreamFormatDAOImpl
java.lang.Object
org.dspace.core.AbstractHibernateDAO<BitstreamFormat>
org.dspace.content.dao.impl.BitstreamFormatDAOImpl
- All Implemented Interfaces:
BitstreamFormatDAO,GenericDAO<BitstreamFormat>
public class BitstreamFormatDAOImpl
extends AbstractHibernateDAO<BitstreamFormat>
implements BitstreamFormatDAO
Hibernate implementation of the Database Access Object interface class for the BitstreamFormat object.
This class is responsible for all database calls for the BitstreamFormat object and is autowired by Spring.
This class should never be accessed directly.
- Author:
- kevinvandevelde at atmire.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFetch all persisted instances of a given object type.findByFileExtension(Context context, String extension) findByMIMEType(Context context, String mimeType, boolean includeInternal) Find a bitstream format by its (unique) MIME type.findByShortDescription(Context context, String desc) Find a bitstream format by its (unique) short descriptionfindNonInternal(Context context) intupdateRemovedBitstreamFormat(Context context, BitstreamFormat deletedBitstreamFormat, BitstreamFormat newBitstreamFormat) Methods inherited from class org.dspace.core.AbstractHibernateDAO
count, count, countLong, create, createQuery, createQuery, delete, executeCriteriaQuery, findAll, findByID, findByID, findByID, findByX, findMany, findMany, findUnique, getCriteriaBuilder, getCriteriaQuery, getHibernateSession, iterate, list, list, list, list, save, singleResult, singleResult, uniqueResult, uniqueResultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dspace.core.GenericDAO
create, delete, findAll, findByID, findByID, findByID, findMany, findUnique, save
-
Constructor Details
-
BitstreamFormatDAOImpl
protected BitstreamFormatDAOImpl()
-
-
Method Details
-
findByMIMEType
public BitstreamFormat findByMIMEType(Context context, String mimeType, boolean includeInternal) throws SQLException Find a bitstream format by its (unique) MIME type. If more than one bitstream format has the same MIME type, the one returned is unpredictable.- Specified by:
findByMIMETypein interfaceBitstreamFormatDAO- Parameters:
context- DSpace context objectmimeType- MIME type valueincludeInternal- whether to include internal mimetypes- Returns:
- the corresponding bitstream format, or
nullif there's no bitstream format with the given MIMEtype. - Throws:
SQLException- if database error
-
findByShortDescription
Find a bitstream format by its (unique) short description- Specified by:
findByShortDescriptionin interfaceBitstreamFormatDAO- Parameters:
context- DSpace context objectdesc- the short description- Returns:
- the corresponding bitstream format, or
nullif there's no bitstream format with the given short description - Throws:
SQLException- if database error
-
updateRemovedBitstreamFormat
public int updateRemovedBitstreamFormat(Context context, BitstreamFormat deletedBitstreamFormat, BitstreamFormat newBitstreamFormat) throws SQLException - Specified by:
updateRemovedBitstreamFormatin interfaceBitstreamFormatDAO- Throws:
SQLException
-
findNonInternal
- Specified by:
findNonInternalin interfaceBitstreamFormatDAO- Throws:
SQLException
-
findByFileExtension
public List<BitstreamFormat> findByFileExtension(Context context, String extension) throws SQLException - Specified by:
findByFileExtensionin interfaceBitstreamFormatDAO- Throws:
SQLException
-
findAll
Description copied from interface:GenericDAOFetch all persisted instances of a given object type.- Specified by:
findAllin interfaceGenericDAO<BitstreamFormat>- Overrides:
findAllin classAbstractHibernateDAO<BitstreamFormat>- Parameters:
context- The relevant DSpace Context.clazz- the desired type.- Returns:
- list of DAOs of the same type as clazz
- Throws:
SQLException- if database error
-