Package de.xima.fc.dao.impl
Class DatenquelleDao
- java.lang.Object
-
- de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
-
- de.xima.fc.dao.impl.GenericDao<E>
-
- de.xima.fc.dao.impl.MandantDependentBaseDao<Datenquelle>
-
- de.xima.fc.dao.impl.DatenquelleDao
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<Datenquelle,Long,IEntityContext>
,IDatenquelleDao
,IGenericDao<Datenquelle>
,IMandantDependentBaseDao<Datenquelle>
public class DatenquelleDao extends MandantDependentBaseDao<Datenquelle> implements IDatenquelleDao
-
-
Constructor Summary
Constructors Constructor Description DatenquelleDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
findUniqueName(IEntityContext ec, Mandant client, String candidate, Datenquelle exclude)
Returns a name that is not taken by anotherDatenquelle
in the given client other than the excluded data source.Datenquelle
getByUUID(IEntityContext ec, Mandant client, String uuid)
Returns the data source with the given UUID stringDatenquelle
getByUUID(IEntityContext ec, Mandant client, UUID uuid)
Returns the data source with the given UUIDDatenquelle
getDatenquelleById(IEntityContext ec, Mandant mandant, int id)
Liefert den via Namen angefordeten Mandanten-spezifische (nutzerdefinierte) DataStore.Datenquelle
getDatenquelleByName(IEntityContext ec, Mandant mandant, String name)
Liefert den via Namen angefordeten Mandanten-spezifische (nutzerdefinierte) DataStore.Datenquelle
getDatenquelleByNameAndType(IEntityContext ec, Mandant mandant, String name, EDatenquellenTyp datenquellenTyp)
Liefert den via Namen und Typ angefordeten Mandanten-spezifische (nutzerdefinierte) DataStore.List<Datenquelle>
getDatenquellen(IEntityContext ec, Mandant mandant)
Liefert Mandanten-spezifische (nutzerdefinierte) DataStores.Set<de.xima.cmn.dao.interfaces.IEntity<Long>>
getEntityRefs(IEntityContext ec, Datenquelle dataSource)
Returns a set of entities that reference the given entity and depend on it.protected IFCDaoActionHook<Datenquelle>
getPostActionHook()
protected IFCDaoActionHook<Datenquelle>
getPreActionHook()
Datenquelle
getPublicDatasource(IEntityContext ec, Mandant client, String name, EDatenquellenTyp type)
boolean
isNameExisiting(IEntityContext ec, Mandant client, String name)
Returns whether or not the given data source name exists within the given client-
Methods inherited from class de.xima.fc.dao.impl.GenericDao
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
count, findAll, findSingle, read
-
-
-
-
Method Detail
-
getDatenquelleByName
public Datenquelle getDatenquelleByName(IEntityContext ec, Mandant mandant, String name)
Liefert den via Namen angefordeten Mandanten-spezifische (nutzerdefinierte) DataStore.- Specified by:
getDatenquelleByName
in interfaceIDatenquelleDao
- Parameters:
mandant
- der betreffende Mandantname
- der Code zur Identifizierung des gewünschten DataStore- Returns:
- den gefundenen DataStore oder
null
.
-
getDatenquelleByNameAndType
public Datenquelle getDatenquelleByNameAndType(IEntityContext ec, Mandant mandant, String name, EDatenquellenTyp datenquellenTyp)
Liefert den via Namen und Typ angefordeten Mandanten-spezifische (nutzerdefinierte) DataStore.- Specified by:
getDatenquelleByNameAndType
in interfaceIDatenquelleDao
- Parameters:
mandant
- der betreffende Mandantname
- der Code zur Identifizierung des gewünschten DataStoredatenquellenTyp
- Typ der Datenquelle- Returns:
- den gefundenen DataStore oder
null
.
-
getDatenquelleById
public Datenquelle getDatenquelleById(IEntityContext ec, Mandant mandant, int id)
Liefert den via Namen angefordeten Mandanten-spezifische (nutzerdefinierte) DataStore.- Specified by:
getDatenquelleById
in interfaceIDatenquelleDao
- Parameters:
mandant
- der betreffende Mandantid
- der Code zur Identifizierung des gewünschten DataStore- Returns:
- den gefundenen DataStore oder
null
.
-
getDatenquellen
public List<Datenquelle> getDatenquellen(IEntityContext ec, Mandant mandant)
Liefert Mandanten-spezifische (nutzerdefinierte) DataStores.- Specified by:
getDatenquellen
in interfaceIDatenquelleDao
- Parameters:
mandant
- der betreffende Mandant- Returns:
- den gefundenen DataStore oder
null
.
-
getEntityRefs
public Set<de.xima.cmn.dao.interfaces.IEntity<Long>> getEntityRefs(IEntityContext ec, Datenquelle dataSource)
Description copied from interface:IGenericDao
Returns a set of entities that reference the given entity and depend on it. An entity can usually not be deleted if it is still being referenced by and depended on by other entities.- Specified by:
getEntityRefs
in interfaceIGenericDao<Datenquelle>
- Overrides:
getEntityRefs
in classGenericDao<Datenquelle>
- Parameters:
ec
- entity context for database transactions.dataSource
- to get references for.- Returns:
- a set of entities that reference the given entity and depend on it.
-
getPublicDatasource
public Datenquelle getPublicDatasource(IEntityContext ec, Mandant client, String name, EDatenquellenTyp type)
- Specified by:
getPublicDatasource
in interfaceIDatenquelleDao
-
findUniqueName
public String findUniqueName(IEntityContext ec, Mandant client, String candidate, Datenquelle exclude)
Description copied from interface:IDatenquelleDao
Returns a name that is not taken by anotherDatenquelle
in the given client other than the excluded data source. An index will be added to the candidate if necessary.- Specified by:
findUniqueName
in interfaceIDatenquelleDao
- Parameters:
ec
-IEntityContext
to be usedclient
-Mandant
for which a unique data source name should be generatedcandidate
-String
data source name candiate to be made uniqueexclude
-Datenquelle
data source to be excluded from search- Returns:
- unique data source name in the context of the given client
-
isNameExisiting
public boolean isNameExisiting(IEntityContext ec, Mandant client, String name)
Description copied from interface:IDatenquelleDao
Returns whether or not the given data source name exists within the given client- Specified by:
isNameExisiting
in interfaceIDatenquelleDao
- Parameters:
ec
-IEntityContext
to be usedclient
-Mandant
for which to check uniquenessname
- Data source name to check- Returns:
- whether or not the given name is unique
-
getPostActionHook
protected IFCDaoActionHook<Datenquelle> getPostActionHook()
- Overrides:
getPostActionHook
in classGenericDao<Datenquelle>
-
getPreActionHook
protected IFCDaoActionHook<Datenquelle> getPreActionHook()
- Overrides:
getPreActionHook
in classGenericDao<Datenquelle>
-
getByUUID
public Datenquelle getByUUID(IEntityContext ec, Mandant client, String uuid)
Description copied from interface:IDatenquelleDao
Returns the data source with the given UUID string- Specified by:
getByUUID
in interfaceIDatenquelleDao
- Parameters:
ec
-IEntityContext
to useclient
-Mandant
context in which to look for data sourceuuid
-String
UUID of the data source- Returns:
Datenquelle
for the given UUID and client
-
getByUUID
public Datenquelle getByUUID(IEntityContext ec, Mandant client, UUID uuid)
Description copied from interface:IDatenquelleDao
Returns the data source with the given UUID- Specified by:
getByUUID
in interfaceIDatenquelleDao
- Parameters:
ec
-IEntityContext
to useclient
-Mandant
context in which to look for data sourceuuid
-UUID
UUID of the data source- Returns:
Datenquelle
for the given UUID and client
-
-