|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.anasoft.os.daofusion.util.SimpleMapContainer<java.lang.String,NestedPropertyMappingGroup>
com.anasoft.os.daofusion.cto.server.NestedPropertyCriteriaBasedConverter
public class NestedPropertyCriteriaBasedConverter
Generic persistent entity criteria transfer object
converter implementation using NestedPropertyCriteria
as the server-side criteria implementation.
This class uses persistent entity property mappings
(NestedPropertyMapping
instances) to define
relations between the CriteriaTransferObject
and NestedPropertyCriteria
for a specific
persistent entity via NestedPropertyMappingGroup
definitions.
CriteriaTransferObjectConverter
,
NestedPropertyMapping
,
NestedPropertyMappingGroup
,
SimpleMapContainer
Constructor Summary | |
---|---|
NestedPropertyCriteriaBasedConverter()
|
Method Summary | |
---|---|
void |
addMapping(java.lang.String mappingGroupName,
NestedPropertyMapping mapping)
Adds the given NestedPropertyMapping
to this converter by associating it with the
requested property mapping group. |
PersistentEntityCriteria |
convert(CriteriaTransferObject transferObject,
java.lang.String mappingGroupName)
Converts the given CriteriaTransferObject instance
into a corresponding PersistentEntityCriteria
according to property mappings defined by the requested
property mapping group. |
protected NestedPropertyCriteria |
createCriteria()
Creates a NestedPropertyCriteria instance to be used
within the convert(CriteriaTransferObject, String)
method. |
protected java.lang.String |
getKey(NestedPropertyMappingGroup object)
Returns the key for the given object. |
Methods inherited from class com.anasoft.os.daofusion.util.SimpleMapContainer |
---|
add, clear, containsKey, getObjectMap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NestedPropertyCriteriaBasedConverter()
Method Detail |
---|
public void addMapping(java.lang.String mappingGroupName, NestedPropertyMapping mapping)
NestedPropertyMapping
to this converter by associating it with the
requested property mapping group.
Note that the method creates the mapping group if not found within the converter.
This is the preferred way of configuring property mappings for this converter implementation.
mappingGroupName
- Name of the property
mapping group.mapping
- Persistent entity property
mapping to add.protected NestedPropertyCriteria createCriteria()
NestedPropertyCriteria
instance to be used
within the convert(CriteriaTransferObject, String)
method.
Override this method if you want to plug in your custom
NestedPropertyCriteria
implementation.
NestedPropertyCriteria
instance to hold
criteria from the criteria transfer object.public PersistentEntityCriteria convert(CriteriaTransferObject transferObject, java.lang.String mappingGroupName)
CriteriaTransferObjectConverter
CriteriaTransferObject
instance
into a corresponding PersistentEntityCriteria
according to property mappings defined by the requested
property mapping group.
convert
in interface CriteriaTransferObjectConverter
transferObject
- CriteriaTransferObject
instance to convert.mappingGroupName
- Name of the property mapping
group to use.
PersistentEntityCriteria
instance.CriteriaTransferObjectConverter.convert(com.anasoft.os.daofusion.cto.client.CriteriaTransferObject, java.lang.String)
protected java.lang.String getKey(NestedPropertyMappingGroup object)
SimpleMapContainer
getKey
in class SimpleMapContainer<java.lang.String,NestedPropertyMappingGroup>
object
- Object for which the key
is required.
SimpleMapContainer.getKey(java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |