Class ObjectArrayTupleMaker

java.lang.Object
com.streambase.sb.unittest.AbstractTupleMaker<Object[]>
com.streambase.sb.unittest.ObjectArrayTupleMaker
All Implemented Interfaces:
TupleMaker<Object[]>

public class ObjectArrayTupleMaker extends AbstractTupleMaker<Object[]>
A factory to build Tuples from Java objects. Accepts the same objects as Tuple.setField(com.streambase.sb.Schema.Field, Object).

Note that when passing Tuples as value objects to an Enqueuer or Dequeuer, you may obtain the stream's schema from Enqueuer.getSchema() and Dequeuer.getSchema()

For example, given a schema:

  id int,
  name string,
  values list(int),
  listofvalues list(list(int)),
  location tuple(zipcode int, state string),
  prevlocation tuple(zipcode int, state string) 
 
a valid invocation of createTuple(Schema, Object[]) might look like:
  createTuple(schema, new Object[] { 1,
                                     "item1",
                                     Arrays.asList(10,20),
                                     "[\"[30,40]\",\"[50,60]\"]",
                                     "2421, MA",
                                     s.getField(5).getSchema().createTuple("10036", "NY")
 });
                                     
 
Since:
6.6
See Also: