Package cascading.lingual.catalog

Examples of cascading.lingual.catalog.SchemaCatalog


    }

  @Override
  protected boolean performRename( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();

    String schemaName = getOptions().getSchemaName();
    String stereotypeName = getOptions().getStereotypeName();
    String renameName = getOptions().getRenameName();

    return catalog.renameStereotype( schemaName, stereotypeName, renameName );
    }
View Full Code Here


    }

  @Override
  protected boolean performRemove( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();

    String schemaName = getOptions().getSchemaName();
    String stereotypeName = getOptions().getStereotypeName();

    return catalog.removeStereotype( schemaName, stereotypeName );
    }
View Full Code Here

    }

  @Override
  protected Object getSource( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
    SchemaDef schemaDef = catalog.getSchemaDef( getOptions().getSchemaName() );

    if( schemaDef == null )
      return null;

    return catalog.getSchemaDef( getOptions().getSchemaName() ).getStereotype( getOptions().getStereotypeName() );
    }
View Full Code Here

    }

  @Override
  protected void validateAdd( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
    String schemaName = getOptions().getSchemaName();
    String providerName = getOptions().getProviderName();

    if( providerName != null )
      {
      ProviderDef providerDef = catalog.findProviderFor( schemaName, providerName );

      if( providerDef == null )
        throw new IllegalArgumentException( "provider not registered to schema: " + providerName );
      }
    }
View Full Code Here

    }

  @Override
  protected List<String> performAdd( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
    String schemaName = getOptions().getSchemaName();
    String stereotypeName = getOptions().getStereotypeName();
    List<String> columns = getOptions().getColumns();
    List<String> types = getOptions().getTypes();
    Fields fields = createFields( columns, types );

    catalog.createStereotype( schemaName, stereotypeName, fields );

    return asList( stereotypeName );
    }
View Full Code Here

    }

  @Override
  protected Collection<String> performGetNames( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();

    String schemaName = getOptions().getSchemaName();

    if( schemaName != null && !schemaName.isEmpty() )
      return catalog.getStereotypeNames( schemaName );
    else
      return catalog.getStereotypeNames();
    }
View Full Code Here

    }

  @Override
  protected Map performShow( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
    String schemaName = getOptions().getSchemaName();
    String stereotypeName = getOptions().getStereotypeName();
    SchemaDef schemaDef = getSchemaDefChecked( catalog, schemaName, true );
    Stereotype stereotype = schemaDef.getStereotypeChecked( stereotypeName );
View Full Code Here

    }

  @Override
  protected boolean performRename( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
    String schemaName = getOptions().getSchemaName();
    Protocol oldProtocol = getSource( platformBroker );
    Protocol newProtocol = Protocol.getProtocol( getOptions().getRenameName() );

    if( oldProtocol == null )
      return false;

    return catalog.renameProtocol( schemaName, oldProtocol, newProtocol );
    }
View Full Code Here

    }

  @Override
  protected boolean performRemove( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
    String schemaName = getOptions().getSchemaName();
    Protocol protocol = getSource( platformBroker );

    return catalog.removeProtocol( schemaName, protocol );
    }
View Full Code Here

    }

  @Override
  protected Protocol getSource( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();

    if( getRequestedSourceName() == null )
      return null;

    Protocol protocol = Protocol.getProtocol( getRequestedSourceName() );

    if( !catalog.getSchemaDefinedProtocols( getOptions().getSchemaName() ).contains( protocol ) )
      return null;

    return protocol;
    }
View Full Code Here

TOP

Related Classes of cascading.lingual.catalog.SchemaCatalog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.