Class ActivitySet

All Implemented Interfaces:
Cacheable, Serializable, ColumnAccessByName, ObjectModel, Persistent

public class ActivitySet extends BaseActivitySet implements Cacheable
The skeleton for this class was autogenerated by Torque on: [Sun Nov 14 20:29:22 KST 2021] You should add additional methods to this class to meet the application requirements. This class will only be generated as long as it does not already exist in the output directory.
  • Field Details

    • ACTIVE

      public static final int ACTIVE
      아직 진행중인 activitySet, Done Field Default Value
      See Also:
  • Constructor Details

    • ActivitySet

      public ActivitySet()
      새로운 ActivitySet 인스턴스를 생성한다.
  • Method Details

    • setUser

      public void setUser(EasyDeskUser user)
      DOCUMENT ME!
      Parameters:
      user - DOCUMENT ME!
    • save

      public void save() throws Exception
      DOCUMENT ME!
      Specified by:
      save in interface Persistent
      Overrides:
      save in class BaseActivitySet
      Throws:
      Exception - DOCUMENT ME!
    • setDone

      public boolean setDone(ActivityMonitor monitor) throws Exception
      ActivitySet 을 종료시킨다.
      Parameters:
      monitor - 종료시킬 root ActivityMonitor
      Returns:
      true/false if done or not
      Throws:
      Exception - 종료 처리 중 오류가 발생한 경우
    • getMonitor

      public ActivityMonitor getMonitor() throws Exception
      이 ActivitySet 의 root ActivityMonitor 를 구한다.
      Returns:
      ActivityMonitor map
      Throws:
      Exception - 조회 중 오류가 발생한 경우
    • setMonitor

      public void setMonitor(ActivityMonitor monitor) throws Exception
      맨 상위 ActivityMonitor 하나만 붙힌다.
      Parameters:
      monitor - root ActivityMonitor
      Throws:
      Exception - 설정 중 오류가 발생한 경우
    • getMonitorId

      public ObjectKey<?> getMonitorId()
      root monitor 의 key 를 구한다. 이 ObjectKey 는 { SimpleKey.keyFor(this.getActivitySetId()), SimpleKey.keyFor(this.getCreatedDate().getTime()) } 이다.
      Returns:
      root monitor 의 key
    • getCreator

      public EasyDeskUser getCreator() throws TorqueException
      getUser() with anonymous email treatment; 만약 user 가 anonymous 이면 attachment 에서 user 의 Email 을 구한다. 따라서 anonymous 이면 user 의 Email 정보가 attachment 에 존재하여야 한다.
      Returns:
      creator
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • hasOnActivity

      public boolean hasOnActivity(Item item, EasyDeskUser user, Attribute attribute) throws TorqueException
      사용자가 item 의 attribute 에 이 transaction 에서 current 값을 가지고 있는지 확인한다.
      Parameters:
      item - 대상 item
      user - 대상 사용자
      attribute - 대상 attribute
      Returns:
      current 값을 가지고 있으면 true
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getLastActivity

      public Activity getLastActivity(Item item, Attribute attribute) throws TorqueException
      DOCUMENT ME!
      Parameters:
      item - DOCUMENT ME!
      attribute - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      TorqueException - DOCUMENT ME!
    • getActivities

      public List<Activity> getActivities(Item item) throws TorqueException
      Returns a list of Activity objects associated with this ActivitySet And this item.
      Parameters:
      item - 대상 item
      Returns:
      activity list
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getActivities

      public List<Activity> getActivities(Attribute attribute) throws TorqueException
      Returns a list of Activity objects associated with this ActivitySet And attribute.
      Parameters:
      attribute - 대상 attribute
      Returns:
      activity list
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getActivities

      public List<Activity> getActivities(Item item, boolean activeOnly) throws TorqueException
      Returns a list of Activity objects associated with this ActivitySet and item by desc order of activityId.
      Parameters:
      item - 대상 item
      activeOnly - active moduleAttribute only
      Returns:
      activity list
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getActivities

      public List<Activity> getActivities(Item item, Attribute attribute) throws TorqueException
      Returns a list of Activity objects associated with this ActivitySet, Item and Attribute by desc order of activityId.
      Parameters:
      item - 대상 item
      attribute - 대상 attribute
      Returns:
      activity list
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getLatestModifiedItem

      public Item getLatestModifiedItem(ItemType itemType, Attribute attribute) throws TorqueException
      이 ActivitySet 을 사용하여 가장 최근에 변경된 아이템을 구한다.
      Parameters:
      itemType - can be null
      attribute - can not be null
      Returns:
      가장 최근에 변경된 item
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getReason

      public String getReason()
      이 ActivitySet 를 실행하게 되는 이유 getAttachment().getData() 와 동일
      Returns:
      String activitySet reason String
    • getCurrentActor

      public EasyDeskUser getCurrentActor() throws TorqueException
      현재 이 ActivitySet 을 사용하고 있는 사용자 일반적으로 getCreator() 와 동일하다.
      Returns:
      currentActor
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • setCurrentActor

      public void setCurrentActor(EasyDeskUser user) throws TorqueException
      ActivitySet 의 creator 와 currentActor 가 다를 경우 예를 들면 User ItemType
      Parameters:
      user - 현재 작업하는 사용자
      Throws:
      TorqueException - 설정 중 오류가 발생한 경우
    • addObserverMap

      public void addObserverMap(Map<OptionRelationship,List<AttributeOption>> observerMap)
      observers 는 OptionRelationshipEnum__PK 에 속하여 있는 Option 들에 한정한다. actvity 가 저장될 때 변경에 관련된 relation 정보를 뒤의 로직에 전달한다.
      Parameters:
      observerMap - { OptionRelationship, attributeOption list } map
    • getObserverMap

      public Map<OptionRelationship,List<AttributeOption>> getObserverMap()
      activity 저장 시 전달할 observer map 을 구한다.
      Returns:
      { OptionRelationship, attributeOption list } map
    • getMethodCache

      public MethodResultCache getMethodCache()
      Specified by:
      getMethodCache in interface Cacheable
      Returns:
      MethodResultCache
    • clear

      public void clear()
      Description copied from interface: Cacheable
      clear this Serializable instance cache
      Specified by:
      clear in interface Cacheable