Tabnine Logo
ca.carleton.gcrc.jdbc
Code IndexAdd Tabnine to your IDE (free)

How to use ca.carleton.gcrc.jdbc

Best Java code snippets using ca.carleton.gcrc.jdbc (Showing top 18 results out of 315)

origin: ca.carleton.gcrc/nunaliit2-jdbc-json

  public void destroy() {
    connections.closeAllConnections();
  }
}
origin: ca.carleton.gcrc/nunaliit2-auth-common

public UserRepositoryDb(ServletContext servletContext) throws ServletException {
  connections = JdbcConnections.connectionsFromServletContext(servletContext);
  try {
    connection = connections.getDb();
  } catch (Exception e) {
    throw new ServletException("Unable to get default DB from connections",e);
  }
}
origin: ca.carleton.gcrc/nunaliit2-jdbc-json

public void init(ServletConfig config) throws ServletException {
  super.init(config);
  connections = JdbcConnections.connectionsFromServletContext(config.getServletContext());
}

origin: ca.carleton.gcrc/nunaliit2-jdbc-json

  con = connections.getDb(dbs[0]);
} catch (Exception e) {
  throw new ServletException("Error while connecting to database ("+dbs[0]+")",e);
origin: ca.carleton.gcrc/nunaliit2-jdbc-json

private String GenerateWhereClause(List<Where> whereParms) throws Exception {
  boolean firstSelect = true;
  String retVal = "";
  Iterator<Where> itWhere = whereParms.iterator();
  while( itWhere.hasNext() ) {
    Where where = itWhere.next();
    if( firstSelect ) {
      firstSelect = false;
      retVal += " WHERE ";
    } else {
      retVal += " AND ";
    }
    retVal += (JdbcUtils.safeSqlQueryIdentifier(where.getLeft()) + " " + where.getOp().getSqlQuery() + " ");
    if( null != where.getStringValue() ) {
      retVal += (JdbcUtils.safeSqlQueryStringValue(where.getStringValue()));
    } else {
      retVal += ""+where.getIntValue();
    }
  }
  return(retVal);
}

origin: ca.carleton.gcrc/nunaliit2-jdbc-json

    sqlQuery += JdbcUtils.safeSqlQueryIdentifier(includeString) + ",";
sqlQuery += "ST_X(ST_GeometryN(" + JdbcUtils.safeSqlQueryIdentifier(geomParm) +
  ",1)) as " + JdbcUtils.safeSqlQueryIdentifier(xnameParm) + ",";
sqlQuery += "ST_Y(ST_GeometryN(" + JdbcUtils.safeSqlQueryIdentifier(geomParm) +
  ",1)) as " + JdbcUtils.safeSqlQueryIdentifier(ynameParm) + " ";
sqlQuery += "FROM " + JdbcUtils.safeSqlQueryIdentifier(tableParm) + " ";
origin: ca.carleton.gcrc/nunaliit2-jdbc-json

    sqlQuery += JdbcUtils.safeSqlQueryIdentifier(includeString) + ",";
    orderByClause += ",";
  sqlQuery += JdbcUtils.safeSqlQueryIdentifier(fieldString);
  whereClause += "lower(" + JdbcUtils.safeSqlQueryIdentifier(fieldString) + ") LIKE lower(" +
    JdbcUtils.safeSqlQueryStringValue("%" + matchText + "%") + ") ";
  if (1 == fields.size()) {
      JdbcUtils.safeSqlQueryStringValue(matchText) + ") IN lower(" +
      JdbcUtils.safeSqlQueryIdentifier(fieldString) + "))";
  } else {
    if (count < (fields.size() - 1)) {
      orderByClause += "least(coalesce(nullif(position(lower(" +
        JdbcUtils.safeSqlQueryStringValue(matchText) + ") IN lower(" +
        JdbcUtils.safeSqlQueryIdentifier(fieldString) + ")), 0), 9999)";
      orderByClosing += ")";
    } else {
      orderByClause += "coalesce(nullif(position(lower(" +
        JdbcUtils.safeSqlQueryStringValue(matchText) + ") IN lower(" +
        JdbcUtils.safeSqlQueryIdentifier(fieldString) + ")), 0), 9999)";
    JdbcUtils.safeSqlQueryIdentifier(scoreParm);
sqlQuery += " FROM " + JdbcUtils.safeSqlQueryIdentifier(tableParm) +
  whereClause + "ORDER BY " + orderByClause + orderByClosing + ";";
origin: ca.carleton.gcrc/nunaliit2-auth-common

int userId = JdbcUtils.extractIntResult(rs,rsmd,1);
String email = JdbcUtils.extractStringResult(rs,rsmd,2);
String displayName = JdbcUtils.extractStringResult(rs,rsmd,3);
String dbPassword = JdbcUtils.extractStringResult(rs,rsmd,4);
int groupId = JdbcUtils.extractIntResult(rs,rsmd,5);
origin: ca.carleton.gcrc/nunaliit2-adhocQueries

public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    connections = JdbcConnections.connectionsFromServletContext(config.getServletContext());
    connection = connections.getDb();
  } catch (Exception e) {
    throw new ServletException("Error while connecting to database",e);
  }
  queries = new AdhocQueries(connection);
}
origin: ca.carleton.gcrc/nunaliit2-auth-common

public void destroy() {
  if( null != connections ) {
    connections.closeAllConnections();
  }
}
origin: ca.carleton.gcrc/nunaliit2-jdbc-json

      sqlQuery += ",";
    sqlQuery += JdbcUtils.safeSqlQueryIdentifier(selectString);
sqlQuery += " FROM " + JdbcUtils.safeSqlQueryIdentifier(tableParm);
      sqlQuery += ",";
    sqlQuery += JdbcUtils.safeSqlQueryIdentifier(group);
origin: ca.carleton.gcrc/nunaliit2-dbWeb

public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    connections = JdbcConnections.connectionsFromServletContext(config.getServletContext());
    connection = connections.getDb();
  } catch (Exception e) {
    throw new ServletException("Error while connecting to database",e);
  }
  
  dbSecurity = new DbSecurity(connection);
}
origin: ca.carleton.gcrc/nunaliit2-search

public void destroy() {
  connections.closeAllConnections();
}
origin: ca.carleton.gcrc/nunaliit2-search

public void init(ServletConfig config) throws ServletException {
  super.init(config);
  
  ServletContext servletContext = config.getServletContext();
  try {
    connections = JdbcConnections.connectionsFromServletContext(servletContext);
    connection = connections.getDb();
  } catch (Exception e) {
    throw new ServletException("Error while connecting to database",e);
  }
  
  // Load up configuration information
  Properties props = new Properties();
  {
    if( null != servletContext ) {
      Object propertiesObj = servletContext.getAttribute(PROPERTIES_SERVLET_ATTRIB_NAME);
      if( null != propertiesObj
       && propertiesObj instanceof Properties ) {
        props = (Properties)propertiesObj;
      }
    }
  }
  
  searches = new Searches(props,connection);
}
origin: ca.carleton.gcrc/nunaliit2-dbWeb

public void destroy() {
  connections.closeAllConnections();
}
origin: ca.carleton.gcrc/nunaliit2-contributions

public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    connections = JdbcConnections.connectionsFromServletContext(config.getServletContext());
    connection = connections.getDb();
  } catch (Exception e) {
    throw new ServletException("Error while connecting to database",e);
  }
  
  userRepository = UserRepositorySingleton.getSingleton();
  
  contributions = ContributionsUtils.createContibutionHandler(config.getServletContext(), connection);
  if (null == contributions) {
    return;
  }
  
  try {
    ContributionComet contComet = new ContributionCometImpl(config.getServletContext());
    contributions.setContributionComet( contComet );
  } catch(Exception e) {
    logger.error("Comet not available for contributions", e);
  }
}
origin: ca.carleton.gcrc/nunaliit2-adhocQueries

public void destroy() {
  connections.closeAllConnections();
}
origin: ca.carleton.gcrc/nunaliit2-contributions

public void destroy() {
  connections.closeAllConnections();
}
ca.carleton.gcrc.jdbc

Most used classes

  • JdbcConnections
  • JdbcUtils
  • JdbcDataAsJSONArray
  • Where$OpTypes
  • Where
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now