Package com.avoka.fc.core.dao
Class TemplateVersionDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.TemplateVersionDao
-
public class TemplateVersionDao extends AbstractDao
Provides a DAO for the TemplateVersion entity.- See Also:
TemplateVersion
-
-
Field Summary
-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description TemplateVersionDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyTemplateVersionAttributes(TemplateVersion lastVersion, TemplateVersion newVersion)
Copy the last template version attributes and properties to the new template version.List<TemplateVersion>
getAll()
Return all template versions defined in the system, with no fetch limit and a limited page sizeTemplateVersion
getCurrentTemplateVersionForFormCode(String formCode)
Return the current template version for a specified formList<TemplateVersion>
getDesignMetaDataVersionsToPublish()
Return the list TemplateVersions with Form Design Metadata to publish.List<TemplateVersion>
getLiveCycleTemplates()
Return the list of Template Versions which have a LC Form or LC Receipt and with a active form.TemplateVersion
getTemplateVersionForForm(Form form, String versionNumber)
Return the template version for a specified form and version numberTemplateVersion
getTemplateVersionForFormCode(String formCode, String versionNumber)
Return the template version for a specified form and version numberTemplateVersion
getTemplateVersionForFormNoCache(Form form, String versionNumber)
Return the template version for a specified form and version numberTemplateVersion
getTemplateVersionFromPK(Object id)
Return the template version with the specified OIDList<TemplateVersion>
getTemplateVersionsWithNullMD5()
Return the list of template versions that are missing the md5 hash, with no fetch limit and a limited page sizeTemplateVersion
getVersionForFormDesignVersion(Long formDesignVersionId)
Return the template version with the specified form design version OID.List<TemplateVersion>
getVersionsForForm(String formCode)
Return all versions for a form, sorted ascending by version numberList<TemplateVersion>
getVersionsForPromotion(Form form)
Return the list of template versions that have no promotion log recordsboolean
hasRequiredAttachments(TemplateVersion version)
Return true if the template version has required version attachments.-
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
-
getTemplateVersionFromPK
public TemplateVersion getTemplateVersionFromPK(Object id)
Return the template version with the specified OID- Parameters:
id
- the OID- Returns:
- the matching template version, or null if not found
-
getTemplateVersionForFormCode
public TemplateVersion getTemplateVersionForFormCode(String formCode, String versionNumber)
Return the template version for a specified form and version number- Parameters:
formCode
- the non-empty form code of the form associated with the template versionversionNumber
- the non-empty version number- Returns:
- the matching template version
-
getCurrentTemplateVersionForFormCode
public TemplateVersion getCurrentTemplateVersionForFormCode(String formCode)
Return the current template version for a specified form- Parameters:
formCode
- the non-empty form code of the form associated with the template version- Returns:
- the current template version for the form
-
getTemplateVersionForForm
public TemplateVersion getTemplateVersionForForm(Form form, String versionNumber)
Return the template version for a specified form and version number- Parameters:
form
- the non-null formversionNumber
- the non-empty version number- Returns:
- the matching template version
-
getTemplateVersionForFormNoCache
public TemplateVersion getTemplateVersionForFormNoCache(Form form, String versionNumber)
Return the template version for a specified form and version number- Parameters:
form
- the non-null formversionNumber
- the non-empty version number- Returns:
- the matching template version
- Since:
- 5.1.4
-
getVersionsForForm
public List<TemplateVersion> getVersionsForForm(String formCode)
Return all versions for a form, sorted ascending by version number- Parameters:
formCode
- the form code of the form (required)- Returns:
- the form versions, sorted ascending by version number
- Since:
- 4.1.0
-
getAll
public List<TemplateVersion> getAll()
Return all template versions defined in the system, with no fetch limit and a limited page size- Returns:
- the list of template versions
-
getLiveCycleTemplates
public List<TemplateVersion> getLiveCycleTemplates()
Return the list of Template Versions which have a LC Form or LC Receipt and with a active form.- Returns:
- the list of Template Versions which have a LC Form or LC Receipt and with a active form
-
getTemplateVersionsWithNullMD5
public List<TemplateVersion> getTemplateVersionsWithNullMD5()
Return the list of template versions that are missing the md5 hash, with no fetch limit and a limited page size- Returns:
- the list of matching template versions
-
getVersionsForPromotion
public List<TemplateVersion> getVersionsForPromotion(Form form)
Return the list of template versions that have no promotion log records- Parameters:
form
- the non-null form object for which template versions shall be found- Returns:
- the list of matching template versions
-
copyTemplateVersionAttributes
public void copyTemplateVersionAttributes(TemplateVersion lastVersion, TemplateVersion newVersion)
Copy the last template version attributes and properties to the new template version.- Parameters:
lastVersion
- the latest template version (ordered by version number) copy sourcenewVersion
- the new template version to copy to
-
getVersionForFormDesignVersion
public TemplateVersion getVersionForFormDesignVersion(Long formDesignVersionId)
Return the template version with the specified form design version OID.- Parameters:
formDesignVersionId
- the form design version ID (required)- Returns:
- the template version, or null if none was found
- Since:
- 4.0.0
-
getDesignMetaDataVersionsToPublish
public List<TemplateVersion> getDesignMetaDataVersionsToPublish()
Return the list TemplateVersions with Form Design Metadata to publish.- Returns:
- the list TemplateVersions with Form Design Metadata to publish
- Since:
- 5.1.0
-
hasRequiredAttachments
public boolean hasRequiredAttachments(TemplateVersion version)
Return true if the template version has required version attachments.- Parameters:
version
- the template version (required)- Returns:
- true if the template version has required version attachments.
- Since:
- 17.10.0
-
-