Package com.avoka.fc.core.dao
Class PropertyTypeDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.PropertyTypeDao
-
public class PropertyTypeDao extends AbstractDao
Provides a DAO for the PropertyType entity.- See Also:
PropertyType
-
-
Field Summary
-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description PropertyTypeDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyType
getPropertyByName(String name, String scope)
Return the property type for the given name and scopePropertyType
getPropertyByName(String name, String scope, Object clientId)
Return the property type for the given client, name and scopePropertyType
getPropertyType(String propertyTypeId)
Return the property type with the specified OIDList<PropertyType>
getPropertyTypeList(String clientId, String keyword, String scope)
Return the list of property types matching the specified search criteriaList<PropertyType>
getPropertyTypesByScope(String scope)
Return a list of property types of a given scope, ordered by scope and name.List<PropertyType>
getPropertyTypesForClient(String clientId)
Return property types that are available to the given client (includes global types as well as all types belonging to the client)List<PropertyType>
getUnsetClientPropertyTypes(String clientId)
Return property types of scopePropertyType.SCOPE_Client
that haven't already been defined for the given clientList<PropertyType>
getUnsetPropertyTypesForVersion(String versionId, String clientId)
Return property types that haven't already been defined for the given form and template versionboolean
hasProperty(String name, String scope, String clientId)
Return whether a property type for the given name, scope and client existsvoid
loadDefaultProperties()
Load the set of pre-defined property types.protected void
registerFormPropertyType(String name, String scope, String description, String dataType)
protected void
registerFormPropertyType(String name, String scope, String description, String dataType, boolean readonly)
-
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
-
getPropertyType
public PropertyType getPropertyType(String propertyTypeId)
Return the property type with the specified OID- Parameters:
propertyTypeId
- the OID- Returns:
- the matching property type, or null if not found
-
getPropertyTypesByScope
public List<PropertyType> getPropertyTypesByScope(String scope)
Return a list of property types of a given scope, ordered by scope and name.- Parameters:
scope
- the scope, one ofPropertyType.SCOPES
(optional)- Returns:
- the list of matching property types
-
getPropertyTypeList
public List<PropertyType> getPropertyTypeList(String clientId, String keyword, String scope)
Return the list of property types matching the specified search criteria- Parameters:
clientId
- the OID of the client (optional); note that global property types are always also includedkeyword
- the search keywordscope
- the scope of the property, one ofPropertyType.SCOPES
(optional)- Returns:
- the list of matching property types
-
getPropertyByName
public PropertyType getPropertyByName(String name, String scope)
Return the property type for the given name and scope- Parameters:
name
- the non-empty property namescope
- the scope of the propertyPropertyType.SCOPES
- Returns:
- the property type for the given name and scope
-
getPropertyByName
public PropertyType getPropertyByName(String name, String scope, Object clientId)
Return the property type for the given client, name and scope- Parameters:
name
- the non-empty property namescope
- the scope of the propertyPropertyType.SCOPES
clientId
- OID of the client associated with the property type (optional)- Returns:
- the matching property type
-
getPropertyTypesForClient
public List<PropertyType> getPropertyTypesForClient(String clientId)
Return property types that are available to the given client (includes global types as well as all types belonging to the client)- Parameters:
clientId
- the OID of the client (optional)- Returns:
- the list of matching property types
-
getUnsetClientPropertyTypes
public List<PropertyType> getUnsetClientPropertyTypes(String clientId)
Return property types of scopePropertyType.SCOPE_Client
that haven't already been defined for the given client- Parameters:
clientId
- the valid OID of a client- Returns:
- the list of all unset properties for the client
-
getUnsetPropertyTypesForVersion
public List<PropertyType> getUnsetPropertyTypesForVersion(String versionId, String clientId)
Return property types that haven't already been defined for the given form and template version- Parameters:
versionId
- the valid OID of a template versionclientId
- the valid OID of the form's client- Returns:
- the list of all unset properties for the form and template version
-
hasProperty
public boolean hasProperty(String name, String scope, String clientId)
Return whether a property type for the given name, scope and client exists- Parameters:
name
- the non-empty property namescope
- the scope, one ofPropertyType.SCOPES
clientId
- the OID of the client (optional; if not set, will search for a global property type)- Returns:
- if a property type for the given name and scope exists
-
loadDefaultProperties
public void loadDefaultProperties()
Load the set of pre-defined property types.
-
registerFormPropertyType
protected void registerFormPropertyType(String name, String scope, String description, String dataType)
-
-