lucee.Component coldbox.system.core.dynamic.BeanPopulator
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This is a bean populator that binds different types of data to a bean.
Constructor Summary | |
---|---|
init()
Constructor. |
Method Summary | |
---|---|
private struct
|
getRelationshipMetaData(any target)
Prepares a structure of target relational meta data. |
any
|
populateFromJson(any target, string JSONString, [string scope=''], [boolean trustedSetter='false'], [string include=''], [string exclude=''], [boolean ignoreEmpty='false'], [string nullEmptyInclude=''], [string nullEmptyExclude=''], [boolean composeRelationships='false'])
Populate a named or instantiated instance from a Json string. |
any
|
populateFromQuery(any target, query qry, [numeric rowNumber='1'], [string scope=''], [boolean trustedSetter='false'], [string include=''], [string exclude=''], [boolean ignoreEmpty='false'], [string nullEmptyInclude=''], [string nullEmptyExclude=''], [boolean composeRelationships='false'])
Populate a named or instantiated instance from a Query object. |
any
|
populateFromQueryWithPrefix(any target, query qry, string prefix, [numeric rowNumber='1'], [string scope=''], [boolean trustedSetter='false'], [string include=''], [string exclude=''], [boolean ignoreEmpty='false'], [string nullEmptyInclude=''], [string nullEmptyExclude=''], [boolean composeRelationships='false'])
Populate a named or instantiated instance from a Query object using a column prefix. |
any
|
populateFromStruct(any target, struct memento, [string scope=''], [boolean trustedSetter='false'], [string include=''], [string exclude=''], [boolean ignoreEmpty='false'], [string nullEmptyInclude=''], [string nullEmptyExclude=''], [boolean composeRelationships='false'])
Populate a named or instantiated instance from a struct object using a key prefix. |
any
|
populateFromStructWithPrefix(any target, struct memento, string prefix, [string scope=''], [boolean trustedSetter='false'], [string include=''], [string exclude=''], [boolean ignoreEmpty='false'], [string nullEmptyInclude=''], [string nullEmptyExclude=''], [boolean composeRelationships='false'])
Populate a named or instantiated instance from a struct object using a key prefix. |
any
|
populateFromXML(any target, any xml, [string root=''], [string scope=''], [boolean trustedSetter='false'], [string include=''], [string exclude=''], [boolean ignoreEmpty='false'], [string nullEmptyInclude=''], [string nullEmptyExclude=''], [boolean composeRelationships='false'])
Populate a named or instantiated instance from an XML Packet. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
Method Detail |
---|
Prepares a structure of target relational meta data
target
- The target to work onPopulate a named or instantiated instance from a Json string
target
- The target to populateJSONString
- The JSON string to populate the object with. It has to be valid JSON and also a structure with name-key value pairs.scope
- Use scope injection instead of setters population. Ex: scope=variables.instance.trustedSetter
- If set to true, the setter method will be called even if it does not exist in the beaninclude
- A list of keys to include in the populationexclude
- A list of keys to exclude in the populationignoreEmpty
- Ignore empty values on populations, great for ORM populationnullEmptyInclude
- A list of keys to NULL when emptynullEmptyExclude
- A list of keys to NOT NULL when emptycomposeRelationships
- Automatically attempt to compose relationships from mementoPopulate a named or instantiated instance from a Query object
target
- The target to populateqry
- The query to populate the object withrowNumber
- The row number to use for population, defaults to 1scope
- Use scope injection instead of setters population. Ex: scope=variables.instance.trustedSetter
- If set to true, the setter method will be called even if it does not exist in the beaninclude
- A list of keys to include in the populationexclude
- A list of keys to exclude in the populationignoreEmpty
- Ignore empty values on populations, great for ORM populationnullEmptyInclude
- A list of keys to NULL when emptynullEmptyExclude
- A list of keys to NOT NULL when emptycomposeRelationships
- Automatically attempt to compose relationships from mementoPopulate a named or instantiated instance from a Query object using a column prefix
target
- The target to populateqry
- The query to populate the object withprefix
- The prefix used to filter, Example: 'user_' would apply to the following columns: 'user_id' and 'user_name' but not 'address_id'.rowNumber
- The row number to use for population, defaults to 1scope
- Use scope injection instead of setters population. Ex: scope=variables.instance.trustedSetter
- If set to true, the setter method will be called even if it does not exist in the beaninclude
- A list of keys to include in the populationexclude
- A list of keys to exclude in the populationignoreEmpty
- Ignore empty values on populations, great for ORM populationnullEmptyInclude
- A list of keys to NULL when emptynullEmptyExclude
- A list of keys to NOT NULL when emptycomposeRelationships
- Automatically attempt to compose relationships from mementoPopulate a named or instantiated instance from a struct object using a key prefix
target
- The target to populatememento
- The structure to populate the target withscope
- Use scope injection instead of setters population. Ex: scope=variables.instance.trustedSetter
- If set to true, the setter method will be called even if it does not exist in the beaninclude
- A list of keys to include in the populationexclude
- A list of keys to exclude in the populationignoreEmpty
- Ignore empty values on populations, great for ORM populationnullEmptyInclude
- A list of keys to NULL when emptynullEmptyExclude
- A list of keys to NOT NULL when emptycomposeRelationships
- Automatically attempt to compose relationships from mementoPopulate a named or instantiated instance from a struct object using a key prefix
target
- The target to populatememento
- The structure to populate the target withprefix
- The prefix used to filter, Example: 'user_' would apply to the following columns: 'user_id' and 'user_name' but not 'address_id'.scope
- Use scope injection instead of setters population. Ex: scope=variables.instance.trustedSetter
- If set to true, the setter method will be called even if it does not exist in the beaninclude
- A list of keys to include in the populationexclude
- A list of keys to exclude in the populationignoreEmpty
- Ignore empty values on populations, great for ORM populationnullEmptyInclude
- A list of keys to NULL when emptynullEmptyExclude
- A list of keys to NOT NULL when emptycomposeRelationships
- Automatically attempt to compose relationships from mementoPopulate a named or instantiated instance from an XML Packet
target
- The target to populatexml
- The XML string or packet to populate the target withroot
- The XML root element to start from, else defaults to XMLRootscope
- Use scope injection instead of setters population. Ex: scope=variables.instance.trustedSetter
- If set to true, the setter method will be called even if it does not exist in the beaninclude
- A list of keys to include in the populationexclude
- A list of keys to exclude in the populationignoreEmpty
- Ignore empty values on populations, great for ORM populationnullEmptyInclude
- A list of keys to NULL when emptynullEmptyExclude
- A list of keys to NOT NULL when emptycomposeRelationships
- Automatically attempt to compose relationships from memento