Package com.avoka.fc.core.dao
Class ClientDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.ClientDao
-
public class ClientDao extends AbstractDao
Provides a DAO for the Client entity.- See Also:
Client
-
-
Field Summary
-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description ClientDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Client>
getActiveClientList()
Return the list of all active clients, sorted by client nameList<Client>
getAllClients()
Return all clients, sorted by client nameClient
getClientByCode(String clientCode)
Return the client with the specified client codeClient
getClientByCodeRefresh(String clientCode)
Return the client with the specified client code.Client
getClientByKey(String clientKey)
Return the client with the specified surrogate keyClient
getClientByName(String clientName)
Return the client with the specified nameClient
getClientByNormalizedCode(String clientCodeNormalized)
Return the client with the specified normalized client codeClient
getClientForPK(Object id)
Return the client with the specified OIDList<Client>
getClientList(String keyword, boolean activeOnly)
Return the list of clients matching a set of search criteriaString
getClientPropertyValue(Client client, String name)
Returns the client property value providing the client and property name.List<Client>
getClientsByPaymentGatewayType(ServiceDefinition paymentService)
Return the list of clients with the specified payment service.List<Client>
getClientsSearch(String value)
Return the list of client whose name, code or description contain the search string, or whose OID matches the search string if it is numericList<Client>
getClientsWithoutKeys()
Return all clients for which no surrogate key is setList<Long>
getNonPurgePolicyList(String dateField)
Gets the client ids for clients that haven't defined purge policy.Long
getTmMonitorClientId()
Return TM Monitor Client ID or null if not definedboolean
isKeystoreRolloverRequired(Client client)
Return true if the client's key store requires rollover.-
Methods 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
-
-
-
-
Method Detail
-
getClientForPK
public Client getClientForPK(Object id)
Return the client with the specified OID- Parameters:
id
- the OID- Returns:
- the matching client, or null if not found
-
getTmMonitorClientId
public Long getTmMonitorClientId()
Return TM Monitor Client ID or null if not defined- Returns:
- TM Monitor Client ID or null if not defined
- Since:
- 5.1.5
-
getClientByName
public Client getClientByName(String clientName)
Return the client with the specified name- Parameters:
clientName
- the client name- Returns:
- the matching client, or null if not found
-
getClientByCode
public Client getClientByCode(String clientCode)
Return the client with the specified client code- Parameters:
clientCode
- the client code- Returns:
- the matching client, or null if not found
-
getClientByCodeRefresh
public Client getClientByCodeRefresh(String clientCode)
Return the client with the specified client code. The query will not use caching to ensure that the result is accurate.- Parameters:
clientCode
- the client code- Returns:
- the matching client, or null if not found
-
getClientByNormalizedCode
public Client getClientByNormalizedCode(String clientCodeNormalized)
Return the client with the specified normalized client code- Parameters:
clientCodeNormalized
- the normalized client code- Returns:
- the matching client, or null if not found
-
getClientsByPaymentGatewayType
public List<Client> getClientsByPaymentGatewayType(ServiceDefinition paymentService)
Return the list of clients with the specified payment service.- Parameters:
paymentService
- the payment gateway service definition (required)- Returns:
- the list of clients with the specified payment service
- Since:
- 4.0.0
-
getClientByKey
public Client getClientByKey(String clientKey)
Return the client with the specified surrogate key- Parameters:
clientKey
- the surrogate key- Returns:
- the matching client, or null if not found
-
getClientList
public List<Client> getClientList(String keyword, boolean activeOnly)
Return the list of clients matching a set of search criteria- Parameters:
keyword
- a search keywordactiveOnly
- whether to return only active clients (if not set, clients won't be filtered by status)- Returns:
- the list of matching clients
-
getClientsWithoutKeys
public List<Client> getClientsWithoutKeys()
Return all clients for which no surrogate key is set- Returns:
- the list of matching clients
-
getActiveClientList
public List<Client> getActiveClientList()
Return the list of all active clients, sorted by client name- Returns:
- the list of active clients
-
getAllClients
public List<Client> getAllClients()
Return all clients, sorted by client name- Returns:
- the list of clients
-
getClientsSearch
public List<Client> getClientsSearch(String value)
Return the list of client whose name, code or description contain the search string, or whose OID matches the search string if it is numeric- Parameters:
value
- the non-empty search string- Returns:
- the list of matching clients
-
getClientPropertyValue
public String getClientPropertyValue(Client client, String name)
Returns the client property value providing the client and property name.- Parameters:
client
- the clientname
- the property name- Returns:
- the client property value
-
getNonPurgePolicyList
public List<Long> getNonPurgePolicyList(String dateField)
Gets the client ids for clients that haven't defined purge policy.- Parameters:
dateField
- the "dateField" parameter for the named query- Returns:
- the non purge policy list
-
isKeystoreRolloverRequired
public boolean isKeystoreRolloverRequired(Client client)
Return true if the client's key store requires rollover.- Parameters:
client
- the client organization- Returns:
- true if the client's key store requires rollover.
-
-