Package com.avoka.fc.core.dao
Class DeliveryDetailsDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.DeliveryDetailsDao
-
public class DeliveryDetailsDao extends AbstractDao
Provides a DAO for the DeliveryDetails entity.- See Also:
DeliveryDetails
-
-
Field Summary
-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description DeliveryDetailsDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAllDeliveryMethodsString()
Returns a concatenation of all delivery methods, separated by commasString[]
getAvailableDeliveryMethods()
Return the list of delivery methods.List<DeliveryDetails>
getClientWSDeliveryDetailsList(Client client)
Return the web service delivery details defined for a clientList<DeliveryDetails>
getDefaultDeliveryChannelForClient(Client client)
Return the default delivery channel for a client, or null if none is marked as default.DeliveryDetails
getDeliveryDetailForClientAndName(Client client, String name)
Return a specific delivery details entryDeliveryDetails
getDeliveryDetailsForPK(Object id)
Return the delivery details for the given primary key.List<DeliveryDetails>
getDeliveryDetailsList(String clientId)
Return a list of available delivery details ordered by name.List<DeliveryDetails>
getDeliveryDetailsListForClient(String clientId)
Return the list of delivery details for a client, sorted by nameorg.apache.cayenne.query.SelectQuery
getPotentialDeliveryDetailsQueryForForm(String formId)
Return a query that can be used to retrieve the list of delivery details that can be used for a specific formboolean
hasDeliveryDetailsForName(String name)
Return true if there are delivery details available for the given name.-
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
-
getDeliveryDetailsForPK
public DeliveryDetails getDeliveryDetailsForPK(Object id)
Return the delivery details for the given primary key.- Parameters:
id
- the delivery details- Returns:
- the delivery details for the given primary key
-
hasDeliveryDetailsForName
public boolean hasDeliveryDetailsForName(String name)
Return true if there are delivery details available for the given name.- Parameters:
name
- the name of the the delivery details- Returns:
- true if there are delivery details available for the given name
- Since:
- 4.0.0
-
getDeliveryDetailsList
public List<DeliveryDetails> getDeliveryDetailsList(String clientId)
Return a list of available delivery details ordered by name.- Parameters:
clientId
- the client to which the delivery details belong (optional)- Returns:
- a list of available delivery details ordered by name
-
getDeliveryDetailForClientAndName
public DeliveryDetails getDeliveryDetailForClientAndName(Client client, String name)
Return a specific delivery details entry- Parameters:
client
- the non-null client to which the delivery details belongname
- the non-empty name of the delivery details- Returns:
- the delivery details object with the specified name that belongs to the specified client, or null if no such delivery details exist
-
getDefaultDeliveryChannelForClient
public List<DeliveryDetails> getDefaultDeliveryChannelForClient(Client client)
Return the default delivery channel for a client, or null if none is marked as default.- Parameters:
client
- the non-null client to which the delivery details belong- Returns:
- the default delivery details object that belongs to the specified client, or null if no such delivery channel exists. Generally there should be only one entry in the list.
- Since:
- 5.1.0
-
getClientWSDeliveryDetailsList
public List<DeliveryDetails> getClientWSDeliveryDetailsList(Client client)
Return the web service delivery details defined for a client- Parameters:
client
- the client- Returns:
- the list of delivery details for the client that have
DeliveryDetails.METHOD_WEB_SERVICE
as their delivery method
-
getDeliveryDetailsListForClient
public List<DeliveryDetails> getDeliveryDetailsListForClient(String clientId)
Return the list of delivery details for a client, sorted by name- Parameters:
clientId
- the client OID- Returns:
- the list of all delivery details defined for the client
-
getPotentialDeliveryDetailsQueryForForm
public org.apache.cayenne.query.SelectQuery getPotentialDeliveryDetailsQueryForForm(String formId)
Return a query that can be used to retrieve the list of delivery details that can be used for a specific form- Parameters:
formId
- the form OID- Returns:
- the form-specific
SelectQuery
-
getAvailableDeliveryMethods
public String[] getAvailableDeliveryMethods()
Return the list of delivery methods. By default, this includes all methods defined inDeliveryDetails.DELIVERY_METHODS
. However, this can be overwritten by changing the value ofDeploymentProperty.PROPERTY_Supported_Delivery_Methods
.- Returns:
- the list of supported delivery methods
-
getAllDeliveryMethodsString
public String getAllDeliveryMethodsString()
Returns a concatenation of all delivery methods, separated by commas- Returns:
- a string containing all delivery methods defined in
DeliveryDetails.DELIVERY_METHODS
-
-