com.force.sdk.codegen.filter
Class ObjectNameDataFilter

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

public class ObjectNameDataFilter
extends Object
implements DataFilter

A DataFilter which filters based on Force.com schema object (SObject) names.

This DataFilter will filter in a Force.com schema object if and only if its name exactly matches one in the ObjectNameDataFilter state. Names in the ObjectNameDataFilter state which match no schema objects are ignored.

Author:
Tim Kral

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

Constructor Detail

ObjectNameDataFilter

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

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

ObjectNameDataFilter

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

Note that duplicates within the given array with be eliminated.

Parameters:
objectNames - an Array of exact object names that are to be filtered in
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

getObjectNames

public Set<String> getObjectNames()
Returns the java.util.Set of schema object names on which this ObjectNameDataFilter will filter.

Returns:
a non null java.util.Set which contains the schema object names on which this ObjectNameDataFilter will filter


Copyright © 2011. All Rights Reserved.