public class MandantRessourceDao extends MandantDependentBaseDao<MandantRessource> implements IMandantRessourceDao
Constructor and Description |
---|
MandantRessourceDao() |
Modifier and Type | Method and Description |
---|---|
MandantRessource |
create(IEntityContext ec,
String name,
byte[] daten,
String userName,
String fileName,
Mandant mandant) |
MandantRessource |
create(IEntityContext ec,
String name,
byte[] daten,
String userName,
String fileName,
String resourceDescription,
Mandant mandant) |
String |
findUniqueName(IEntityContext ec,
Mandant client,
String candidate,
MandantRessource exclude)
Returns a name that is not taken by another
MandantRessource in the given client. |
List<MandantRessource> |
getAllByMandant(Mandant mandant,
IEntityContext ec) |
List<MandantRessource> |
getAllByProject(IEntityContext ec,
Projekt project)
Returns all client resources that are being used by the given project
|
MandantRessource |
getByName(Mandant mandant,
String name,
IEntityContext ec) |
MandantRessource |
getByUUID(IEntityContext ec,
Mandant client,
String uuid)
Returns the client resource for the given UUID string and client
|
MandantRessource |
getByUUID(IEntityContext ec,
Mandant client,
UUID uuid)
Returns the client resource for the given UUID and client
|
Set<de.xima.cmn.dao.interfaces.IEntity<Long>> |
getEntityRefs(IEntityContext ec,
MandantRessource resource) |
protected IFCDaoActionHook<MandantRessource> |
getPostActionHook() |
protected IFCDaoActionHook<MandantRessource> |
getPreActionHook() |
long |
getUsedFileSize(IEntityContext ec,
Mandant mandant) |
boolean |
isNameExisiting(IEntityContext ec,
Mandant client,
String name)
Returns whether or not the given client resource name exists within the given client
|
MandantRessource |
update(IEntityContext ec,
byte[] daten,
String userName,
String fileName,
MandantRessource res) |
read
all, bulkDelete, bulkUpdate, cb, checkLockingVersion, cq, create, create, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, notifyListener, notifyListener, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
read
all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
public Set<de.xima.cmn.dao.interfaces.IEntity<Long>> getEntityRefs(IEntityContext ec, MandantRessource resource)
getEntityRefs
in interface IGenericDao<MandantRessource>
getEntityRefs
in class GenericDao<MandantRessource>
public MandantRessource getByName(Mandant mandant, String name, IEntityContext ec)
getByName
in interface IMandantRessourceDao
public MandantRessource getByUUID(IEntityContext ec, Mandant client, String uuid)
IMandantRessourceDao
getByUUID
in interface IMandantRessourceDao
ec
- IEntityContext
to useclient
- Mandant
context in which to look for resourceuuid
- String
UUID string of the resourceMandantRessource
for the given UUID and clientpublic MandantRessource getByUUID(IEntityContext ec, Mandant client, UUID uuid)
IMandantRessourceDao
getByUUID
in interface IMandantRessourceDao
ec
- IEntityContext
to useclient
- Mandant
context in which to look for resourceuuid
- UUID
UUID of the resourceMandantRessource
for the given UUID and clientpublic String findUniqueName(IEntityContext ec, Mandant client, String candidate, MandantRessource exclude)
IMandantRessourceDao
MandantRessource
in the given client. An index will be added to
the candidate if necessary.findUniqueName
in interface IMandantRessourceDao
ec
- IEntityContext
to be usedclient
- Mandant
for which a unique client resource name should be generatedcandidate
- String
client resource name candiate to be made uniqueexclude
- MandantRessource
client resource to be excluded from the searchpublic boolean isNameExisiting(IEntityContext ec, Mandant client, String name)
IMandantRessourceDao
isNameExisiting
in interface IMandantRessourceDao
ec
- IEntityContext
to be usedclient
- Mandant
for which to check uniquenessname
- String
client resource name to checkpublic List<MandantRessource> getAllByMandant(Mandant mandant, IEntityContext ec)
getAllByMandant
in interface IMandantRessourceDao
public List<MandantRessource> getAllByProject(IEntityContext ec, Projekt project)
IMandantRessourceDao
getAllByProject
in interface IMandantRessourceDao
ec
- IEntityContext
to be usedproject
- Projekt
project to search for client resourcesList
of MandantRessource
s that are being used by the projectprotected IFCDaoActionHook<MandantRessource> getPreActionHook()
getPreActionHook
in class GenericDao<MandantRessource>
protected IFCDaoActionHook<MandantRessource> getPostActionHook()
getPostActionHook
in class GenericDao<MandantRessource>
public MandantRessource create(IEntityContext ec, String name, byte[] daten, String userName, String fileName, String resourceDescription, Mandant mandant)
create
in interface IMandantRessourceDao
public MandantRessource create(IEntityContext ec, String name, byte[] daten, String userName, String fileName, Mandant mandant)
create
in interface IMandantRessourceDao
public MandantRessource update(IEntityContext ec, byte[] daten, String userName, String fileName, MandantRessource res)
update
in interface IMandantRessourceDao
public long getUsedFileSize(IEntityContext ec, Mandant mandant)
getUsedFileSize
in interface IMandantRessourceDao
Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.