EN · DE · RU · FR · ES

#548: TaskTree.kt

projectforge-business/src/main/java/org/projectforge/business/task/TaskTree.kt Type: Kotlin Class · Package: org.projectforge.business.task · Source: projectforge-business/src/main/java/org/projectforge/business/task/TaskTree.kt 934 lines · 657 code · 205 comments · 72 blank
Kotlin Class implementing TaskTree.

Annotations

@Service

Properties

PropertyDeclaration
accessDaoAccessDao
auftragsCacheAuftragsCache
auftragDaoAuftragDao
kostCacheKostCache
persistenceServicePfPersistenceService
projektDaoProjektDao
taskDaoTaskDao
timesheetDaoTimesheetDao
timeOfLastModificationLong = 0
taskMapmutableMapOf()
rootTaskNode? = null
orderPositionReferencesMap>? = null
orderPositionReferencesDirtytrue
rootTaskNodeTaskNode
nodeTaskNode()
parentgetTaskNodeById(task.parentTaskId)
timesheetTimesheetDO()
bookabletimesheetDao.checkTaskBookable(
taskNodegetTaskNodeById(taskId) ?: return EMPTY_LIST
resultListgetPathToRoot(taskId)

Functions

FunctionParametersReturn
postConstructUnit
addTaskNodenode: TaskNode, parent: TaskNode?TaskNode
addTaskNodetask: TaskDOTaskNode
getPathtaskId: Long?, ancestorTaskId: Long?List
getPathToRoottaskId: Long?List
getAncestorTaskIstaskId: Long?MutableList
getAncestorAndDescendantTaskIstaskId: Long?, includeSelf: BooleanList
getDescendantTaskIdstaskId: Long?, includeSelf: BooleanList
getDescendantstaskId: Long?, includeSelf: BooleanList
addDescendantsresultList: MutableList, node: TaskNodeUnit
getTaskNodeByIdtaskId: Long?, checkRefresh: Boolean = trueTaskNode?
getTaskByIdid: Long?TaskDO?
getTaskIfNotInitializedtask: TaskDO?TaskDO?
getProjekttaskId: Long?ProjektDO?
internalSetProjecttaskId: Long, projekt: ProjektDO?Unit

Architecture Analysis

Resides in projectforge-business, the core module containing domain logic, services, and persistence. Typically annotated with @Service or @Component, managed by the Spring IoC container with dependency injection.

Git History

CommitWhat changed
01d4805fdfRefactor: Improve concurrency and defensive checks for task hierarchy
868d6abb752025 -> 2026
6a32032d65Hibernate.isInitialized(obj) -> HibernateUtils.isFullyInitialized(obj). Some lazy objects of e.g. ManyToOne columns are not fully loaded but Hibernate.isInitialized() returns true.
63081666f6Source file headers: 2024-> 2025.
5f9bbfbd37Fix typos in projectforge-business directory
9625305236TaskTree: circular dependencies fixed. JacksonConfiguration: deserialization errors on java.util.Date fixed (UTC).
50c3b7b46eMigration stuff in progress... (all tests of all packages: OK).
4942c854d9Migration stuff in progress...
ae2c04ee02Migration stuff in progress... (all tests of all packages: OK).
b810d1c781Migration stuff in progress... (all tests of all packages: OK).
567ca70cd5Migration in progress... spring.datasource.hikari.auto-commit=false
f31e8064eaMigration stuff in progress...
cb5cd5d3d9Migration stuff in progress...
2e98398916Migration stuff in progress...
ba2479571aMigration stuff in progress...
b3293f0cc0PersistenceService/Context: stats handling improved.
87dd5b87c3AuftragsCache refactored, migration stuff... (all tests OK)
1b50060c3aBaseDao: renamed: get -> find, save -> insert, getList -> select, load -> select
87aaf6a5a5Migration stuff in progress... BaseDao refactored (not yet finished) internal* methods renamed.
9408b59d72Migration stuff in progress...
a6edf511e4Migration stuff in progress... PersistenceThreadLocalStats
3aeda5ef5aBig change: all save|update|...InTrans renamed (InTrans removed). PfPesistenceContext as param not needed anymore (ThreadLocal is used instead). (all tests of all packages: OK).
1564553d80Migration stuff in progress...
c7b6e72ad6Migration stuff in progress... (all tests of all packages: OK).
e66d5f5f7cMigration stuff in progress... TaskTree -> Kotlin and runs now in isolated entity manager