public static class ReflectiveSchema.Factory extends Object implements SchemaFactory
The following example instantiates a FoodMart object as a schema
that contains tables called EMPS and DEPTS based on the
object's fields.
schemas: [
{
name: "foodmart",
type: "custom",
factory: "org.apache.calcite.adapter.java.ReflectiveSchema$Factory",
operand: {
class: "com.acme.FoodMart",
staticMethod: "instance"
}
}
]
class FoodMart {
public static final FoodMart instance() {
return new FoodMart();
}
Employee[] EMPS;
Department[] DEPTS;
}
| Constructor and Description |
|---|
ReflectiveSchema.Factory() |
public Schema create(SchemaPlus parentSchema, String name, Map<String,Object> operand)
SchemaFactorycreate in interface SchemaFactoryparentSchema - Parent schemaname - Name of this schemaoperand - The "operand" JSON propertyCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.