Package org.xorm.datastore

Examples of org.xorm.datastore.Table


    // Convert DataQuery to Selector
    private Selector makeSelector(DataQuery dataQuery) {
  Class targetClass = dataQuery.getCandidateClass();
  ClassMapping mapping = modelMapping.getClassMapping(targetClass);
  Table table = mapping.getTable();
  Condition dataCondition = dataQuery.getCondition();
  if (dataCondition instanceof RawCondition) {
      // Resolve parameters
      dataCondition = makeRawCondition((RawCondition) dataCondition);
  }
View Full Code Here


    }

    // Called internally
    private Selector getSelector(Expression expression) {
  mapping = modelMapping.getClassMapping(query.getCandidateClass());
  Table table = mapping.getTable();
  top = new Selector(table, null);
  selector = top;
  expression.accept(this);

  // Deal with boolean standalones
View Full Code Here

  if ("contains".equals(name)) {
      Expression owner = exp.getOwner();

      if ((owner instanceof Expression.Parameter) && (operand instanceof Expression)) {
    mapping = modelMapping.getClassMapping(query.getCandidateClass());
    Table table = mapping.getTable();
    top = new Selector(table, null);
    selector = top;
    operand.accept(this);
    selector.setCondition
        (new SimpleCondition
View Full Code Here

    public void setTable(Table table) {
        boolean fakeTable = false;
        Column pk;
        if (table == null) {
            fakeTable = true;
            table = new Table(clazz.getName());
            pk = new Column(table, "xorm_pk");
            table.addColumn(pk);
            table.setPrimaryKey(pk);
            Iterator i = fields.iterator();
            while (i.hasNext()) {
View Full Code Here

import org.xorm.tests.model.*;

public class TestFetchGroupManager extends FetchGroupManager {

    public DataFetchGroup getDataFetchGroup(ClassMapping mapping) {
  Table table = mapping.getTable();
  if ("employee".equals(table.getName())) {
      DataFetchGroup dfg = new DataFetchGroup(table.getColumns());
      mapping = XORM.getModelMapping(factory).getClassMapping(Address.class);
      DataFetchGroup dfg2 = new DataFetchGroup(mapping.getTable().getColumns());
      dfg.addSubgroup(table.getColumnByName("address_id"), dfg2);
      return dfg;
  } else {
      return super.getDataFetchGroup(mapping);
  }
    }
View Full Code Here

TOP

Related Classes of org.xorm.datastore.Table

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.