Class MITListItem
- All Implemented Interfaces:
Cacheable,LocalizableOM,Serializable,Comparable<MITListItem>,ColumnAccessByName,ObjectModel,Persistent
A module and an iteme type. Wildcards are possible, so that a single MITListItem could represent all the item types in a module. A single item type in all modules (that have it defined). Or all modules and item types.
Parent 를 같고 있으면 Parent 는 하나만 설정하여야 한다.
all --> id = 0, 0 ( see MULTIPLE_MODULE_KEY, MULTIPLE_ITEM_TYPE_KEY )
current --> id = null; 모든 모듈, 모든 아이템유형 : M : 0 & T : 0 현재 모듈, 모든 아이템 유형 : M : NULL & T : 0 현재 모듈의 형식은 아주 특별한 경우에만
사용하여야 한다.
모든 모듈, 아이템 유형 : M : 0 , T : 0
현재 모듈, 아이템 유형 : M : NULL & T : T
특정 모듈 모든 아이템 유형 : M : M & T : 0
특정 모듈 아래에 모든 모듈, 모든 아이템 유형 : M : 0 & T : 0 & P : P
특정 모듈 아래에 모든 모듈, 아이템 유형 : M : 0 & T : T & P : P
- Version:
- $Id: MITListItem.java,v 1.71 2008/12/25 04:03:45 youngho Exp $
- Author:
- Youngho Cho
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clear this Serializable instance cacheintcompareTo(MITListItem obj) Comparable 처리 보다 큰 범위이면 1, 동일한 범위이면 0, 보다 작은 범위이면 -1 먼저 itemType 을 비교한다.boolean동일대상을 처리하면 equals 처리한다.주의 : CurrentModule, CurrentItemType 은 지원하지 않는다.getAttributeIds(boolean activeOnly, boolean commonOnly) getBitMatrix(Module module, ItemType type) human readerble expressiongetLocalized(Locale locale) locale 에 해당하는 localized 정보를 구한다.DOCUMENT ME!getModuleAttribute(Attribute attribute) isSingleModuleItemType 일 경우 ModuleAttribute 을 구한다.isSingleModuleItemType 일 경우 ModuleItemType 을 구한다.DOCUMENT ME!inthashCode()If the primary key is notnull, return the hashcode of the primary key.booleanDOCUMENT ME!boolean모든 Module 에 적용하는지 즉 ModuleId 가 ItemTypeEnum.ALL.getId()boolean대상이 SingleItemType 인지boolean대상이 SingleModule 인지booleanDOCUMENT ME!booleanwhere use CurrentItemTypebooleanwhere use CurrentModulevoidsave()Stores the object in the database.voidDOCUMENT ME!voidDOCUMENT ME!human readerble expressionP\dI\d+, M\d+I\d+ 의 Pattern 으로 문자열을 만든다. null 이면 Pnull, Mnull 등과 같이 표현한다.toString()toString()Methods inherited from class com.easydesk.om.BaseMITListItem
copy, copy, copy, copy, copyInto, copyInto, copyInto, copyInto, getByName, getByPeerName, getByPosition, getEasyDeskModuleRelatedByModuleId, getEasyDeskModuleRelatedByModuleId, getEasyDeskModuleRelatedByParentId, getEasyDeskModuleRelatedByParentId, getFieldNames, getForeignKeyForEasyDeskModuleRelatedByModuleId, getForeignKeyForEasyDeskModuleRelatedByParentId, getForeignKeyForItemType, getForeignKeyForMITList, getItemId, getItemType, getItemType, getItemTypeId, getListId, getMITList, getMITList, getModuleId, getParentId, getPeer, getPrimaryKey, getTableMap, isCacheOnSave, isDeleted, isLoading, isModified, isNew, isSaving, isSubstract, resetModified, save, save, setByName, setByPeerName, setByPosition, setDeleted, setEasyDeskModuleRelatedByModuleId, setEasyDeskModuleRelatedByModuleIdKey, setEasyDeskModuleRelatedByParentId, setEasyDeskModuleRelatedByParentIdKey, setItemId, setItemType, setItemTypeId, setItemTypeKey, setListId, setLoading, setMITList, setMITListKey, setModified, setModuleId, setNew, setParentId, setPrimaryKey, setPrimaryKey, setSaving, setSubstract, valueEquals
-
Constructor Details
-
MITListItem
public MITListItem()
-
-
Method Details
-
save
Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed.- Specified by:
savein interfacePersistent- Overrides:
savein classBaseMITListItem- Throws:
Exception
-
setModule
DOCUMENT ME!- Parameters:
module- DOCUMENT ME!- Throws:
TorqueException- DOCUMENT ME!
-
getModule
DOCUMENT ME!- Returns:
- DOCUMENT ME!
- Throws:
TorqueException- DOCUMENT ME!
-
setParent
DOCUMENT ME!- Parameters:
module- DOCUMENT ME!- Throws:
TorqueException- DOCUMENT ME!
-
getParent
DOCUMENT ME!- Returns:
- DOCUMENT ME!
- Throws:
TorqueException- DOCUMENT ME!
-
hasParent
public boolean hasParent()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
compareTo
Comparable 처리 보다 큰 범위이면 1, 동일한 범위이면 0, 보다 작은 범위이면 -1 먼저 itemType 을 비교한다. 그 다음 Module 범위를 구한다. Substract 는 비교하지 않는다. 범위를 비교할 수 없으면 UnsupportedOperationException 을 던진다.- Specified by:
compareToin interfaceComparable<MITListItem>
-
isSingleModuleItemType
public boolean isSingleModuleItemType()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
isSingleModule
public boolean isSingleModule()대상이 SingleModule 인지 -
isSingleItemType
public boolean isSingleItemType()대상이 SingleItemType 인지 -
isUseCurrentModule
public boolean isUseCurrentModule()where use CurrentModule -
isUseCurrentItemType
public boolean isUseCurrentItemType()where use CurrentItemType -
isForAllModule
public boolean isForAllModule()모든 Module 에 적용하는지 즉 ModuleId 가 ItemTypeEnum.ALL.getId() -
getModuleItemType
isSingleModuleItemType 일 경우 ModuleItemType 을 구한다. 그외는 null 을- Returns:
- moduleItemType or null
- Throws:
TorqueException
-
getModuleAttribute
isSingleModuleItemType 일 경우 ModuleAttribute 을 구한다.- Parameters:
attribute-- Returns:
- ma or null
- Throws:
TorqueException
-
hashCode
public int hashCode()Description copied from class:BaseMITListItemIf the primary key is notnull, return the hashcode of the primary key. Otherwise callsObject.hashCode().- Overrides:
hashCodein classBaseMITListItem- Returns:
- an
intvalue
-
equals
동일대상을 처리하면 equals 처리한다.- Overrides:
equalsin classBaseMITListItem- Parameters:
obj-- Returns:
- Whether the primary keys are equal and the object have the same class.
-
getModuleIds
- Returns:
- moduleIds collection for all 이면 null 을 return 한다.
- Throws:
TorqueException
-
getItemTypeIds
- Returns:
- ItemTypeIds collection
- Throws:
TorqueException
-
getAttributeIds
주의 : CurrentModule, CurrentItemType 은 지원하지 않는다.- Throws:
TorqueException
-
getAttributeIds
protected List<Integer> getAttributeIds(boolean activeOnly, boolean commonOnly) throws TorqueException - Parameters:
activeOnly-commonOnly-- Returns:
- attribute list
- Throws:
TorqueException
-
toKeyString
P\dI\d+, M\d+I\d+ 의 Pattern 으로 문자열을 만든다. null 이면 Pnull, Mnull 등과 같이 표현한다. 검색범위 문자열 TODO : expression language -
getBitMatrix
human readerble expression모든 모듈, 아이템 유형 : P M 0 T 0 P
현재 모듈, 아이템 유형 : P M T : T P
특정 모듈 모든 아이템 유형 : P M M T 0 P
특정 모듈 아래에 모든 모듈, 모든 아이템 유형 : P P M 0 T 0
특정 모듈 아래에 모든 모듈, 아이템 유형 : P P M 0 T T
- Parameters:
module- currentModuletype- currentItemType- Returns:
- bitMatrix
- Throws:
TorqueException
-
toExpression
human readerble expression모든 모듈, 아이템 유형 : P M 0 T 0 P
현재 모듈, 아이템 유형 : P M T : T P
특정 모듈 모든 아이템 유형 : P M M T 0 P
특정 모듈 아래에 모든 모듈, 모든 아이템 유형 : P P M 0 T 0
특정 모듈 아래에 모든 모듈, 아이템 유형 : P P M 0 T T
- Returns:
- string representation
-
toString
toString()- Overrides:
toStringin classBaseMITListItem- Returns:
- string representation
-
getLocalized
Description copied from interface:LocalizableOMlocale 에 해당하는 localized 정보를 구한다.- Specified by:
getLocalizedin interfaceLocalizableOM- Parameters:
locale-- Returns:
- localized
- Throws:
TorqueException- 조회 중 오류가 발생한 경우
-
getMethodCache
- Specified by:
getMethodCachein interfaceCacheable- Returns:
- MethodResultCache
-
clear
public void clear()Description copied from interface:Cacheableclear this Serializable instance cache
-