Package de.xima.fc.dao.interfaces
Interface IProjektRessourceDao
-
- All Superinterfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<ProjektRessource,Long,IEntityContext>,IGenericDao<ProjektRessource>
- All Known Implementing Classes:
ProjektRessourceDao
public interface IProjektRessourceDao extends IGenericDao<ProjektRessource>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description ProjektRessourcecreate(IEntityContext ec, String name, byte[] daten, String userName, String fileName, Mandant mandant, Projekt projekt)ProjektRessourcecreate(IEntityContext ec, String name, byte[] daten, String userName, String fileName, String resourceDescription, Mandant mandant, Projekt projekt)StringfindUniqueName(IEntityContext ec, Projekt project, String candidate, ProjektRessource exclude)Returns a name that is not taken by anotherProjektRessourcein the given project.List<ProjektRessource>getAllByExtension(IEntityContext ec, Projekt project, Iterable<String> extensions)default List<ProjektRessource>getAllByProjekt(Projekt projekt, IEntityContext ec)Deprecated.List<ProjektRessource>getAllByProjekt(IEntityContext ec, Projekt projekt)default ProjektRessourcegetByName(Projekt projekt, String name, IEntityContext ec)Deprecated.ProjektRessourcegetByName(IEntityContext ec, Projekt projekt, String name)ProjektRessourcegetByUUID(IEntityContext ec, Projekt project, String uuid)Returns the project resource with the given UUID stringProjektRessourcegetByUUID(IEntityContext ec, Projekt project, UUID uuid)Returns the project resource with the given UUIDlonggetUsedFileSize(IEntityContext ec, Mandant mandant)booleanisNameExisiting(IEntityContext ec, Projekt project, String name)Returns whether or not the given project resource name exists within the given projectProjektRessourceupdate(IEntityContext ec, byte[] daten, String userName, String fileName, ProjektRessource res)-
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
count, findAll, findSingle, getEntityRefs, read
-
-
-
-
Method Detail
-
getByName
@Deprecated default ProjektRessource getByName(Projekt projekt, String name, IEntityContext ec)
Deprecated.
-
getByName
ProjektRessource getByName(IEntityContext ec, Projekt projekt, String name)
-
getByUUID
ProjektRessource getByUUID(IEntityContext ec, Projekt project, String uuid)
Returns the project resource with the given UUID string- Parameters:
ec-IEntityContextto useproject-Projektcontext in which to look for resourceuuid-StringUUID string of the resource- Returns:
ProjektRessourcefor the given UUID and project- Since:
- 6.1.0
-
getByUUID
ProjektRessource getByUUID(IEntityContext ec, Projekt project, UUID uuid)
Returns the project resource with the given UUID- Parameters:
ec-IEntityContextto useproject-Projektcontext in which to look for resourceuuid-UUIDUUID of the resource- Returns:
ProjektRessourcefor the given UUID and project- Since:
- 6.1.0
-
getAllByProjekt
@Deprecated default List<ProjektRessource> getAllByProjekt(Projekt projekt, IEntityContext ec)
Deprecated.
-
getAllByProjekt
List<ProjektRessource> getAllByProjekt(IEntityContext ec, Projekt projekt)
-
findUniqueName
String findUniqueName(IEntityContext ec, Projekt project, String candidate, ProjektRessource exclude)
Returns a name that is not taken by anotherProjektRessourcein the given project. An index will be added to the candidate if necessary.- Parameters:
ec-IEntityContextto be usedproject-Projektfor which a unique project resource name should be generatedcandidate-Stringproject resource name candidate to be made uniqueexclude-ProjektRessourceclient resource to be excluded from the search. May benullor may be an existing resource when updating.- Returns:
- unique project resource name in the context of the given client
- Since:
- 8.0.0
-
isNameExisiting
boolean isNameExisiting(IEntityContext ec, Projekt project, String name)
Returns whether or not the given project resource name exists within the given project- Parameters:
ec-IEntityContextto be usedproject-Projektfor which to check uniquenessname-Stringproject resource name to check- Returns:
- whether or not the given name is unique
- Since:
- 8.0.0
-
create
ProjektRessource create(IEntityContext ec, String name, byte[] daten, String userName, String fileName, Mandant mandant, Projekt projekt)
-
create
ProjektRessource create(IEntityContext ec, String name, byte[] daten, String userName, String fileName, String resourceDescription, Mandant mandant, Projekt projekt)
-
update
ProjektRessource update(IEntityContext ec, byte[] daten, String userName, String fileName, ProjektRessource res)
-
getUsedFileSize
long getUsedFileSize(IEntityContext ec, Mandant mandant)
-
getAllByExtension
List<ProjektRessource> getAllByExtension(IEntityContext ec, Projekt project, Iterable<String> extensions)
- Parameters:
ec- Current entity context for accessing the database.project- Project for which to fetch resources.extensions- Extensions to search for.- Returns:
- All project resources that belong to the given project and have one of the given extensions. When no extension is given, an empty list is returned.
-
-