Package com.storedobject.ui
Class ObjectGetField.GetTypedSupplier<O extends StoredObject>
java.lang.Object
com.storedobject.ui.ObjectGetField.GetSupplier<O>
com.storedobject.ui.ObjectGetField.GetTypedSupplier<O>
- Type Parameters:
O
- Type of class.
- All Implemented Interfaces:
ObjectGetField.GetProvider<O>
- Enclosing class:
ObjectGetField<T extends StoredObject>
public static class ObjectGetField.GetTypedSupplier<O extends StoredObject>
extends ObjectGetField.GetSupplier<O>
Implementation of
ObjectGetField.GetProvider
for StoredObject
classes where additional type information is
required (For example, InventoryItem
requires an instance of the InventoryItemType
while
searching in order to narrow down the search).- Author:
- Syam
-
Constructor Summary
ConstructorsConstructorDescriptionGetTypedSupplier
(ObjectProvider<?> typeObjectProvider, Class<O> objectClass) Constructor.GetTypedSupplier
(ObjectProvider<?> typeObjectProvider, Class<O> objectClass, String getMethodName, String listMethodName) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetTextObject
(SystemEntity systemEntity, String value) Get an object instance for the search text specified.listTextObjects
(SystemEntity systemEntity, String value) Get a list of object instances for the search text specified.
-
Constructor Details
-
GetTypedSupplier
Constructor.- Parameters:
typeObjectProvider
- Object provider for the type part,objectClass
- Class of the objects for which this needs to be created.
-
GetTypedSupplier
public GetTypedSupplier(ObjectProvider<?> typeObjectProvider, Class<O> objectClass, String getMethodName, String listMethodName) Constructor.- Parameters:
typeObjectProvider
- Object provider for the type part,objectClass
- Class of the objects for which this needs to be created.getMethodName
- Name of the "get" method.listMethodName
- Name of the "list" method.
-
-
Method Details
-
getTextObject
Description copied from interface:ObjectGetField.GetProvider
Get an object instance for the search text specified.- Specified by:
getTextObject
in interfaceObjectGetField.GetProvider<O extends StoredObject>
- Overrides:
getTextObject
in classObjectGetField.GetSupplier<O extends StoredObject>
- Parameters:
systemEntity
- System entity for which this search should be conducted.value
- Search text for which object instance needs to be returned.- Returns:
- Object instance matching the search text.
- Throws:
Exception
- If any error occurs while retrieving the object instance.
-
listTextObjects
Description copied from interface:ObjectGetField.GetProvider
Get a list of object instances for the search text specified.- Specified by:
listTextObjects
in interfaceObjectGetField.GetProvider<O extends StoredObject>
- Overrides:
listTextObjects
in classObjectGetField.GetSupplier<O extends StoredObject>
- Parameters:
systemEntity
- System entity for which this search should be conducted.value
- Search text for which object instances need to be returned.- Returns:
- Object instances matching the search text as an iterator.
- Throws:
Exception
- If any error occurs while retrieving the object instances.
-
getTypeObject
-