Package org.openbravo.materialmgmt
Class RelevantCharacteristicProperty
- java.lang.Object
-
- org.openbravo.materialmgmt.RelevantCharacteristicProperty
-
public class RelevantCharacteristicProperty extends Object
Keeps the information related to a relevant characteristic property.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Optional<RelevantCharacteristicProperty>
from(Entity entity, String propertyPath)
Retrieves a newRelevantCharacteristicProperty
instance for the relevant characteristic pointed by the givenEntity
and property path.static Optional<RelevantCharacteristicProperty>
from(Field field)
Retrieves a newRelevantCharacteristicProperty
instance for the relevant characteristic referenced by the givenField
.String
getBasePath()
String
getCharacteristicId()
CharacteristicValue
getCharacteristicValue(BaseOBObject bob)
Retrieves the value of the characteristic linked to the relevant characteristic for the givenBaseOBObject
Entity
getEntity()
String
getFieldName()
String
getName()
static Set<String>
getRelevantCharateristicProperties()
String
getSearchKey()
-
-
-
Method Detail
-
getEntity
public Entity getEntity()
- Returns:
- The entity that references the characteristic through the base path
-
getBasePath
public String getBasePath()
- Returns:
- the base path the points to the relevant characteristic property, without including the
relevant characteristic property name. It may be null, for example when the entity is
the
Product
entity
-
getName
public String getName()
- Returns:
- the name of the relevant characteristic property
-
getSearchKey
public String getSearchKey()
- Returns:
- the search key of the referenced relevant characteristic
-
getFieldName
public String getFieldName()
- Returns:
- the name to be used in the that points to this property. This is the name of
the
List
for the relevant characteristic in the list reference of relevant characteristics.
-
getCharacteristicId
public String getCharacteristicId()
- Returns:
- the id of the
Characteristic
linked to the relevant characteristic in the client of the current context
-
getCharacteristicValue
public CharacteristicValue getCharacteristicValue(BaseOBObject bob)
Retrieves the value of the characteristic linked to the relevant characteristic for the givenBaseOBObject
- Parameters:
bob
- ABaseOBObject
- Returns:
- the value of the characteristic linked to the relevant characteristic for the given
BaseOBObject
-
from
public static Optional<RelevantCharacteristicProperty> from(Field field)
Retrieves a newRelevantCharacteristicProperty
instance for the relevant characteristic referenced by the givenField
.- Parameters:
field
- The AD field- Returns:
- an Optional describing the
RelevantCharacteristicProperty
or an empty Optional in case the property cannot be resolved
-
from
public static Optional<RelevantCharacteristicProperty> from(Entity entity, String propertyPath)
Retrieves a newRelevantCharacteristicProperty
instance for the relevant characteristic pointed by the givenEntity
and property path.- Parameters:
entity
- TheEntity
owner of the property pathpropertyPath
- The path that references the relevant characteristic property- Returns:
- an Optional describing the
RelevantCharacteristicProperty
or an empty Optional in case the property cannot be resolved
-
-