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 : string
You 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:
-
Method Summary
Modifier and TypeMethodDescriptioncreateTuple(Schema schema, T t) create aTuples from an input objectcreateTuples(Schema schema, Collection<T> t) create multipleTuples from input objectscreateTuples(Schema schema, T... t) create multipleTuples from input objects
-
Method Details
-
createTuple
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
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
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
-