Class EclibItem
To understand details on item, see naming-convention.md
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturnsitemNameKeyvalue.getItemNameKey(String defaultItemNameKeyClass) ReturnsitemNameKeyvalue.booleanHides value from error messages and so on.itemNameKey(String itemNameKey) SetsitemNameKeyand returns this for method chain.voidsetItemNameKeyClassFromAnnotation(String itemNameKeyClas) voidsetItemNameKeyClassFromClassName(String itemNameKeyClassFromClassName) 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")It is set by itemNameKey(String) and only when its argument contains ".".
The itemNameKeyClass obtained from
@ItemNameKeyClassis not stored in it because the value from@ItemNameKeyClassis a default value when this field is null. -
itemNameKeyField
Is a field part (= right part) of itemNameKey. (like "name" from itemNameKey: "acc.name") -
showsValue
protected boolean showsValueIs false when the value should not be open to public (like password).Default value is
true.
-
-
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 5 candidates for itemNameKeyClass. Candidates are ordered by their priority. They are adopted only when they are not empty. The last one is never null.
1: itemNameKeyClass part of itemNameKey set by itemNameKey(itemNameKey)
2: itemNameKeyClass part of itemPropertyPath set by constructor
3: itemNameKeyClassFromAnnotation set by setItemNameKeyClassFromAnnotation(String)
4: defaultItemNameKeyClass, the argument of this method
5: uncapitalized className (always set by EclibItemContainer#getItem(String)) -
getItemNameKey
ReturnsitemNameKeyvalue.See
getItemNameKey(@Nullable String defaultItemNameKeyClass)withdefaultItemNameKeyClass = null. -
hideValue
Hides value from error messages and so on. -
getShowsValue
public boolean getShowsValue() -
setItemNameKeyClassFromAnnotation
-
setItemNameKeyClassFromClassName
-