Class EclibItem
To understand details on item, see naming-convention.md
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItemNameKey(String defaultItemNameKeyClass) ReturnsitemNameKeyvalue.itemNameKey(String itemNameKey) SetsitemNameKeyand returns this for method chain.booleanReturns whether the itemNameKeyClass is set explicitly.
-
Field Details
-
itemPropertyPath
Is the ID string of an item.rootRecordName part (= far left part) can be omitted. Namely it can be "name" or "dept.name" when the propertyPath with rootRecordName (= also called "recordPropertyPath") is "acc.name" or "acc.dept.name" where "acc" is the rootRecordName.
-
itemNameKeyClass
Is a class part (= left part) of itemNameKey. (like "acc" from itemNameKey: "acc.name") -
itemNameKeyField
Is a field part (= right part) of itemNameKey. (like "name" from itemNameKey: "acc.name")
-
-
Constructor Details
-
EclibItem
Constructs a new instance withitemPropertyPath.You cannot set recordPropertyPath here. Setting it caauses a duplication of rootRecordName and it cannot be found.
- Parameters:
itemPropertyPath- itemPropertyPath
-
-
Method Details
-
itemNameKey
SetsitemNameKeyand returns this for method chain.The format of itemNameKey is the same as itemNameKey, which is like "acc.name", always has one dot (not more than one) in the middle of the string.
But the argument of the method can be like "name", itemNameKeyField only. In that case the value of itemnameKeyClass is determined by the rule written atgetItemNameKey(rootRecordName)javadoc.- Parameters:
itemNameKey- itemNameKey- Returns:
- Item
-
getItemPropertyPath
-
setsItemNameKeyClassExplicitly
public boolean setsItemNameKeyClassExplicitly()Returns whether the itemNameKeyClass is set explicitly.- Returns:
- boolean
-
getItemNameKey
ReturnsitemNameKeyvalue.There can be 3 candidates for itemNameKeyClass,
1: itemNameKeyClass part of itemNameKey set by itemNameKey(itemNameKey)
2: part of itemPropertyPath
3: rootRecordName set to getItemNameKey(rootRecordName)
When 1 exists, 1 is always used.
When 1 does not exist, if 2. contains "." the second last part of it
(if the string is 1.2.3.4, second last part is "3").
When 1 does not exist and 2. does not contain ".", 3. is used.
Notice that the return value of this method does not consider
@ItemNameKeyClassannotations, which means the return value should not be used for resolution of itemName directly. UseEclibRecord#getItemNameKey()for it.- Returns:
- itemNameKeyFieldForName
-