net.sf.adatagenerator.api
Interface GroupCreator<B>
- Type Parameters:
B - the bean type for which fields will be generatedC - an extension of the bean type. The generated fields may depend on
fields defined only by the extension, even though extension-only
fields themselves will not be generated.
- All Known Implementing Classes:
- AbstractGroupCreator
public interface GroupCreator<B>
An object that generates a group of beans of type
C. Not all fields
in the bean are necessarily generated; only the fields defined by the sub-type
B are synthesized.
- Author:
- chirag
DEPENDENCYKEY_GROUPCREATOR
static final String DEPENDENCYKEY_GROUPCREATOR
- See Also:
- Constant Field Values
newGroup
List<B> newGroup(B template,
GeneratorMap<B> registry,
String superGroupId,
Properties params)
throws CreationException
- Throws:
CreationException
getRoleField
String getRoleField()
- Returns the field name used as a role by this group creator. For example,
a sibling group creator might look for a field named
SiblingRole
on a record, and then use the value of this field to look up values for
other fields such as gender and first name.
return a non-null String representing a field name (without the get
or set prefixes, and with an initial upper-case letter) or
null. A null indicates that the group creator does not rely on a role field.
lookUpFieldValue
<F> F lookUpFieldValue(Class<F> fieldType,
String groupRoleName,
String fieldName)
- A method that enables a group creator to customize the fields of a bean
based on a role assigned to the bean.
- Type Parameters:
F - the field type- Parameters:
fieldType - a Class assignable to the field typegroupRoleName - the role that the bean is assigned within a groupfieldName - the name of the field to be modified
- Returns:
- the modified value of the field
setMemberDistributionAndOrder
Map<String,Integer> setMemberDistributionAndOrder(int total)
throws ProcessingException
- Deprecated. poorly defined
- Sets the frequency of roles within a group
- Throws:
ProcessingException
Copyright © 2011-2012. All Rights Reserved.