Package org.xorm.query

Examples of org.xorm.query.SimpleCondition


            throw new JDOFatalUserException(I18N.msg("E_collection_no_source"));
        }
 
        Selector selector = new Selector
            (columnToUse.getTable(),
             new SimpleCondition(columnToUse, Operator.EQUAL, ownerPKey));
       
        if (mapping.getFilter() != null) {
            logger.fine("Filter: " + mapping.getFilter());
            logger.fine("Imports: " + mapping.getImports());
            logger.fine("Parameters: " + mapping.getParameters());
View Full Code Here


    public Collection select(Selector selector, Set extraRows) {
        System.out.println("HeapDriver: select " + selector);
        // Assumes we're dealing with a PK selector, not fully implemented.
        ArrayList list = new ArrayList();
        if (selector.getCondition() instanceof SimpleCondition) {
            SimpleCondition condition = (SimpleCondition) selector.getCondition();
            Table table = selector.getTable();
            Object primaryKey = condition.getValue();
            Row found = factory.getCache().get(table, primaryKey);
            if (found != null) {
                list.add((Row) found.clone());
            }
        }
View Full Code Here

  Collection xmlResults = null;
  if (condition == null) {
      xmlResults = new ArrayList();
      xmlResults.add(deriveValue(document.getRootElement(), table.getName()));
  } else if (condition instanceof SimpleCondition) {
      SimpleCondition sc = (SimpleCondition) condition;
      Column column = sc.getColumn();
      Object value = sc.getValue();

      // ".." == (Element) means get all children of an element
      // with an element name matching the table name.

      if ("..".equals(column.getName()) && (value instanceof Element)) {
View Full Code Here

            // Get the DataFetchGroup to use.
            DataFetchGroup dfg = factory.getFetchGroupManager()
                .getDataFetchGroup(classMapping);
            Selector selector = new Selector
                (table,
                 new SimpleCondition(table.getPrimaryKey(),
                                     Operator.EQUAL,
                                     primaryKey));
            selector.require(dfg);
            Collection rows = selectRows(selector);
            if (!rows.isEmpty()) {
View Full Code Here

                ((TransactionImpl) currentTransaction()).begin(true);
            }
            Object primaryKey = row.getPrimaryKeyValue();
            Selector selector = new Selector
                (table,
                 new SimpleCondition(table.getPrimaryKey(),
                                     Operator.EQUAL,
                                     primaryKey));
            selector.require(dfg);
            Set extraRows = new HashSet();
            rows = ((TransactionImpl) currentTransaction()).getDriver()
View Full Code Here

        Row row = null;

        DataFetchGroup dfg = new DataFetchGroup(table.getColumns());
        Selector selector = new Selector
            (table,
             new SimpleCondition(table.getPrimaryKey(),
                                 Operator.EQUAL,
                                 handler.getObjectId()));
        selector.require(dfg);
        Collection rows = selectRows(selector);
        if (!rows.isEmpty()) {
View Full Code Here

TOP

Related Classes of org.xorm.query.SimpleCondition

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.