Class QueryResult

java.lang.Object
com.easydesk.util.word.QueryResult
All Implemented Interfaces:
Serializable

public class QueryResult extends Object implements Serializable
This class is created by the ItemSearch object to contain a single result. It represents a row on the ItemList.vm screen. It is mostly a data structure with some additional functionality to format a multivalued attribute as CSV. Emblem, Scope 는 특별 처리
Author:
조 영 호
See Also:
  • Constructor Details

    • QueryResult

      protected QueryResult()
      Ctor. Should only be called by an ItemSearch.
  • Method Details

    • getItem

      public Item getItem()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getItemId

      public final String getItemId()
      Get the ItemId value.
      Returns:
      the ItemId value.
    • setItemId

      public final void setItemId(String newItemId)
      Set the ItemId value.
      Parameters:
      newItemId - The new ItemId value.
    • getIdPrefix

      public final String getIdPrefix()
      Get the IdPrefix value.
      Returns:
      the IdPrefix value.
    • setIdPrefix

      public final void setIdPrefix(String newIdPrefix)
      Set the IdPrefix value.
      Parameters:
      newIdPrefix - The new IdPrefix value.
    • getIdCount

      public final String getIdCount()
      Get the IdCount value.
      Returns:
      the IdCount value.
    • setIdCount

      public final void setIdCount(String newIdCount)
      Set the IdCount value.
      Parameters:
      newIdCount - The new IdCount value.
    • getUniqueId

      public final String getUniqueId()
      Combines getIdPrefix() and getIdCount()
    • setCreatedBy

      public final void setCreatedBy(Long createdBy)
      DOCUMENT ME!
      Parameters:
      createdBy - DOCUMENT ME!
    • getCreatedBy

      public final Long getCreatedBy()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • setCreatedDate

      public final void setCreatedDate(Date created)
      DOCUMENT ME!
      Parameters:
      created - DOCUMENT ME!
    • getCreatedDate

      public final Date getCreatedDate()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • setModifiedBy

      public void setModifiedBy(Long modified)
      DOCUMENT ME!
      Parameters:
      modified - DOCUMENT ME!
    • getModifiedBy

      public Long getModifiedBy()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • setModifiedDate

      public void setModifiedDate(Date modifiedDate)
      DOCUMENT ME!
      Parameters:
      modifiedDate - DOCUMENT ME!
    • getModifiedDate

      public Date getModifiedDate()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getLastActivitySetTypeId

      public Integer getLastActivitySetTypeId()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • setLastActivitySetTypeId

      public void setLastActivitySetTypeId(Integer typeId)
      DOCUMENT ME!
      Parameters:
      typeId - DOCUMENT ME!
    • getAttributeValues

      public final List getAttributeValues()
      Get the AttributeValues value.
      Returns:
      the AttributeValues value.
    • getAttributeValuesAsCSV

      public final List getAttributeValuesAsCSV()
      Get the AttributeValues value as CSV. 미리 parse 가 되어 있어야 한다.
      Returns:
      the AttributeValues value.
    • getAttributeValuesAsCSV

      public final List getAttributeValuesAsCSV(List preferences, Format format)
      preferences 가 주어지면 Emblem 과 SystemUniqueId 는 별도 처리한다. 이 Method 에서는 두가지의 특별한 작업을 한다. 하나는 입력 preferences 의 ModuleUserAttribute 에는 존재하지만 목록보기에서 제외 처리하는 것과 ModuleUserAttribute 에는 존재하지 않지만 목록보기에 추가 처리하는 것과 전자는 AttributeEnum.Emblem.getId(), AttributeEnum.PrimaryKey.getId(), AttributeEnum.Scope.getId() 로 별도의 Method 를 통하여 접속이 가능하도록 하였고 후자는 AttributePeer.ACTIVITY_ATTRIBUTES 로 별도의 Method 및 List 로 도 접속이 가능하도록 한다.
      Parameters:
      preferences -
      format - if null than ignore formatting
      Returns:
      the AttributeValues value.
    • setAttributeValues

      public final void setAttributeValues(List newAttributeValues)
      Set the AttributeValues value.
      Parameters:
      newAttributeValues - The new AttributeValues value.
    • getModuleId

      public final Long getModuleId()
      Get the ModuleId value.
      Returns:
      the ModuleId value.
    • setModuleId

      public final void setModuleId(Long newModuleId)
      Set the ModuleId value.
      Parameters:
      newModuleId - The new ModuleId value.
    • getItemTypeId

      public final Integer getItemTypeId()
      Get the ItemTypeId value.
      Returns:
      the ItemTypeId value.
    • setItemTypeId

      public final void setItemTypeId(Integer newItemTypeId)
      Set the ItemTypeId value.
      Parameters:
      newItemTypeId - The new ItemTypeId value.
    • getContentId

      public final String getContentId()
      ContentId 를 구한다.
    • getEmblem

      public final String getEmblem()
      Emblem 은 db 에 원본 이미지의 full 경로가 저장되고 있다.
    • getScope

      public final String[] getScope()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getLastAction

      public final String getLastAction(Locale locale)
      아이템의 최종 행동을 보인다. verbose list 에만 적용
      Parameters:
      locale -
    • getCreatedByUser

      public final EasyDeskUser getCreatedByUser() throws TorqueException
      FOR CACHE
      Throws:
      TorqueException
    • getModifiedByUser

      public final EasyDeskUser getModifiedByUser() throws TorqueException
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      TorqueException
    • getActivitySetType

      public final ActivitySetType getActivitySetType() throws TorqueException
      Get the Attribute related thru getModuleId(). This method provides caching so that multiple QueryResult objects in the same resultset save db hits.
      Throws:
      TorqueException
    • getModule

      public final Module getModule() throws TorqueException
      Get the Module related thru getModuleId(). This method provides caching so that multiple QueryResult objects in the same resultset save db hits.
      Throws:
      TorqueException
    • getModuleItemType

      public final ModuleItemType getModuleItemType() throws TorqueException
      Get the ModuleItemType related thru getModuleId() and getItemTypeId(). This method provides caching so that multiple QueryResult objects in the same resultset save db hits.
      Throws:
      TorqueException
    • getModuleAttribute

      public final ModuleAttribute getModuleAttribute(Attribute attribute) throws TorqueException
      Get the ModuleAttribute related thru getModuleId() and getItemTypeId(). This method provides caching so that multiple QueryResult objects in the same resultset save db hits. template 에서 사용된다.
      Parameters:
      attribute -
      Throws:
      TorqueException
    • getJSONString

      public CharSequence getJSONString()
      Query Result 를 json format 으로 처리한다. { attributeName: value, attributeName: [ ... ] }
      Returns:
      charSequence
    • getJSONString

      public CharSequence getJSONString(List muas, Format formatter)
      Query Result 를 json format 으로 처리한다. { attributeName: value, attributeName: [ ... ] }
      Parameters:
      muas -
      formatter -
      Returns:
      charSequence
    • getJSONString

      public CharSequence getJSONString(List muas, Format formatter, boolean skipBrace)
      Query Result 를 json format 으로 처리한다. { attributeName: value, attributeName: [ ... ] }
      Parameters:
      muas -
      formatter -
      skipBrace -
      Returns:
      charSequence
    • getJSONString

      public CharSequence getJSONString(List muas, Map alias, Format formatter)
      Query Result 를 json format 으로 처리한다. { attributeName: value, attributeName: [ ... ] }
      Parameters:
      muas -
      alias - key alias map
      formatter -
      Returns:
      charSequence
    • getJSONString

      public CharSequence getJSONString(List muas, Map alias, Format formatter, boolean skipBrace)
      Query Result 를 json format 으로 처리한다. { attributeName: value, attributeName: [ ... ] }
      Parameters:
      muas -
      alias - key alias map
      formatter -
      skipBrace -
      Returns:
      charSequence
    • getJSONKeyValueString

      public CharSequence getJSONKeyValueString(List muas, Map alias, Format format)
      Query Result 를 json format 으로 처리한다.
      Parameters:
      muas -
      alias - key alias map
      format - DateAttribute 를 formatting 한다.
      Returns:
      charSequence attributeName: value, attributeName: [ ... ]