Package de.xima.fc.dao.impl
Class AttachmentDao
- java.lang.Object
-
- de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
-
- de.xima.fc.dao.impl.GenericDao<Attachment>
-
- de.xima.fc.dao.impl.AttachmentDao
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<Attachment,Long,IEntityContext>
,IAttachmentDao
,IGenericDao<Attachment>
public class AttachmentDao extends GenericDao<Attachment> implements IAttachmentDao
-
-
Constructor Summary
Constructors Constructor Description AttachmentDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attachment
createByUser(IEntityContext ec, String username, Attachment attachment)
void
deleteByUser(IEntityContext ec, String username, boolean force, Attachment... attachments)
void
deleteByUser(IEntityContext ec, String username, Attachment... attachments)
List<Attachment>
getAllBy(IEntityContext ec, Vorgang vorgang, EAttachmentSource source, String uuid)
Attachment
getByName(IEntityContext ec, Vorgang vorgang, String name)
Attachment
getByUUID(IEntityContext ec, String uuid)
Attachment
getByUUID(IEntityContext ec, String uuid, Vorgang v)
Attachment
getByUUID(IEntityContext ec, UUID uuid)
Returns the attachment with the given UUIDprotected IFCDaoActionHook<Attachment>
getPreActionHook()
long
getUsedFileSize(IEntityContext ec, Mandant mandant)
Attachment
updateByUser(IEntityContext ec, String username, String oldFileName, Attachment attachment)
-
Methods inherited from class de.xima.fc.dao.impl.GenericDao
getEntityRefs, getPostActionHook, read
-
Methods inherited from class de.xima.cmn.dao.AbstractDao
all, bulkDelete, bulkUpdate, cb, checkLockingVersion, cq, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, notifyListener, notifyListener, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao
all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from interface de.xima.fc.dao.interfaces.IGenericDao
getEntityRefs, read
-
-
-
-
Method Detail
-
getAllBy
public List<Attachment> getAllBy(IEntityContext ec, Vorgang vorgang, EAttachmentSource source, String uuid)
- Specified by:
getAllBy
in interfaceIAttachmentDao
-
getByUUID
public Attachment getByUUID(IEntityContext ec, String uuid, Vorgang v)
- Specified by:
getByUUID
in interfaceIAttachmentDao
-
getByName
public Attachment getByName(IEntityContext ec, Vorgang vorgang, String name)
- Specified by:
getByName
in interfaceIAttachmentDao
-
getByUUID
public Attachment getByUUID(IEntityContext ec, String uuid)
- Specified by:
getByUUID
in interfaceIAttachmentDao
-
getByUUID
public Attachment getByUUID(IEntityContext ec, UUID uuid)
Description copied from interface:IAttachmentDao
Returns the attachment with the given UUID- Specified by:
getByUUID
in interfaceIAttachmentDao
- Parameters:
ec
-IEntityContext
to useuuid
-UUID
UUID of the attachment- Returns:
Attachment
for the given UUID
-
deleteByUser
public void deleteByUser(IEntityContext ec, String username, Attachment... attachments)
- Specified by:
deleteByUser
in interfaceIAttachmentDao
-
deleteByUser
public void deleteByUser(IEntityContext ec, String username, boolean force, Attachment... attachments)
- Specified by:
deleteByUser
in interfaceIAttachmentDao
-
updateByUser
public Attachment updateByUser(IEntityContext ec, String username, String oldFileName, Attachment attachment)
- Specified by:
updateByUser
in interfaceIAttachmentDao
-
createByUser
public Attachment createByUser(IEntityContext ec, String username, Attachment attachment)
- Specified by:
createByUser
in interfaceIAttachmentDao
-
getPreActionHook
protected IFCDaoActionHook<Attachment> getPreActionHook()
- Overrides:
getPreActionHook
in classGenericDao<Attachment>
-
getUsedFileSize
public long getUsedFileSize(IEntityContext ec, Mandant mandant)
- Specified by:
getUsedFileSize
in interfaceIAttachmentDao
-
-