Package org.palo.api

Examples of org.palo.api.Database


      ConnectionFactory.getInstance().getConfiguration(psd.host, psd.port, user, pass);
    cfg.setTimeout(120000);
    cfg.setLoadOnDemand(true);
    try {
      Connection con = ConnectionFactory.getInstance().newConnection(cfg);
      Database db = con.getDatabaseByName("Config");
      if (db != null) {
        Cube c = db.getCubeByName("#_connections");
        if (c != null) {
          Dimension conDim = c.getDimensionByName("connections");
          Dimension conAttribDim = c.getDimensionByName("#_connections_");
          ArrayList <Element []> coords = new ArrayList<Element[]>();
          ArrayList <Element> attributes = new ArrayList<Element>();
View Full Code Here


      ConnectionFactory.getInstance().getConfiguration(psd.host, psd.port, user, pass);
    cfg.setTimeout(120000);
    cfg.setLoadOnDemand(true);
    try {
      Connection con = ConnectionFactory.getInstance().newConnection(cfg);
      Database db = con.getDatabaseByName("Config");
      if (db != null) {
        return parsePaloStudioConnectionData(user, pass, psd.host, psd.port, db, viewId, log, data, locale);
      } else {
        log.error("No configuration database found...", new NullPointerException());
        return null;
View Full Code Here

  private final boolean doCreateDefaultView(XView xView) {
    return xView.getId() == null;
  }
  private final synchronized Cube getCube(XView xView, String sessionId) {
    Connection paloConnection = getConnection(xView.getAccountId(), sessionId);
    Database database = paloConnection.getDatabaseById(xView.getDatabaseId());
    return database.getCubeById(xView.getCubeId());
  }
View Full Code Here

    }
  }

  private final XObject[] load(XDatabase xDatabase, AuthUser user, String sessionId) {
    try {
      Database database = getDatabase(xDatabase, user, sessionId);
      if(database != null) {
        //      if (database.getConnection().getType() == Connection.TYPE_HTTP) {
        //        ((DatabaseImpl) database).clearCache();
//        }
        Cube[] cubes = database.getCubes(PaloObject.TYPE_NORMAL);
        List<XObject> xCubes = new ArrayList<XObject>();
        for(Cube cube : cubes) {
          if(isValid(cube)) {
            XObject xCube =
              new XCube(cube.getId(), cube.getName(), xDatabase);         
View Full Code Here

      ConnectionPoolManager.getInstance().disconnect(acc, sessionId, "ViewImporterTreeLoader.load3");
    }
  }

  private final Cube getCube(XCube xCube, AuthUser user, String sessionId) {
    Database database = getDatabase(xCube.getDatabase(), user, sessionId);
    if(database != null)
      return database.getCubeById(xCube.getId());
    return null;
  }
View Full Code Here

TOP

Related Classes of org.palo.api.Database

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.