Package com.avoka.fc.core.dao
Class VersionPropertyValueDao
java.lang.Object
com.avoka.core.dao.BaseDao
com.avoka.fc.core.dao.AbstractDao
com.avoka.fc.core.dao.VersionPropertyValueDao
Provides a DAO for the VersionMetadataValue 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 TypeMethodDescriptioncreateVersionPropertyValue
(TemplateVersion templateVersion, Form form, PropertyType propertyType, String value) Creates a new VersionPropertyValue for the given form, version and property.createVersionPropertyValue
(TemplateVersion templateVersion, Form form, PropertyType propertyType, String value, String longValue) Deprecated.getClientPropertyValue
(TemplateVersion version, String propertyName) Return the value of a client scope property for the given template version Note: Property names are only unique within a scope.getFormPropertyValue
(TemplateVersion version, String propertyName) Return the value of a form scope property for the given template version Note: Property names are only unique within a scope.getPropertyValue
(TemplateVersion version, String propertyName, String scope) Return the value of a property for the given template version Note: Property names are only unique within a scope.getPropertyValues
(TemplateVersion version, String scope) Return the list of property values for a form version.getPropertyValues
(String templateVersionId) Return the list of property values for a form versiongetTemplateVersionPropertyValues
(TemplateVersion templateVersion) Return the TemplateVersions property value list.getVersionProperties
(String propertyName, String scope) Gets the version properties who have defined the property name and scope.getVersionPropertyValue
(TemplateVersion version, String propertyName) Return the VersionPropertyValue object for the given template version, property name and scope.getVersionPropertyValue
(TemplateVersion version, String propertyName, String scope) Return the VersionPropertyValue object for the given template version, property name and scope.Return the VersionPropertyValue object with the given OIDMethods 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
-
VersionPropertyValueDao
public VersionPropertyValueDao()
-
-
Method Details
-
getVersionPropertyValueFromPk
Return the VersionPropertyValue object with the given OID- Parameters:
id
- the OID- Returns:
- the matching VersionPropertyValue object, or null if none was found
-
getVersionPropertyValue
public VersionPropertyValue getVersionPropertyValue(TemplateVersion version, String propertyName, String scope) Return the VersionPropertyValue object for the given template version, property name and scope. Note: Property names are only unique within a scope. Therefore, the results may be somewhat unpredictable if no scope is specified and multiple values exist (the same holds for properties of type List).- Parameters:
version
- the non-null template versionpropertyName
- a valid property namescope
- the scope (one ofPropertyType.SCOPES
, optional)- Returns:
- the matching VersionPropertyValue, or null if none were found
-
getVersionPropertyValue
Return the VersionPropertyValue object for the given template version, property name and scope. Note: Property names are only unique within a scope. Therefore, the results may be somewhat unpredictable if no scope is specified and multiple values exist (the same holds for properties of type List).- Parameters:
version
- the template versionpropertyName
- a valid property name- Returns:
- the matching VersionPropertyValue, or null if none were found
-
getPropertyValue
Return the value of a property for the given template version Note: Property names are only unique within a scope. Therefore, the results may be somewhat unpredictable if no scope is specified and multiple values exist (the same holds for properties of type List).- Parameters:
version
- the non-null template versionpropertyName
- a valid property namescope
- the scope (one ofPropertyType.SCOPES
, optional)- Returns:
- the value of the property for the version, or null if none was found
-
getClientPropertyValue
Return the value of a client scope property for the given template version Note: Property names are only unique within a scope. Therefore, the results may be somewhat unpredictable if no scope is specified and multiple values exist (the same holds for properties of type List).- Parameters:
version
- the non-null template versionpropertyName
- a valid property name- Returns:
- the value of the property for the version, or null if none was found
-
getFormPropertyValue
Return the value of a form scope property for the given template version Note: Property names are only unique within a scope. Therefore, the results may be somewhat unpredictable if no scope is specified and multiple values exist (the same holds for properties of type List).- Parameters:
version
- the non-null template versionpropertyName
- a valid property name- Returns:
- the value of the property for the version, or null if none was found
-
createVersionPropertyValue
public VersionPropertyValue createVersionPropertyValue(TemplateVersion templateVersion, Form form, PropertyType propertyType, String value, String longValue) Deprecated.longValue no longer exists - usecreateVersionPropertyValue(TemplateVersion, Form, PropertyType, String)
instead. This method may be removed in a future TM version.Creates a new VersionPropertyValue for the given form, version and property. Note that this method will NOT commit the new object. However, because it associates it with the TemplateVersion, Form and PropertyType objects, the new value will be part of the current data context.- Parameters:
templateVersion
- a non-null template versionform
- a non-null formpropertyType
- a non-null property typevalue
- the value to set the property tolongValue
- the value to set the property to (for properties of typePropertyType.DATA_TYPE_CSV
,PropertyType.DATA_TYPE_HTML
,PropertyType.DATA_TYPE_Image
,PropertyType.DATA_TYPE_JSON
orPropertyType.DATA_TYPE_LongText
)- Returns:
- the VersionPropertyValue object with template version, form, property type, name, type and scope set
-
createVersionPropertyValue
public VersionPropertyValue createVersionPropertyValue(TemplateVersion templateVersion, Form form, PropertyType propertyType, String value) Creates a new VersionPropertyValue for the given form, version and property. Note that this method will NOT commit the new object. However, because it associates it with the TemplateVersion, Form and PropertyType objects, the new value will be part of the current data context.- Parameters:
templateVersion
- a non-null template versionform
- a non-null formpropertyType
- a non-null property typevalue
- the value to set the property to- Returns:
- the VersionPropertyValue object with template version, form, property type, name, type and scope set
- Since:
- 5.1.4
-
getPropertyValues
Return the list of property values for a form version- Parameters:
templateVersionId
- the template version OID (required)- Returns:
- the list of property values for the given form and template version
-
getPropertyValues
Return the list of property values for a form version. Values will be grouped by name and ordered by scope descending. This means if any there are 'Form' and 'Client' scope properties with the same name then only the 'Form' scope property will be returned. This only one form property should be intended to support pre-filling form with property values.- Parameters:
version
- the template versionscope
- the scope to search- Returns:
- the list of property values for the given form and template version
-
getVersionProperties
Gets the version properties who have defined the property name and scope.- Parameters:
propertyName
- the property namescope
- the scope- Returns:
- the version properties
- Since:
- 4.0.0
-
getTemplateVersionPropertyValues
Return the TemplateVersions property value list.- Parameters:
templateVersion
- the form template version (required)- Returns:
- the TemplateVersions property value list
- Since:
- 5.1.0
-
createVersionPropertyValue(TemplateVersion, Form, PropertyType, String)
instead.