Package org.openbravo.base.structure
Class IdentifierProvider
- java.lang.Object
-
- org.openbravo.base.structure.IdentifierProvider
-
- All Implemented Interfaces:
OBProvidable
,OBSingleton
public class IdentifierProvider extends Object implements OBSingleton
Provides the identifier/title of an object using theidentifierProperties
of theEntity
. Note: the getIdentifier can also be generated in the java entity but the current approach makes it possible to change the identifier definition at runtime.- Author:
- mtaal
-
-
Constructor Summary
Constructors Constructor Description IdentifierProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getIdentifier(Object o)
Returns the identifier of the object.static IdentifierProvider
getInstance()
protected String
getSeparator()
static void
setInstance(IdentifierProvider instance)
-
-
-
Field Detail
-
SEPARATOR
public static final String SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static IdentifierProvider getInstance()
-
setInstance
public static void setInstance(IdentifierProvider instance)
-
getIdentifier
public String getIdentifier(Object o)
Returns the identifier of the object. The identifier is computed using the identifier properties of the Entity of the object. It is translated (if applicable) to the current language- Parameters:
o
- the object for which the identifier is generated- Returns:
- the identifier
-
getSeparator
protected String getSeparator()
-
-