Base wrapper class that allows us to build wrappers for SObjects. This class will allow auto mapping from/to SObject.
Method Summary
Modifier and Type | Method and Description |
---|---|
void | WrapperBase() |
void | fromSObject(SObject obj) |
void | serialize() |
void | getFieldValueFromSObject(String fieldName) |
void | getFieldValueFromSObject(String relatedObjectName,String fieldName) |
void | getSObject() |
Method Detail
This class supports the following methods:
global WrapperBase()
Empty constructor that will be used by extending classes.
global abstract void fromSObject(SObject obj)
Method will convert the SObject to a wrapper obj.
Parameters
Name | Type | Description |
---|---|---|
obj | SObject | SObject |
global virtual String serialize()
global virtual Object getFieldValueFromSObject(String fieldName)
Parameters
Name | Type | Description |
---|---|---|
fieldName | String | undefined |
global virtual Object getFieldValueFromSObject(String relatedObjectName,String fieldName)
Parameters
Name | Type | Description |
---|---|---|
relatedObjectName | String | undefined |
fieldName | String | undefined |
global virtual SObject getSObject()