Tabnine Logo
ExecutionFactory.start
Code IndexAdd Tabnine to your IDE (free)

How to use
start
method
in
org.teiid.translator.ExecutionFactory

Best Java code snippets using org.teiid.translator.ExecutionFactory.start (Showing top 15 results out of 315)

origin: org.teiid.connectors/translator-odata4

@Override
public void start() throws TranslatorException {
  super.start();
}
origin: teiid/teiid

private void initialize(ExecutionFactory connector, Object connectionFactory, TranslationUtility util) throws TranslatorException {
  this.connector = connector;
  this.util = util;
  this.connectionFactory = connectionFactory;
  this.connector.start();
}
origin: org.teiid.connectors/translator-google

@Override
public void start() throws TranslatorException {
  super.start();
  LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Google Spreadsheet ExecutionFactory Started"); //$NON-NLS-1$
}
origin: org.teiid.connectors/translator-jdbc

@Override
public void start() throws TranslatorException {
  super.start();		
  this.databaseCalender = new DatabaseCalender(this.databaseTimeZone);
  if (useCommentsInSourceQuery) {
    //will throw an exception if not valid
    new MessageFormat(commentFormat);
  }
}

origin: org.teiid.connectors/translator-odata

@Override
public void start() throws TranslatorException {
  super.start();
  if(this.databaseTimeZone != null && this.databaseTimeZone.trim().length() > 0) {
    TimeZone tz = TimeZone.getTimeZone(this.databaseTimeZone);
    if(!DEFAULT_TIME_ZONE.hasSameRules(tz)) {
      this.timeZone = tz;;
    }
  }
}
origin: org.teiid.connectors/translator-salesforce

@Override
public void start() throws TranslatorException {
  super.start();
  addPushDownFunction(SALESFORCE, INCLUDES, BOOLEAN, STRING, STRING);
  addPushDownFunction(SALESFORCE, EXCLUDES, BOOLEAN, STRING, STRING);
  LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Salesforce ExecutionFactory Started"); //$NON-NLS-1$
}
origin: teiid/teiid

  @Override
  public void start() throws TranslatorException {
    super.start();
    addPushDownFunction("ns", "func", DataTypeManager.DefaultDataTypes.STRING, DataTypeManager.DefaultDataTypes.STRING);
  }
};
origin: org.teiid/teiid-runtime

public static ExecutionFactory buildExecutionFactory(VDBTranslatorMetaData data) throws TeiidException {
  ExecutionFactory executionFactory;
  try {
    Class<?> executionClass = data.getExecutionFactoryClass();
    Object o = executionClass.newInstance();
    if(!(o instanceof ExecutionFactory)) {
       throw new TeiidException(RuntimePlugin.Event.TEIID40024, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40024, executionClass));
    }
    executionFactory = (ExecutionFactory)o;
    synchronized (executionFactory) {
      injectProperties(executionFactory, data);
      ClassLoader orginalCL = Thread.currentThread().getContextClassLoader();
      try {
        Thread.currentThread().setContextClassLoader(executionFactory.getClass().getClassLoader());
        executionFactory.start();
      } finally {
        Thread.currentThread().setContextClassLoader(orginalCL);
      }
    }
    return executionFactory;
  } catch (InvocationTargetException e) {
    throw new TeiidException(RuntimePlugin.Event.TEIID40025, e);
  } catch (IllegalAccessException e) {
    throw new TeiidException(RuntimePlugin.Event.TEIID40026, e);
  } catch (InstantiationException e) {
    throw new TeiidException(CorePlugin.Event.TEIID10036, e);
  }
}

origin: org.teiid/teiid-runtime

/**
 * Adds a definition of the {@link ExecutionFactory} using the default name either from the {@link Translator} annotation or the class name.
 * Only {@link ExecutionFactory} classes with a {@link Translator} annotation can be referenced by {@link #addTranslator(String, String, Map)}
 * @param ef
 * @throws TranslatorException 
 */
public void addTranslator(Class<? extends ExecutionFactory> clazz) throws TranslatorException {
  try {
    VDBTranslatorMetaData vdbTranslatorMetaData = TranslatorUtil.buildTranslatorMetadata(clazz.newInstance(), null);
    if (vdbTranslatorMetaData != null) {
      translatorRepository.addTranslatorMetadata(vdbTranslatorMetaData.getName(), vdbTranslatorMetaData);
    } else {
      //not a well defined translator
      ExecutionFactory<?, ?> instance = clazz.newInstance();
      instance.start();
      addTranslator(clazz.getName(), instance);
    }
  } catch (InstantiationException | IllegalAccessException e) {
    throw new TranslatorException(e);
  }
}

origin: org.teiid.connectors/translator-simpledb

@Override
public void start() throws TranslatorException {
  super.start();
  addPushDownFunction(SIMPLEDB, EVERY, TypeFacility.RUNTIME_NAMES.STRING, TypeFacility.RUNTIME_NAMES.STRING+"[]"); //$NON-NLS-1$ 
  addPushDownFunction(SIMPLEDB, INTERSECTION, TypeFacility.RUNTIME_NAMES.BOOLEAN, TypeFacility.RUNTIME_NAMES.STRING+"[]", TypeFacility.RUNTIME_NAMES.STRING, TypeFacility.RUNTIME_NAMES.STRING); //$NON-NLS-1$ 
  addPushDownFunction(SIMPLEDB, INTERSECTION, TypeFacility.RUNTIME_NAMES.BOOLEAN, TypeFacility.RUNTIME_NAMES.STRING+"[]", TypeFacility.RUNTIME_NAMES.STRING, TypeFacility.RUNTIME_NAMES.STRING, TypeFacility.RUNTIME_NAMES.STRING); //$NON-NLS-1$ 
  addPushDownFunction(SIMPLEDB, INTERSECTION, TypeFacility.RUNTIME_NAMES.BOOLEAN, TypeFacility.RUNTIME_NAMES.STRING+"[]", TypeFacility.RUNTIME_NAMES.STRING, TypeFacility.RUNTIME_NAMES.STRING, TypeFacility.RUNTIME_NAMES.STRING, TypeFacility.RUNTIME_NAMES.STRING); //$NON-NLS-1$ 
}

origin: teiid/teiid

@Test public void testPushdownFunctionSupport() throws Exception {
  ExecutionFactory<Object, Object> ef  = new ExecutionFactory<Object, Object>(){
    
    @Override
    public void start() throws TranslatorException {
      super.start();
      addPushDownFunction("ns", "func", DataTypeManager.DefaultDataTypes.STRING, DataTypeManager.DefaultDataTypes.STRING);
    }
  };
  ef.start();
  BasicSourceCapabilities bsc = CapabilitiesConverter.convertCapabilities(ef, "conn"); //$NON-NLS-1$
  assertTrue("Did not get expected capabilities", bsc.supportsFunction("ns.func")); //$NON-NLS-1$ //$NON-NLS-2$
}

origin: teiid/teiid

  @Test public void testCTESupport() throws Exception {
    final AtomicBoolean bool = new AtomicBoolean(false);
    ExecutionFactory<Object, Object> ef  = new ExecutionFactory<Object, Object>(){
      @Override
      public boolean supportsCommonTableExpressions() {
        return bool.get();
      }
      @Override
      public boolean supportsRecursiveCommonTableExpressions() {
        return true;
      }
    };
    ef.start();
    BasicSourceCapabilities bsc = CapabilitiesConverter.convertCapabilities(ef, "conn"); //$NON-NLS-1$
    assertFalse(bsc.supportsCapability(Capability.RECURSIVE_COMMON_TABLE_EXPRESSIONS));
    
    bool.set(true);
    bsc = CapabilitiesConverter.convertCapabilities(ef, "conn"); //$NON-NLS-1$
    assertTrue(bsc.supportsCapability(Capability.RECURSIVE_COMMON_TABLE_EXPRESSIONS));
  }
}
origin: org.teiid.connectors/translator-jpa

@Override
public void start() throws TranslatorException {
  super.start();
  setSupportsInnerJoins(true);
  setSupportsOrderBy(true);
  setSupportsSelectDistinct(true);
  setSupportedJoinCriteria(SupportedJoinCriteria.KEY);
  setSupportsOuterJoins(true);
  
  registerFunctionModifier(SourceSystemFunctions.LCASE, new AliasModifier("lower")); //$NON-NLS-1$
  registerFunctionModifier(SourceSystemFunctions.UCASE, new AliasModifier("upper")); //$NON-NLS-1$
  registerFunctionModifier(SourceSystemFunctions.CURDATE, new AliasModifier("current_date")); //$NON-NLS-1$
  registerFunctionModifier(SourceSystemFunctions.CURTIME, new AliasModifier("current_time")); //$NON-NLS-1$
}

origin: teiid/teiid

@Test public void testConverts() throws Exception {
  ExecutionFactory<Object, Object> ef  = new ExecutionFactory<Object, Object>(){
    @Override
    public boolean supportsConvert(int fromType, int toType) {
      return false;
    }
    @Override
    public List<String> getSupportedFunctions() {
      return Arrays.asList("convert");
    }
  };
  ef.start();
  BasicSourceCapabilities bsc = CapabilitiesConverter.convertCapabilities(ef, "conn"); //$NON-NLS-1$
  assertTrue(bsc.supportsFunction("convert")); //$NON-NLS-1$ 
  assertFalse(bsc.supportsConvert(TypeFacility.RUNTIME_CODES.BIG_DECIMAL, TypeFacility.RUNTIME_CODES.BIG_INTEGER));
}

origin: org.teiid.connectors/translator-mongodb

@SuppressWarnings("nls")
@Override
public void start() throws TranslatorException {
  super.start();
org.teiid.translatorExecutionFactorystart

Javadoc

Initialize the connector with supplied configuration

Popular methods of ExecutionFactory

  • createExecution
  • getMetadata
  • isSourceRequired
  • areLobsUsableAfterClose
  • closeConnection
  • getCacheDirective
  • getCollationLocale
  • getConnection
  • getDefaultNullOrder
  • getDirectQueryProcedureName
  • getExcludedCommonTableExpressionName
  • getMaxDependentInPredicates
  • getExcludedCommonTableExpressionName,
  • getMaxDependentInPredicates,
  • getMaxFromGroups,
  • getMaxInCriteriaSize,
  • getPushDownFunctions,
  • getRequiredLikeEscape,
  • getSupportedFunctions,
  • getSupportedJoinCriteria,
  • getTransactionSupport

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Join (org.hibernate.mapping)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now