Class CloneSchema.Factory

  • All Implemented Interfaces:
    SchemaFactory
    Enclosing class:
    CloneSchema

    public static class CloneSchema.Factory
    extends java.lang.Object
    implements SchemaFactory
    Schema factory that creates a CloneSchema. This allows you to create a clone schema inside a model.json file.
     {
       version: '1.0',
       defaultSchema: 'FOODMART_CLONE',
       schemas: [
         {
           name: 'FOODMART_CLONE',
           type: 'custom',
           factory: 'org.apache.calcite.adapter.clone.CloneSchema$Factory',
           operand: {
             jdbcDriver: 'com.mysql.jdbc.Driver',
             jdbcUrl: 'jdbc:mysql://localhost/foodmart',
             jdbcUser: 'foodmart',
             jdbcPassword: 'foodmart'
           }
         }
       ]
     }
    • Constructor Summary

      Constructors 
      Constructor Description
      Factory()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Schema create​(SchemaPlus parentSchema, java.lang.String name, java.util.Map<java.lang.String,​java.lang.Object> operand)
      Creates a Schema.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Factory

        public Factory()
    • Method Detail

      • create

        public Schema create​(SchemaPlus parentSchema,
                             java.lang.String name,
                             java.util.Map<java.lang.String,​java.lang.Object> operand)
        Description copied from interface: SchemaFactory
        Creates a Schema.
        Specified by:
        create in interface SchemaFactory
        Parameters:
        parentSchema - Parent schema
        name - Name of this schema
        operand - The "operand" JSON property
        Returns:
        Created schema