Examples of Functions


Examples of io.crate.metadata.Functions

    public void testTimestampTypeValidation() throws Exception {
        Injector injector = new ModulesBuilder()
                .add(new TestModule())
                .createInjector();

        Functions functions = injector.getInstance(Functions.class);
        functions.get(new FunctionIdent(AddFunction.NAME,
                Arrays.<DataType>asList(DataTypes.TIMESTAMP, DataTypes.TIMESTAMP)));
    }
View Full Code Here

Examples of io.crate.metadata.Functions

        }
    }

    @Before
    public void setUp() throws Exception {
        Functions functions = new Functions(
                ImmutableMap.<FunctionIdent, FunctionImplementation>of(),
                ImmutableMap.<String, DynamicFunctionResolver>of()
        );
        inputSymbolVisitor =
                new FileCollectInputSymbolVisitor(functions, FileLineReferenceResolver.INSTANCE);
View Full Code Here

Examples of lib.util.Functions

    }
    return complaintRep.insert(complaint);
  }

  public void validate(Complaint complaint) {
    Functions f = new Functions();

    if (complaint == null) {
      throw new IllegalArgumentException();
    }

    f.campoPreenchido(complaint.getDescricao());

    if (complaint instanceof AnimalComplaint) {
      f.campoPreenchido(((AnimalComplaint) complaint).getOccurenceLocalAddress());
      f.campoPreenchido(((AnimalComplaint) complaint).getAnimal());
    }

    if (complaint instanceof FoodComplaint) {
      f.campoPreenchido(((FoodComplaint) complaint).getQtdeComensais());
      f.campoPreenchido(((FoodComplaint) complaint).getQtdeDoentes());
    }
  }
View Full Code Here

Examples of org.apache.commons.jxpath.Functions

    public Function getFunction(QName functionName, Object[] parameters) {
        String namespace = functionName.getPrefix();
        String name = functionName.getName();
        JXPathContext funcCtx = this;
        Function func = null;
        Functions funcs;
        while (funcCtx != null) {
            funcs = funcCtx.getFunctions();
            if (funcs != null) {
                func = funcs.getFunction(namespace, name, parameters);
                if (func != null) {
                    return func;
                }

                funcCtx = funcCtx.getParentContext();
View Full Code Here

Examples of org.apache.commons.jxpath.Functions

    public Function getFunction(QName functionName, Object[] parameters) {
        String namespace = functionName.getPrefix();
        String name = functionName.getName();
        JXPathContext funcCtx = this;
        Function func = null;
        Functions funcs;
        while (funcCtx != null) {
            funcs = funcCtx.getFunctions();
            if (funcs != null) {
                func = funcs.getFunction(namespace, name, parameters);
                if (func != null) {
                    return func;
                }
            }
            funcCtx = funcCtx.getParentContext();
View Full Code Here

Examples of org.apache.commons.jxpath.Functions

    public Function getFunction(QName functionName, Object[] parameters) {
        String namespace = functionName.getPrefix();
        String name = functionName.getName();
        JXPathContext funcCtx = this;
        Function func = null;
        Functions funcs;
        while (funcCtx != null) {
            funcs = funcCtx.getFunctions();
            if (funcs != null) {
                func = funcs.getFunction(namespace, name, parameters);
                if (func != null) {
                    return func;
                }
            }
            funcCtx = funcCtx.getParentContext();
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

  @Before
  public void setUp() throws Exception {
    JSONObject config = createConfig();

    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config, Expressions.forTesting(new Functions()));
    mockFetcher = mock(HttpFetcher.class);
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);
  }
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

    config.getJSONObject("default").
        getJSONObject(DefaultServiceFetcher.GADGETS_FEATURES_CONFIG)
        .remove(DefaultServiceFetcher.OSAPI_FEATURE_CONFIG);
    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config,
            Expressions.forTesting(new Functions()));
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);

    EasyMock.expect(mockFetcher.fetch(EasyMock.isA(HttpRequest.class))).andReturn(
        new HttpResponse("")).anyTimes();
    replay();
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

  protected void setUp() throws Exception {
    super.setUp();
    JSONObject config = createConfig();

    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config, new Expressions(new Functions(), null, new ShindigTypeConverter()));
    mockFetcher = mock(HttpFetcher.class);
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);
  }
View Full Code Here

Examples of org.apache.shindig.expressions.Functions

    config.getJSONObject("default").
        getJSONObject(DefaultServiceFetcher.GADGETS_FEATURES_CONFIG)
        .remove(DefaultServiceFetcher.OSAPI_FEATURE_CONFIG);
    JsonContainerConfig containerConfig =
        new JsonContainerConfig(config,
            new Expressions(new Functions(), null, new ShindigTypeConverter()));
    fetcher = new DefaultServiceFetcher(containerConfig, mockFetcher);

    EasyMock.expect(mockFetcher.fetch(EasyMock.isA(HttpRequest.class))).andReturn(
        new HttpResponse("")).anyTimes();
    replay();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.