Examples of DBHelper


Examples of com.data2semantics.yasgui.server.db.DbHelper

  }

  @Override
  public boolean isEndpointAccessible(String endpoint) throws IllegalArgumentException {
    try {
      DbHelper db = new DbHelper(new File(getServletContext().getRealPath("/")), getThreadLocalRequest());
      AccessibilityStatus status = AccessibilityStatus.UNCHECKED;
      try {
        db.isEndpointAccessible(db.getEndpointId(endpoint, EndpointPrivateFlag.OWN_AND_PUBLIC));
      } catch (EndpointIdException e) {
        //do nothing, endpoint not known yet. i.e., leave status 'unchecked'
      }
     
      if (status == AccessibilityStatus.UNCHECKED) {
View Full Code Here

Examples of com.data2semantics.yasgui.server.db.DbHelper

  }

  @Override
  public void clearPrivateCompletions(FetchType type, FetchMethod method, String endpoint) throws IllegalArgumentException {
    try {
      DbHelper db = new DbHelper(new File(getServletContext().getRealPath("/")), getThreadLocalRequest());
      int endpointId = db.getEndpointId(endpoint, EndpointPrivateFlag.OWN);
      db.clearPreviousAutocompletionFetches(endpointId, method, type);
    } catch (Exception e) {
      throw new IllegalArgumentException(e.getMessage());
    }
   
  }
View Full Code Here

Examples of com.data2semantics.yasgui.server.db.DbHelper

    this.method = method;
    this.endpoint = endpoint;
    this.partialCompletion = partialCompletion;
    this.maxResults = maxResults;
   
    this.dbHelper = new DbHelper(new File(configDir), request);
   
    try {
      endpointId = getEndpointId(dbHelper, endpoint);
    } catch (EndpointIdException e) {
      //endpoint not reachable, AND user not logged in
View Full Code Here

Examples of org.apache.cayenne.test.jdbc.DBHelper

    protected DataSourceInfo getConnectionInfo() throws Exception {
        return CayenneResources.getResources().getConnectionInfo();
    }

    protected DBHelper getDbHelper() {
        return new DBHelper(getNode().getDataSource());
    }
View Full Code Here

Examples of org.apache.cayenne.test.jdbc.DBHelper

        UuidRelationshipFilter filter = new UuidRelationshipFilter();
        runtime.getDataDomain().addFilter(filter);
        runtime.getDataDomain().getEntityResolver().getCallbackRegistry().addListener(
                filter);

        DBHelper dbHelper = new DBHelper(runtime.getDataSource(null));

        rootTable = new TableHelper(dbHelper, "UUID_ROOT1").setColumns("ID", "UUID");
        rootTable.deleteAll();

        e1Table = new TableHelper(dbHelper, "E1").setColumns("ID");
View Full Code Here

Examples of org.apache.cayenne.test.jdbc.DBHelper

    private TableHelper e2Helper;

    @Override
    protected void setUp() throws Exception {
        runtime = new ServerRuntime("cayenne-lifecycle.xml");
        dbHelper = new DBHelper(runtime.getDataSource("lifecycle-db"));
        e1Helper = new TableHelper(dbHelper, "E1", "ID");
        e2Helper = new TableHelper(dbHelper, "E2", "ID");
    }
View Full Code Here

Examples of org.apache.cayenne.test.jdbc.DBHelper

    @Override
    protected void setUp() throws Exception {
        runtime = new ServerRuntime("cayenne-lifecycle.xml");

        DBHelper dbHelper = new DBHelper(runtime.getDataSource(null));

        auditable1 = new TableHelper(dbHelper, "AUDITABLE1").setColumns("ID", "CHAR_PROPERTY1");

        auditableChild1 = new TableHelper(dbHelper, "AUDITABLE_CHILD1").setColumns("ID", "AUDITABLE1_ID",
                "CHAR_PROPERTY1");
View Full Code Here

Examples of org.apache.cayenne.test.jdbc.DBHelper

        ObjectIdRelationshipFilter filter = new ObjectIdRelationshipFilter();
        runtime.getDataDomain().addFilter(filter);
        runtime.getDataDomain().getEntityResolver().getCallbackRegistry().addListener(
                filter);

        DBHelper dbHelper = new DBHelper(runtime.getDataSource(null));

        rootTable = new TableHelper(dbHelper, "UUID_ROOT1").setColumns("ID", "UUID");
        rootTable.deleteAll();

        e1Table = new TableHelper(dbHelper, "E1").setColumns("ID");
View Full Code Here

Examples of org.apache.cayenne.test.jdbc.DBHelper

    protected DataSourceInfo getConnectionInfo() throws Exception {
        return CayenneResources.getResources().getConnectionInfo();
    }

    protected DBHelper getDbHelper() {
        return new DBHelper(getNode().getDataSource());
    }
View Full Code Here

Examples of org.apache.cayenne.test.jdbc.DBHelper

    assertSame(eventManager1, eventManager2);
    assertSame(sorter1, sorter2);
  }

  public void testNewContext_separateObjects() throws Exception {
    DBHelper dbUtils = getDbUtils();
    dbUtils.deleteAll("TABLE1");
    dbUtils.insert("TABLE1", new String[] { "ID", "NAME" }, new Object[] {
        1, "Abc" });

    SelectQuery query = new SelectQuery(Table1.class);

    ObjectContext context1 = runtime.getContext();
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.