com.force.sdk.codegen.filter
Class ObjectNameWithRefDataFilter

java.lang.Object
  extended by com.force.sdk.codegen.filter.ObjectNameWithRefDataFilter
All Implemented Interfaces:
DataFilter

public class ObjectNameWithRefDataFilter
extends Object
implements DataFilter

A DataFilter which filters based on Force.com schema object (SObject) names and follows object references to produce a closed set of schema objects.

This DataFilter will filter in a Force.com schema object if and only if at least one of the two following conditions are met:

  1. Its name exactly matches one in the ObjectNameWithRefDataFilter state
  2. It is referenced by a schema object that has already been filtered in
Names in the ObjectNameWithRefDataFilter state which match no schema objects are ignored.

Author:
Tim Kral

Constructor Summary
ObjectNameWithRefDataFilter(Set<String> objectNames)
          Initializes a ObjectNameWithRefDataFilter with a set of Force.com schema object names that are to be filtered in along with their references.
ObjectNameWithRefDataFilter(String... objectNames)
          Initializes a ObjectNameWithRefDataFilter with a set of Force.com schema object names that are to be filtered in along with their references.
 
Method Summary
 List<com.sforce.soap.partner.DescribeSObjectResult> filter(List<com.sforce.soap.partner.DescribeSObjectResult> dsrs)
          Filters a list of Force.com DescribeSObjectResult objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectNameWithRefDataFilter

public ObjectNameWithRefDataFilter(Set<String> objectNames)
Initializes a ObjectNameWithRefDataFilter with a set of Force.com schema object names that are to be filtered in along with their references.

Parameters:
objectNames - a java.util.Set of exact object names that are to be filtered in along with their references

ObjectNameWithRefDataFilter

public ObjectNameWithRefDataFilter(String... objectNames)
Initializes a ObjectNameWithRefDataFilter with a set of Force.com schema object names that are to be filtered in along with their references.

Note that duplicates within the given array with be eliminated.

Parameters:
objectNames - an Array of exact object names that are to be filtered in along with their references
Method Detail

filter

public List<com.sforce.soap.partner.DescribeSObjectResult> filter(List<com.sforce.soap.partner.DescribeSObjectResult> dsrs)
Description copied from interface: DataFilter
Filters a list of Force.com DescribeSObjectResult objects.

Specified by:
filter in interface DataFilter
Parameters:
dsrs - the list of Force.com DescribeSObjectResult objects to be filtered
Returns:
the filtered list of Force.com DescribeSObjectResult objects


Copyright © 2011. All Rights Reserved.