Class AttributeOption

java.lang.Object
com.easydesk.om.BaseAttributeOption
com.easydesk.om.AttributeOption
All Implemented Interfaces:
Artifactizable, LocalizableOM, Identifiable<Integer>, Serializable, ColumnAccessByName, ObjectModel, Persistent

public class AttributeOption extends BaseAttributeOption implements LocalizableOM, Identifiable<Integer>, Artifactizable
AttributeOption
Author:
Youngho Cho
  • Constructor Details

    • AttributeOption

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

    • getId

      public Integer getId()
      Description copied from interface: Identifiable
      Get the Id of the Identifiable Entity.
      Specified by:
      getId in interface Identifiable<Integer>
      Returns:
      The Id of the entity.
    • setId

      public void setId(Integer id)
      Identifiable implementation
      Specified by:
      setId in interface Identifiable<Integer>
      Parameters:
      id - The new Id of the entity
    • getQueryKey

      public String getQueryKey()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • isRoot

      public boolean isRoot()
      Top OptionId Check
      Returns:
      ROOT option 이면 true
    • getParent

      public AttributeOption getParent() throws TorqueException
      Returns direct parent of this child. 문제점 : 하나의 child 에 여러 부모가 설정될 수 있다. 이 경우는 어떻게 처리 ???
      Returns:
      parent AttributeOption
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getAncestors

      public List<AttributeOption> getAncestors() throws TorqueException
      Returns a list of AttributeOptions which are ancestors of this AttributeOption. An Ancestor is the parent tree going up from this AO. The order is bottom up.

      Root 는 포함하지 않는다.

      Returns:
      조상 AttributeOption 목록
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getParents

      public List<AttributeOption> getParents() throws TorqueException
      Returns a list of AttributeOption's which are parents of this AttributeOption.
      Returns:
      A_PARENT_CHILD_B 관계의 부모 AttributeOption 목록
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getParents

      public List<AttributeOption> getParents(OptionRelationship optionRelationship) throws TorqueException
      Returns a list of AttributeOption's which are parents of this AttributeOption.
      Parameters:
      optionRelationship - 부모를 찾을 OptionRelationship
      Returns:
      부모 AttributeOption 목록, ROOT 이면 빈 목록
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getChildren

      public List<AttributeOption> getChildren() throws TorqueException
      Returns a list of AttributeOption's which are children of this AttributeOption.
      Returns:
      A_PARENT_CHILD_B 관계의 자식 AttributeOption 목록
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getChildren

      public List<AttributeOption> getChildren(OptionRelationship optionRelationship) throws TorqueException
      Returns a list of AttributeOption's which are children of this AttributeOption.
      Parameters:
      optionRelationship - 자식을 찾을 OptionRelationship
      Returns:
      자식 AttributeOption 목록
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getPathName

      public String getPathName()
      Root 를 제외한 부모경로이름/이름 을 구한다.
      Returns:
      path/name
    • getDescendants

      public List<AttributeOption> getDescendants() throws TorqueException
      Returns a list of AttributeOptions which are descendants of this AttributeOption. The descendants is the child tree going down from this AO. The order is bottom up.
      Returns:
      자손 AttributeOption 목록
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getDescendantNames

      public List<String> getDescendantNames() throws TorqueException
      자손의 이름을 구한다.
      Returns:
      자손 AttributeOption 이름 목록
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • isDescendantOf

      public boolean isDescendantOf(AttributeOption ancestor) throws TorqueException
      Checks to see if this Attribute option is a descendant of the passed in AttributeOption ancestor. Root 를 포함하여 확인한다.
      Parameters:
      ancestor - 조상인지 확인할 AttributeOption
      Returns:
      자손이면 true
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • isAncestorsOf

      public boolean isAncestorsOf(AttributeOption descendant) throws TorqueException
      Checks to see if this Attribute option is an ancestor of the passed in AttributeOption descendant.
      Parameters:
      descendant - 자손인지 확인할 AttributeOption
      Returns:
      조상이면 true
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • isChildOf

      public boolean isChildOf(AttributeOption parent) throws TorqueException
      Checks to see if this Attribute option is a child of the passed in AttributeOption parent.
      Parameters:
      parent - 부모인지 확인할 AttributeOption
      Returns:
      자식이면 true
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • isParentOf

      public boolean isParentOf(AttributeOption child) throws TorqueException
      Checks to see if this Attribute option is a parent of the passed in AttributeOption child.
      Parameters:
      child - 자식인지 확인할 AttributeOption
      Returns:
      부모이면 true
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • hasChildren

      public boolean hasChildren() throws TorqueException
      Does this AttributeOption have children?
      Returns:
      자식이 있으면 true
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • hasChildren

      public boolean hasChildren(String name) throws TorqueException
      Does this AttributeOption have a child of the given name?
      Parameters:
      name - 자식 option 이름
      Returns:
      이름에 해당하는 자식이 있으면 true
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getChild

      public AttributeOption getChild(String name) throws TorqueException
      이름에 해당하는 자식 AttributeOption 을 구한다.
      Parameters:
      name - 자식 option 이름
      Returns:
      AttributeOption or 없으면 null
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getAttributeOptionWithInheritance

      public List<AttributeOption> getAttributeOptionWithInheritance(OptionRelationship relationShip, ItemType itemType, Module module) throws TorqueException
      이 AttributeOption 과 관련이 있는 AttributeOption 을 구한다.
      Parameters:
      relationShip - 관계 OptionRelationship
      itemType - 대상 ItemType
      module - 대상 Module
      Returns:
      AttributeOption
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getComparator

      public static Comparator<AttributeOption> getComparator()
      Compares numeric value and in cases where the numeric value is the same it compares the display values.
      Returns:
      순서 Comparator
    • getComparator

      public static Comparator<AttributeOption> getComparator(int mode)
      DOCUMENT ME!
      Parameters:
      mode - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • save

      public void save() throws Exception
      Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed. 사용상 주의 : insert 의 경우에 save() 가 종료될 떄까지 아직 OptionOption 이 db 에 존재하지 않는다. 따라서 save() 후 oo.save() 가 종료되기 전 까지는 relationship 관련 내용을 call 해서는 안된다.
      Specified by:
      save in interface Persistent
      Overrides:
      save in class BaseAttributeOption
      Throws:
      Exception - 저장 중 오류가 발생한 경우
    • getArtifactType

      public ItemType getArtifactType() throws TorqueException
      ArtifactType 을 구한다. AttributeOption 은 다양한 Attribute 의 ArtifactType 을 처리 할 수 있기 떄문에 OptionOption Relation 을 적용한다.
      Specified by:
      getArtifactType in interface Artifactizable
      Returns:
      itemType
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getLocalized

      public Localized[] getLocalized(Locale locale) throws TorqueException
      locale 에 해당하는 localized 정보를 구한다.
      Specified by:
      getLocalized in interface LocalizableOM
      Parameters:
      locale - 대상 locale
      Returns:
      localized[] always global only
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우