Class TreeServiceImpl
- java.lang.Object
-
- com.arms.egovframework.javaservice.treeframework.service.TreeServiceImpl
-
- All Implemented Interfaces:
TreeService
- Direct Known Subclasses:
BlogServiceImpl,ClientCaseServiceImpl,DynamicDBMakerImpl,FileRepositoryImpl,FileRepositoryLogImpl,HolidayServiceImpl,JiraIssuePriorityImpl,JiraIssuePriorityLogImpl,JiraIssueResolutionImpl,JiraIssueResolutionLogImpl,JiraIssueStatusCategoryMapImpl,JiraIssueStatusImpl,JiraIssueStatusLogImpl,JiraIssueTypeImpl,JiraIssueTypeLogImpl,JiraProjectImpl,JiraProjectIssueTypePureImpl,JiraProjectLogImpl,JiraProjectPureImpl,JiraServerImpl,JiraServerLogImpl,JiraServerProjectPureImpl,JiraServerPureImpl,MailServiceImpl,NewsletterImpl,PatchnoteServiceImpl,PdServiceDetailImpl,PdServiceImpl,PdServiceLogImpl,PdServicePureImpl,PdServiceVersionImpl,PdServiceVersionLogImpl,ReceiverLogImpl,ReceiverServiceImpl,ReqAddImpl,ReqAddLogImpl,ReqAddPureImpl,ReqAddStatePureImpl,ReqCommentImpl,ReqCommentLogImpl,ReqDifficultyImpl,ReqPriorityImpl,ReqReviewCommentImpl,ReqReviewCommentLogImpl,ReqReviewImpl,ReqReviewLogImpl,ReqStateCategoryImpl,ReqStateCategoryLogImpl,ReqStateImpl,ReqStatusImpl,ReqStatusLogImpl,SalaryLogImpl,SalaryServiceImpl,SchedulerServiceImpl,SenderLogImpl,SenderServiceImpl,WikiServiceImpl
@Service("treeService") public class TreeServiceImpl extends java.lang.Object implements TreeService
-
-
Constructor Summary
Constructors Constructor Description TreeServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends TreeSearchEntity>
TaddNode(T treeSearchEntity)<T extends TreeSearchEntity>
intalterNode(T treeSearchEntity)<T extends TreeSearchEntity>
intalterNodeType(T treeSearchEntity)<T extends TreeSearchEntity>
voidcalculatePosition(T treeSearchEntity, T nodeById, java.util.List<T> childNodesFromNodeByRef, javax.servlet.http.HttpServletRequest request, java.lang.String tableName)<T extends TreeSearchEntity>
voidcutMyself(T nodeById, long spaceOfTargetNode, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById)<T extends TreeSearchEntity>
voidenterMyselfFixLeftRight(long idif, long ldif, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, T treeSearchEntity)<T extends TreeSearchEntity>
voidenterMyselfFromTree(long ref, long c_position, long c_id, long idif, long ldif, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, T treeSearchEntity)<T extends TreeSearchEntity>
voidfixPositionParentIdOfCopyNodes(long insertSeqResult, long position, T treeSearchEntity)<T extends TreeSearchEntity>
java.util.List<T>getChildNode(T treeSearchEntity)<T extends TreeSearchEntity>
java.util.List<T>getChildNodeWithoutPaging(T treeSearchEntity)<T extends TreeSearchEntity>
TgetNode(T treeSearchEntity)<T extends TreeSearchEntity>
java.util.List<T>getNodesWithoutRoot(T treeSearchEntity)<T extends TreeSearchEntity,K,V>
java.util.Map<K,V>getNodesWithoutRootMap(T treeSearchEntity, java.util.function.Function<T,K> key, java.util.function.Function<T,V> value)<T extends TreeSearchEntity>
java.util.List<T>getPaginatedChildNode(T treeSearchEntity)TreeSearchEntity로부터 페이지된 자식 노드 목록을 검색합니다.<T extends TreeSearchEntity>
TmoveNode(T treeSearchEntity, javax.servlet.http.HttpServletRequest request)트리 구조 내에서 노드를 이동합니다.<T extends TreeSearchEntity>
TnewInstance(T treeSearchEntity)파라미터로 넘겨진 인스턴스의 정보를 이용해 리플렉션하여 새로운 인스턴스를 만들어 반환한다.<T extends TreeSearchEntity>
intoverwriteNode(T toEntity, T fromEntity)이 메서드는 한 노드의 속성을 다른 노드의 속성으로 덮어씁니다.<T extends TreeSearchEntity>
longpasteMyselfFromTree(long ref, long idif, long spaceOfTargetNode, long ldif, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, long rightPositionFromNodeByRef, T nodeById)<T extends TreeSearchEntity>
intremoveNode(T treeSearchEntity)This function removes a node from the tree structure.<T extends TreeSearchEntity>
java.util.List<T>saveOrUpdateList(java.util.List<T> entities)<T extends TreeSearchEntity>
java.util.List<java.lang.String>searchNode(T treeSearchEntity)<T extends TreeSearchEntity>
voidstretchLeft(long spaceOfTargetNode, long rightPositionFromNodeByRef, long copy, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, org.hibernate.criterion.DetachedCriteria detachedCriteria)이 메서드는 트리 노드의 왼쪽 값을 주어진 양만큼 확장합니다.<T extends TreeSearchEntity>
voidstretchLeftRightForMyselfFromTree(long spaceOfTargetNode, long rightPositionFromNodeByRef, long copy, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, T treeSearchEntity)이 메서드는 주어진 매개변수를 기반으로 트리 노드의 왼쪽과 오른쪽 값을 확장합니다.<T extends TreeSearchEntity>
voidstretchPositionForMyselfFromTree(java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, T treeSearchEntity)<T extends TreeSearchEntity>
voidstretchRight(long spaceOfTargetNode, long rightPositionFromNodeByRef, long copy, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, org.hibernate.criterion.DetachedCriteria detachedCriteria)이 메서드는 주어진 매개변수를 기반으로 트리 노드의 오른쪽 값을 확장합니다.<T extends TreeSearchEntity>
intupdateField(T treeSearchEntity, java.lang.String field)<T extends TreeSearchEntity>
intupdateNode(T treeSearchEntity)
-
-
-
Method Detail
-
getNode
@Transactional(readOnly=true) public <T extends TreeSearchEntity> T getNode(T treeSearchEntity) throws java.lang.Exception
- Specified by:
getNodein interfaceTreeService- Throws:
java.lang.Exception
-
getChildNodeWithoutPaging
@Transactional(readOnly=true) public <T extends TreeSearchEntity> java.util.List<T> getChildNodeWithoutPaging(T treeSearchEntity) throws java.lang.Exception
- Specified by:
getChildNodeWithoutPagingin interfaceTreeService- Throws:
java.lang.Exception
-
getChildNode
@Transactional(readOnly=true) public <T extends TreeSearchEntity> java.util.List<T> getChildNode(T treeSearchEntity) throws java.lang.Exception
- Specified by:
getChildNodein interfaceTreeService- Throws:
java.lang.Exception
-
getPaginatedChildNode
@Transactional(readOnly=true) public <T extends TreeSearchEntity> java.util.List<T> getPaginatedChildNode(T treeSearchEntity) throws java.lang.Exception
TreeSearchEntity로부터 페이지된 자식 노드 목록을 검색합니다.- Specified by:
getPaginatedChildNodein interfaceTreeService- Type Parameters:
T- TreeSearchEntity의 타입. TreeSearchEntity를 확장해야 합니다.- Parameters:
treeSearchEntity- 자식 노드 목록을 검색할 때 사용되는 TreeSearchEntity 객체.- Returns:
- TreeSearchEntity로부터 검색된 자식 노드 목록.
- Throws:
java.lang.Exception- 검색 과정 중에 오류가 발생할 경우.
-
getNodesWithoutRoot
@Transactional(readOnly=true) public <T extends TreeSearchEntity> java.util.List<T> getNodesWithoutRoot(T treeSearchEntity) throws java.lang.Exception
- Specified by:
getNodesWithoutRootin interfaceTreeService- Throws:
java.lang.Exception
-
getNodesWithoutRootMap
@Transactional(readOnly=true) public <T extends TreeSearchEntity,K,V> java.util.Map<K,V> getNodesWithoutRootMap(T treeSearchEntity, java.util.function.Function<T,K> key, java.util.function.Function<T,V> value) throws java.lang.Exception
- Specified by:
getNodesWithoutRootMapin interfaceTreeService- Throws:
java.lang.Exception
-
searchNode
public <T extends TreeSearchEntity> java.util.List<java.lang.String> searchNode(T treeSearchEntity) throws java.lang.Exception
- Specified by:
searchNodein interfaceTreeService- Throws:
java.lang.Exception
-
addNode
@Transactional(rollbackFor=java.lang.Exception.class, isolation=SERIALIZABLE, propagation=REQUIRED) public <T extends TreeSearchEntity> T addNode(T treeSearchEntity) throws java.lang.Exception- Specified by:
addNodein interfaceTreeService- Throws:
java.lang.Exception
-
overwriteNode
@Transactional(rollbackFor=java.lang.Exception.class, isolation=SERIALIZABLE, propagation=REQUIRED) public <T extends TreeSearchEntity> int overwriteNode(T toEntity, T fromEntity) throws java.lang.Exception이 메서드는 한 노드의 속성을 다른 노드의 속성으로 덮어씁니다.- Specified by:
overwriteNodein interfaceTreeService- Parameters:
toEntity- 속성을 덮어쓸 대상 노드fromEntity- 속성을 가져올 노드- Returns:
- 1: 성공, 그 외: 예외 발생
- Throws:
java.lang.Exception- 데이터베이스 작업 중에 오류 발생
-
stretchLeftRightForMyselfFromTree
public <T extends TreeSearchEntity> void stretchLeftRightForMyselfFromTree(long spaceOfTargetNode, long rightPositionFromNodeByRef, long copy, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, T treeSearchEntity) throws java.lang.Exception
이 메서드는 주어진 매개변수를 기반으로 트리 노드의 왼쪽과 오른쪽 값을 확장합니다. 노드가 추가, 이동, 또는 제거될 때 트리 구조에서 공간을 조정하는 데 사용됩니다.- Parameters:
spaceOfTargetNode- 확장할 공간의 양rightPositionFromNodeByRef- 확장이 시작할 노드의 오른쪽 위치copy- 복사 작업 여부를 나타내는 플래그 (0: 복사, 1: 복사 아님)c_idsByChildNodeFromNodeById- 확장에서 제외할 자식 노드 ID의 컬렉션treeSearchEntity- TreeSearchEntity 클래스의 인스턴스로, 트리 노드를 나타냄- Throws:
java.lang.Exception- 확장 프로세스 중에 오류가 발생할 경우
-
stretchRight
public <T extends TreeSearchEntity> void stretchRight(long spaceOfTargetNode, long rightPositionFromNodeByRef, long copy, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, org.hibernate.criterion.DetachedCriteria detachedCriteria)
이 메서드는 주어진 매개변수를 기반으로 트리 노드의 오른쪽 값을 확장합니다. 노드가 추가, 이동, 또는 제거될 때 트리 구조에서 공간을 조정하는 데 사용됩니다.- Parameters:
spaceOfTargetNode- 확장할 공간의 양rightPositionFromNodeByRef- 확장이 시작할 노드의 오른쪽 위치copy- 복사 작업 여부를 나타내는 플래그 (0: 복사, 1: 복사 아님)c_idsByChildNodeFromNodeById- 확장에서 제외할 자식 노드 ID의 컬렉션detachedCriteria- 확장할 대상 노드를 검색하기 위해 사용되는 DetachedCriteria 객체
-
stretchLeft
public <T extends TreeSearchEntity> void stretchLeft(long spaceOfTargetNode, long rightPositionFromNodeByRef, long copy, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, org.hibernate.criterion.DetachedCriteria detachedCriteria)
이 메서드는 트리 노드의 왼쪽 값을 주어진 양만큼 확장합니다. 트리 구조에서 노드가 추가, 이동, 또는 제거될 때 공간을 조정하는 데 사용됩니다.- Parameters:
spaceOfTargetNode- 확장할 공간의 양rightPositionFromNodeByRef- 확장이 시작할 노드의 오른쪽 위치copy- 복사 작업 여부를 나타내는 플래그 (0: 복사, 1: 복사 아님)c_idsByChildNodeFromNodeById- 확장에서 제외할 자식 노드 ID의 컬렉션detachedCriteria- 확장할 대상 노드를 검색하기 위해 사용되는 DetachedCriteria 객체
-
newInstance
public <T extends TreeSearchEntity> T newInstance(T treeSearchEntity) throws java.lang.Exception
파라미터로 넘겨진 인스턴스의 정보를 이용해 리플렉션하여 새로운 인스턴스를 만들어 반환한다. 리플렉션을 위한 타입 정보를 제공하기 위한 인스턴스- Parameters:
treeSearchEntity-- Returns:
- T extends TreeSearchEntity
- Throws:
java.lang.ClassNotFoundExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.Exception
-
removeNode
@Transactional(rollbackFor=java.lang.Exception.class, isolation=SERIALIZABLE, propagation=REQUIRED) public <T extends TreeSearchEntity> int removeNode(T treeSearchEntity) throws java.lang.ExceptionThis function removes a node from the tree structure.- Specified by:
removeNodein interfaceTreeService- Parameters:
treeSearchEntity- The node to be removed.- Returns:
- 0 if the node is successfully removed, otherwise an exception is thrown.
- Throws:
java.lang.Exception- If an error occurs during the removal process.
-
updateNode
@Transactional(rollbackFor=java.lang.Exception.class, isolation=SERIALIZABLE, propagation=REQUIRED) public <T extends TreeSearchEntity> int updateNode(T treeSearchEntity) throws java.lang.Exception- Specified by:
updateNodein interfaceTreeService- Throws:
java.lang.Exception
-
updateField
@Transactional(rollbackFor=java.lang.Exception.class, isolation=SERIALIZABLE, propagation=REQUIRED) public <T extends TreeSearchEntity> int updateField(T treeSearchEntity, java.lang.String field) throws java.lang.Exception- Specified by:
updateFieldin interfaceTreeService- Throws:
java.lang.Exception
-
saveOrUpdateList
@Transactional(rollbackFor=java.lang.Exception.class, isolation=SERIALIZABLE, propagation=REQUIRED) public <T extends TreeSearchEntity> java.util.List<T> saveOrUpdateList(java.util.List<T> entities) throws java.lang.Exception- Throws:
java.lang.Exception
-
alterNode
@Transactional(rollbackFor=java.lang.Exception.class, isolation=SERIALIZABLE, propagation=REQUIRED) public <T extends TreeSearchEntity> int alterNode(T treeSearchEntity) throws java.lang.Exception- Specified by:
alterNodein interfaceTreeService- Throws:
java.lang.Exception
-
alterNodeType
@Transactional(rollbackFor=java.lang.Exception.class, isolation=SERIALIZABLE, propagation=REQUIRED) public <T extends TreeSearchEntity> int alterNodeType(T treeSearchEntity) throws java.lang.Exception- Specified by:
alterNodeTypein interfaceTreeService- Throws:
java.lang.Exception
-
moveNode
@Transactional(rollbackFor=java.lang.Exception.class, isolation=SERIALIZABLE, propagation=REQUIRED) public <T extends TreeSearchEntity> T moveNode(T treeSearchEntity, javax.servlet.http.HttpServletRequest request) throws java.lang.Exception트리 구조 내에서 노드를 이동합니다.- Specified by:
moveNodein interfaceTreeService- Parameters:
treeSearchEntity- 이동할 노드request- HTTP 요청 객체- Returns:
- 이동된 노드
- Throws:
java.lang.Exception- 이동 중에 오류가 발생할 경우
-
enterMyselfFromTree
public <T extends TreeSearchEntity> void enterMyselfFromTree(long ref, long c_position, long c_id, long idif, long ldif, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, T treeSearchEntity) throws java.lang.Exception
- Throws:
java.lang.Exception
-
enterMyselfFixLeftRight
public <T extends TreeSearchEntity> void enterMyselfFixLeftRight(long idif, long ldif, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, T treeSearchEntity)
-
fixPositionParentIdOfCopyNodes
public <T extends TreeSearchEntity> void fixPositionParentIdOfCopyNodes(long insertSeqResult, long position, T treeSearchEntity) throws java.lang.Exception
- Throws:
java.lang.Exception
-
pasteMyselfFromTree
public <T extends TreeSearchEntity> long pasteMyselfFromTree(long ref, long idif, long spaceOfTargetNode, long ldif, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, long rightPositionFromNodeByRef, T nodeById) throws java.lang.Exception
- Throws:
java.lang.Exception
-
stretchPositionForMyselfFromTree
public <T extends TreeSearchEntity> void stretchPositionForMyselfFromTree(java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById, T treeSearchEntity) throws java.lang.Exception
- Throws:
java.lang.Exception
-
calculatePosition
public <T extends TreeSearchEntity> void calculatePosition(T treeSearchEntity, T nodeById, java.util.List<T> childNodesFromNodeByRef, javax.servlet.http.HttpServletRequest request, java.lang.String tableName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
cutMyself
public <T extends TreeSearchEntity> void cutMyself(T nodeById, long spaceOfTargetNode, java.util.Collection<java.lang.Long> c_idsByChildNodeFromNodeById) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-