Package com.streambase.sb.unittest
Interface TupleMaker<T>
- 
- Type Parameters:
 T- The object type from which this factory can build tuples
- All Known Implementing Classes:
 AbstractTupleMaker,CSVTupleMaker,JSONSingleQuotesTupleMaker,JSONTupleMaker,ObjectArrayTupleMaker
public interface TupleMaker<T>Interface for constructing tuples from data. A TupleMarker is a straight forward way of creating a tuple using a schema. The maker user the fields in the schema to create the Tuple. For instance, say you have a schema like the following:name : String address : String phone : stringYou could use the tuple maker like this:Tuple tuple = tupleMaker.createTuple(schema, "Joe Smith", "101 Main St", "508-555-1212");Examine the subclasses of TupleMaker in the see section for concrete implementations.- Since:
 - 6.6
 - See Also:
 JSONSingleQuotesTupleMaker,JSONTupleMaker,ObjectArrayTupleMaker,CSVTupleMaker
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TuplecreateTuple(Schema schema, T t)create aTuples from an input objectList<Tuple>createTuples(Schema schema, Collection<T> t)create multipleTuples from input objectsList<Tuple>createTuples(Schema schema, T... t)create multipleTuples from input objects 
 - 
 
- 
- 
Method Detail
- 
createTuple
Tuple createTuple(Schema schema, T t) throws StreamBaseException
create aTuples from an input object- Parameters:
 schema- the schema for the tuplet- the input data to build it from- Returns:
 - the result tuple
 - Throws:
 StreamBaseException- Error creating tuple
 
- 
createTuples
List<Tuple> createTuples(Schema schema, T... t) throws StreamBaseException
create multipleTuples from input objects- Parameters:
 schema- the schema for the tuplet- the input data to build it from- Returns:
 - the result tuple
 - Throws:
 StreamBaseException- Error creating tuple
 
- 
createTuples
List<Tuple> createTuples(Schema schema, Collection<T> t) throws StreamBaseException
create multipleTuples from input objects- Parameters:
 schema- the schema for the tuplet- the input data to build it from- Returns:
 - the result tuple
 - Throws:
 StreamBaseException- Error creating tuples
 
 - 
 
 -