Examples of selectFrom()


Examples of com.projity.algorithm.Query.selectFrom()

  }

  public Query workQuery() {
    Query query = Query.getInstance();
    SelectFrom clause = SelectFrom.getInstance();
    query.selectFrom(clause)
      .action(work(clause));
    return query;
  }

  public void calcDataBetween(Object type, HasStartAndEnd generator, CalculatedValues values) {
View Full Code Here

Examples of com.projity.algorithm.Query.selectFrom()

      clause.whereInRange(generator.getStart(),generator.getEnd()); // automatically also adds a generator to limit range

    CalculatedValuesFunctor visitor = CalculatedValuesFunctor.getInstance(dataFunctor,values, (TimeIteratorGenerator)generator);

    Query query = Query.getInstance();
    query.selectFrom(clause);
    if (generator != null && generator instanceof TimeIteratorGenerator) {
      query.groupBy((TimeIteratorGenerator)generator)
         .action(visitor);
    } else {
      clause.select(visitor); // replaces other one
View Full Code Here

Examples of org.codehaus.preon.annotation.BoundObject.selectFrom()

    private <T> Codec<T> createCodec(Class<T> type, ResolverContext context,
                                     AnnotatedElement metadata) {
        BoundObject settings = metadata.getAnnotation(BoundObject.class);
        // TODO: Handle type incompatibility
        if (Void.class.equals(settings.type())) {
            if (settings.selectFrom().alternatives().length > 0
                    || settings.selectFrom().defaultType() != Void.class) {
                return (Codec<T>) new SelectFromCodec(type, settings
                        .selectFrom(), context, codecFactory,
                        hideChoices(metadata));
            }
View Full Code Here

Examples of org.codehaus.preon.annotation.BoundObject.selectFrom()

                                     AnnotatedElement metadata) {
        BoundObject settings = metadata.getAnnotation(BoundObject.class);
        // TODO: Handle type incompatibility
        if (Void.class.equals(settings.type())) {
            if (settings.selectFrom().alternatives().length > 0
                    || settings.selectFrom().defaultType() != Void.class) {
                return (Codec<T>) new SelectFromCodec(type, settings
                        .selectFrom(), context, codecFactory,
                        hideChoices(metadata));
            }
            if (settings.types().length == 0) {
View Full Code Here

Examples of org.codehaus.preon.annotation.BoundObject.selectFrom()

        BoundObject settings = metadata.getAnnotation(BoundObject.class);
        // TODO: Handle type incompatibility
        if (Void.class.equals(settings.type())) {
            if (settings.selectFrom().alternatives().length > 0
                    || settings.selectFrom().defaultType() != Void.class) {
                return (Codec<T>) new SelectFromCodec(type, settings
                        .selectFrom(), context, codecFactory,
                        hideChoices(metadata));
            }
            if (settings.types().length == 0) {
                return createCodec(type, context);
View Full Code Here

Examples of org.jooq.DSLContext.selectFrom()

        AuthorRecord author;

        try {
            Tools.title("Loading and changing active records");
            author = dsl.selectFrom(AUTHOR).where(AUTHOR.ID.eq(1)).fetchOne();
            author.setDateOfBirth(Date.valueOf("2000-01-01"));
            author.store();
            Tools.print(author);

View Full Code Here

Examples of org.jooq.DSLContext.selectFrom()

            Tools.print(author);


            Tools.title("Deleting an active record");
            author.delete();
            Tools.print(dsl.selectFrom(AUTHOR).fetch());

        }

        // Don't store the changes
        finally {
View Full Code Here

Examples of org.jooq.DSLContext.selectFrom()

        DSLContext dsl = DSL.using(connection, new Settings().withExecuteWithOptimisticLocking(true));

        try {
            Tools.title("Applying optimistic locking");

            BookRecord book1 = dsl.selectFrom(BOOK).where(BOOK.ID.eq(1)).fetchOne();
            BookRecord book2 = dsl.selectFrom(BOOK).where(BOOK.ID.eq(1)).fetchOne();

            book1.setTitle("New Title");
            book1.store();
View Full Code Here

Examples of org.jooq.DSLContext.selectFrom()

        try {
            Tools.title("Applying optimistic locking");

            BookRecord book1 = dsl.selectFrom(BOOK).where(BOOK.ID.eq(1)).fetchOne();
            BookRecord book2 = dsl.selectFrom(BOOK).where(BOOK.ID.eq(1)).fetchOne();

            book1.setTitle("New Title");
            book1.store();

            book2.setTitle("Another Title");
View Full Code Here

Examples of org.jooq.DSLContext.selectFrom()

        }
    }

    private final int executeSelectFrom() {
        DSLContext create = create(configuration);
        Result<?> result = create.selectFrom(table(asField())).fetch();
        outValues.put(returnParameter, result);
        return 0;
    }

    private final int executeSelect() {
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.