Package com.avoka.fc.core.dao
Class ServiceConnectionDao
java.lang.Object
com.avoka.core.dao.BaseDao
com.avoka.fc.core.dao.AbstractDao
com.avoka.fc.core.dao.ServiceConnectionDao
Provides a DAO for the ServiceConnection entity.
- See Also:
-
Field Summary
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canCreateServiceConnection
(Client targetClient, String name) Check whether a service connection with the specified client and name can be created without conflict.getServiceConnection
(Client client, String name) Return the service connection for the given service name and client (or the global service connection if client is null).Deprecated.Return the service connection with the specified OIDReturn the list of all service connections, ordered by name and clientgetServiceConnectionList
(Client client) Returns a List of service connection which include only the global service connection and the connections belonging to the organisation.getServiceConnectionList
(String clientId, String keyword, boolean clientOnly) Return list of service connections matching the given search criteriagetServiceConnectionWithFallback
(Client client, String name) Return the service connection for the given service name and client (or the global service connection if clientId is null).boolean
hasServiceConnection
(Client client, String name) Return whether there is a service connection for the given service nameboolean
Deprecated.Connection names are no longer unique.void
Load the pre-defined service connectionsMethods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
Constructor Details
-
ServiceConnectionDao
public ServiceConnectionDao()
-
-
Method Details
-
getServiceConnectionForPK
Return the service connection with the specified OID- Parameters:
id
- the OID- Returns:
- the matching service connection, or null if not found
-
getServiceConnection
Return the service connection for the given service name and client (or the global service connection if client is null).- Parameters:
client
- the client (optional; if not set, only global service definitions will be considered)name
- the non-null service name- Returns:
- the global/client service connection for the given name
- Since:
- 5.0.0
-
getServiceConnectionWithFallback
Return the service connection for the given service name and client (or the global service connection if clientId is null).- Parameters:
client
- theclient (optional; if not set, only global service definitions will be considered)name
- the service connection name (required)- Returns:
- the global/client service connection for the given name
- Since:
- 5.0.0
-
getServiceConnectionList
Return the list of all service connections, ordered by name and client- Returns:
- the list of service connections
-
hasServiceConnection
Return whether there is a service connection for the given service name- Parameters:
client
- the client (optional; if not set, only global service connections will be considered)name
- the non-null service connection name- Returns:
- true if there is a service connection with the given name
- Since:
- 5.0.0
-
canCreateServiceConnection
Check whether a service connection with the specified client and name can be created without conflict. Conflicts occur when a service connection with the same name already exists on the global level (if targetClient was specified) or for any client (if targetClient was null) If this method returns false, this means that the specified name/client combination is not valid and cannot be used for a service connection. NOTE: This method does not check if a service connection with the specified name and client already exists. It only checks is such a service connection is theoretically possible.- Parameters:
targetClient
- the client with which the new service connection will be associated (optional; leave it null to denote a global service connection)name
- the desired service connection name (required)- Returns:
- true if such a service connection can be created, false if a conflict was found
- Since:
- 5.0.0
-
getServiceConnectionList
public List<ServiceConnection> getServiceConnectionList(String clientId, String keyword, boolean clientOnly) Return list of service connections matching the given search criteria- Parameters:
clientId
- the client idkeyword
- the search keywordclientOnly
- the flag to show only client scope services- Returns:
- the list of matching service connections ordered by name and client code
-
getServiceConnectionList
Returns a List of service connection which include only the global service connection and the connections belonging to the organisation.- Parameters:
client
- the organisation of the service connections requested- Returns:
- List of service connection which include only the global service connection and the connections belonging to the organisation.
- Since:
- 18.11.0
-
loadDefaultConnections
public void loadDefaultConnections()Load the pre-defined service connections -
getServiceConnectionForName
Deprecated.Return the service connection for the given service name- Parameters:
name
- the non-null service name- Returns:
- the service connection for the given name
-
hasServiceConnectionForName
Deprecated.Connection names are no longer unique. UsehasServiceConnection(Client, String)
instead.Return whether there is a service connection for the given service name- Parameters:
name
- the non-null service connection name (required)- Returns:
- true if there is a service connection with the given name
-
getServiceConnection(Client, String)
orgetServiceConnectionWithFallback(Client, String)
instead