public static class IlvSettings.IDAttributeMapper extends Object implements IlvSettings.IDResolver
Constructor and Description |
---|
IDAttributeMapper(String type,
String attributeName)
Constructs an ID attribute mapper that resolves IDs for the
elements with the specified type.
|
Modifier and Type | Method and Description |
---|---|
Object |
getID(Object element,
String type,
IlvSettingsModel model)
Returns the ID value for the specified element, if the
specified type is equal to the type given to the constructor of
this mapper.
|
boolean |
setID(Object element,
Object id,
String type,
IlvMutableSettingsModel model)
Sets the specified ID value to the specified element if the specified
type is equal to the type of element that this mapper maps.
|
public IDAttributeMapper(String type, String attributeName)
type
- The type of settings elements that this mapper resolves IDs for.attributeName
- The name of the attribute with a value that provides
IDs.public Object getID(Object element, String type, IlvSettingsModel model)
attributeName
attribute of the element is returned. If the specified type
does not correspond to the type of element that this mapper maps,
null
will be returned.getID
in interface IlvSettings.IDResolver
element
- The settings element to retrieve the ID from.type
- The settings type of the specified element.model
- The settings model that owns the specified element.setID(java.lang.Object, java.lang.Object, java.lang.String, ilog.views.appframe.settings.IlvMutableSettingsModel)
public boolean setID(Object element, Object id, String type, IlvMutableSettingsModel model)
attributeName
attribute of the
element
is set to the id
value. If the specified
type does not correspond to the type of element that this mapper maps,
false
will be returned.setID
in interface IlvSettings.IDResolver
element
- The element to set the ID to.id
- The ID value to set the specified element to.type
- The settings type of the specified element.model
- The settings model that owns the specified element.true
if the specified type is equal to the type
of element that this mapper maps; false
otherwise.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.