Examples of CustomQuery


Examples of com.googlecode.sonic.util.CustomQuery

   *
   * @param id
   * @return kindで指定したEntityクラス。
   */
  protected Entity select(Long id) {
    return new CustomQuery(kindOfEntity).eq(ID, id).eq(DELETED, false)
        .asSingle();
  }
View Full Code Here

Examples of com.googlecode.sonic.util.CustomQuery

   * @throws ServiceException
   */
  @SuppressWarnings("unchecked")
  protected List<Entity> selectAll() throws ServiceException {
    try {
      CustomQuery customQuery = new CustomQuery(kindOfEntity);
      return (List<Entity>) customQuery.eq(DELETED, false)
          .desc(CREATE_DATE).asList();
    } catch (Exception e) {
      throw new ServiceException(e);
    }
  }
View Full Code Here

Examples of com.googlecode.sonic.util.CustomQuery

   *
   * @return 最大ID値+1のID
   */
  @SuppressWarnings("unchecked")
  protected long getNextId() {
    List<Entity> entity = (List<Entity>) new CustomQuery(kindOfEntity)
        .desc(ID).asList();
    if (entity.isEmpty()) {
      return 1L;
    } else {
      return (Long) entity.get(0).getProperty(ID) + 1;
View Full Code Here

Examples of org.gdbms.engine.customQuery.CustomQuery

   * @throws DriverLoadException
   * @see org.gdbms.engine.strategies.Strategy#custom(String,
   *      org.gdbms.engine.instruction.CustomAdapter)
   */
  public DataSource custom(CustomAdapter instr) throws ExecutionException {
    CustomQuery query = QueryManager.getQuery(instr.getQueryName());

    if (query == null) {
      throw new RuntimeException("No such custom query");
    }

    try {
      return query.evaluate(instr.getTables(), instr.getValues());
    } catch (DriverLoadException e) {
      throw new ExecutionException(e);
    } catch (NoSuchTableException e) {
      throw new ExecutionException(e);
    } catch (DataSourceCreationException e) {
View Full Code Here

Examples of org.hibernate.loader.custom.CustomQuery

    return builder.buildParameterMetadata( nativeQuery );
  }

  @Override
  public NativeSQLQueryPlan createQueryPlan(NativeSQLQuerySpecification specification, SessionFactoryImplementor sessionFactory) {
    CustomQuery customQuery = getCustomQuery( gridDialect, specification, sessionFactory );
    return new NativeNoSqlQueryPlan( specification.getQueryString(), customQuery );
  }
View Full Code Here

Examples of org.hibernate.loader.custom.CustomQuery

    return builder.buildParameterMetadata( nativeQuery );
  }

  @Override
  public NativeSQLQueryPlan createQueryPlan(NativeSQLQuerySpecification specification, SessionFactoryImplementor sessionFactory) {
    CustomQuery customQuery = getCustomQuery( gridDialect, specification, sessionFactory );
    return new NativeNoSqlQueryPlan( specification.getQueryString(), customQuery );
  }
View Full Code Here

Examples of org.hibernate.loader.custom.CustomQuery

        context.getSession().getFactory()
    );
    processor.process();
    final List<org.hibernate.loader.custom.Return> customReturns = processor.generateCustomReturns( false );

    CustomQuery customQuery = new CustomQuery() {
      @Override
      public String getSQL() {
        return context.getSql();
      }
View Full Code Here

Examples of org.hibernate.loader.custom.CustomQuery

  @Override
  public List<?> list(NativeSQLQuerySpecification spec, QueryParameters queryParameters) throws HibernateException {
    // TODO OGM-414 Implement query plan cache

    NativeNoSqlQuerySpecification noSqlQuerySpec = (NativeNoSqlQuerySpecification) spec;
    CustomQuery customQuery = new BackendCustomQuery( noSqlQuerySpec, factory );

    return listCustomQuery( customQuery, queryParameters );
  }
View Full Code Here

Examples of org.hibernate.loader.custom.CustomQuery

        context.getSession().getFactory()
    );
    processor.process();
    final List<org.hibernate.loader.custom.Return> customReturns = processor.generateCustomReturns( false );

    CustomQuery customQuery = new CustomQuery() {
      @Override
      public String getSQL() {
        return context.getSql();
      }
View Full Code Here

Examples of org.hibernate.loader.custom.CustomQuery

        context.getSession().getFactory()
    );
    processor.process();
    final List<org.hibernate.loader.custom.Return> customReturns = processor.generateCustomReturns( false );

    CustomQuery customQuery = new CustomQuery() {
      @Override
      public String getSQL() {
        return context.getSql();
      }
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.