Package ca.carleton.gcrc.dbSec

Examples of ca.carleton.gcrc.dbSec.DbTableAccess


        List<FieldSelector> groupByColumnNames = query.getGroupByColumnNames();
        List<OrderSpecifier> orderSpecifiers = query.getOrderBySpecifiers();
        Integer limit = query.getLimit();
        Integer offset = query.getOffset();
       
        DbTableAccess tableAccess = tableAccessCache.get(tableName);
        if( null == tableAccess ) {
          tableAccess = DbTableAccess.getAccess(dbSecurity, tableName, new DbUserAdaptor(user));
          tableAccessCache.put(tableName, tableAccess);
        }
       
        try {
          JSONArray queriedObjects = tableAccess.query(
              whereMap
              ,fieldSelectors
              ,groupByColumnNames
              ,orderSpecifiers
              ,limit
View Full Code Here


  private void performInsert(HttpServletRequest request, HttpServletResponse response) throws Exception {
    User user = AuthenticationUtils.getUserFromRequest(request);
    String tableName = getTableNameFromRequest(request);
   
    DbTableAccess tableAccess = DbTableAccess.getAccess(dbSecurity, tableName, new DbUserAdaptor(user));

    Map<String,String> setterMap = getSetParametersMap(request);

    JSONObject insertedObj = tableAccess.insert(setterMap);
   
    JSONObject obj = new JSONObject();
    obj.put("inserted", insertedObj);
   
    sendJsonResponse(response, obj);
View Full Code Here

 
  private void performUpdate(HttpServletRequest request, HttpServletResponse response) throws Exception {
    User user = AuthenticationUtils.getUserFromRequest(request);
    String tableName = getTableNameFromRequest(request);
   
    DbTableAccess tableAccess = DbTableAccess.getAccess(dbSecurity, tableName, new DbUserAdaptor(user));
   
    List<RecordSelector> whereMap = getRecordSelectorsFromRequest(request);
    Map<String,String> setterMap = getSetParametersMap(request);

    JSONArray updatedObjects = tableAccess.update(whereMap, setterMap);
   
    JSONObject obj = new JSONObject();
    obj.put("updated", updatedObjects);
   
    sendJsonResponse(response, obj);
View Full Code Here

 
  private void performDelete(HttpServletRequest request, HttpServletResponse response) throws Exception {
    User user = AuthenticationUtils.getUserFromRequest(request);
    String tableName = getTableNameFromRequest(request);
   
    DbTableAccess tableAccess = DbTableAccess.getAccess(dbSecurity, tableName, new DbUserAdaptor(user));
   
    List<RecordSelector> whereMap = getRecordSelectorsFromRequest(request);

    tableAccess.delete(whereMap);
   
    JSONObject obj = new JSONObject();
   
    sendJsonResponse(response, obj);
  }
View Full Code Here

TOP

Related Classes of ca.carleton.gcrc.dbSec.DbTableAccess

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.