@PermitAll public class JpaModelManagementDao extends com.whitestein.lsps.common.jpa.AbstractJpaEntityDao<Module> implements ModelManagementDao
Constructor and Description |
---|
JpaModelManagementDao()
Creates new instance.
|
JpaModelManagementDao(javax.persistence.EntityManager em)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addModule(Module module)
Adds a module.
|
void |
addProcess(Process process)
Adds a process.
|
void |
addProcessElement(ProcessElement processElement)
Adds a process element.
|
void |
addProcessRelationship(ProcessRelationship processRelationship)
Adds a process relationship.
|
List<Module> |
findImportingModules(long moduleId)
Returns all modules which import the given module.
|
Module |
findModuleByHash(String hash)
Returns module with the given hash.
|
Module |
findModuleById(long id)
Returns module for given id or null if module with given id does not exist.
|
protected javax.persistence.EntityManager |
getEntityManager() |
Module |
getLatestModule(String name)
Returns the latest module with a given name.
|
List<Module> |
getLatestModules(boolean ignoreVersion)
Returns the latest modules.
|
List<Module> |
getLatestModulesWithName(boolean ignoreVersion,
String name)
Returns the latest modules with the name.
|
long |
getModuleCount(ModuleCriteria criteria)
Returns a count of module according to a given criteria.
|
ModuleEntry |
getModuleEntry(Long entryId)
Returns module entry for given id.
|
QueryResult<Module> |
getModules(ModuleCriteria criteria)
Returns all models according to given criteria
|
ModuleEntry |
getResourceContent(long moduleId,
String filename)
Returns module entry content given
moduleId and filename . |
Long |
getResourceContentId(long moduleId,
String filename)
Returns resource content id for the given module id and filename.
|
List<Long> |
getUnloadedModuleIds()
Returns ids of unloaded modules.
|
void |
remove(ProcessRelationship rel) |
void |
setCompatibilityVersion(Collection<Long> moduleIds,
String version)
Updates compatibility version.
|
clear, contains, findById, findById, flush, getColName, getEntityClass, getEntityName, getReferenceById, merge, persist, refresh, refresh, remove, setEntityClass, setLockMode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public JpaModelManagementDao()
public JpaModelManagementDao(javax.persistence.EntityManager em)
em
- public Module findModuleByHash(String hash)
ModelManagementDao
findModuleByHash
in interface ModelManagementDao
Module
or null if not foundpublic void addModule(Module module)
ModelManagementDao
addModule
in interface ModelManagementDao
public void addProcess(Process process)
ModelManagementDao
addProcess
in interface ModelManagementDao
public void addProcessElement(ProcessElement processElement)
ModelManagementDao
addProcessElement
in interface ModelManagementDao
public void addProcessRelationship(ProcessRelationship processRelationship)
ModelManagementDao
addProcessRelationship
in interface ModelManagementDao
public void remove(ProcessRelationship rel)
remove
in interface ModelManagementDao
public Module findModuleById(long id)
ModelManagementDao
findModuleById
in interface ModelManagementDao
id
- module idpublic Long getResourceContentId(long moduleId, String filename)
ModelManagementDao
getResourceContentId
in interface ModelManagementDao
public ModuleEntry getResourceContent(long moduleId, String filename)
ModelManagementDao
moduleId
and filename
.getResourceContent
in interface ModelManagementDao
moduleId
and filename
public ModuleEntry getModuleEntry(Long entryId)
ModelManagementDao
getModuleEntry
in interface ModelManagementDao
public QueryResult<Module> getModules(ModuleCriteria criteria)
ModelManagementDao
getModules
in interface ModelManagementDao
Module
public long getModuleCount(ModuleCriteria criteria)
ModelManagementDao
getModuleCount
in interface ModelManagementDao
public List<Module> findImportingModules(long moduleId)
ModelManagementDao
findImportingModules
in interface ModelManagementDao
public List<Module> getLatestModules(boolean ignoreVersion)
ModelManagementDao
getLatestModules
in interface ModelManagementDao
public List<Module> getLatestModulesWithName(boolean ignoreVersion, String name)
ModelManagementDao
getLatestModulesWithName
in interface ModelManagementDao
protected javax.persistence.EntityManager getEntityManager()
public List<Long> getUnloadedModuleIds()
ModelManagementDao
getUnloadedModuleIds
in interface ModelManagementDao
public void setCompatibilityVersion(Collection<Long> moduleIds, String version)
ModelManagementDao
setCompatibilityVersion
in interface ModelManagementDao
public Module getLatestModule(String name)
ModelManagementDao
getLatestModule
in interface ModelManagementDao
null
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.