com.dhtmlx.connector
Class GridConnector

java.lang.Object
  extended by com.dhtmlx.connector.BaseConnector
      extended by com.dhtmlx.connector.GridConnector
Direct Known Subclasses:
TreeGridConnector

public class GridConnector
extends BaseConnector

The Class GridConnector.


Field Summary
protected  java.lang.StringBuffer extra_output
          The extra info , which need to be mixed in output
protected  java.util.HashMap<java.lang.String,BaseConnector> options
          The collections of options
 
Fields inherited from class com.dhtmlx.connector.BaseConnector
access, cfactory, config, db_type, dynloading, dynloading_size, event, global_http_request, global_http_response, http_request, http_response, incoming_data, request, sql
 
Constructor Summary
GridConnector(java.sql.Connection db)
          Instantiates a new grid connector.
GridConnector(java.sql.Connection db, DBType db_type)
          Instantiates a new grid connector.
GridConnector(java.sql.Connection db, DBType db_type, BaseFactory a_factory)
          Instantiates a new grid connector.
 
Method Summary
protected  void fill_collections(java.lang.String[] columns)
          Fill collections of options with data from DB
protected  void parse_request()
          Parse http request Methods sets "dynloading", "editing" flags and fill request object with info about requested sorting|filtering options.
protected  java.lang.String resolve_parameter(java.lang.String name)
          Resolve incoming http parameter Translate name of incoming parameter to the name of related DB field
 void set_options(java.lang.String name, BaseConnector connector)
          Define connector for options retrieving
 void set_options(java.lang.String name, java.util.HashMap object)
          Define fixed list of options
 void set_options(java.lang.String name, java.lang.Iterable object)
          Define fixed list of options
protected  java.lang.String xml_end()
          Get closing top level xml tag
protected  java.lang.String xml_start()
          Get opening top level xml tag
 
Methods inherited from class com.dhtmlx.connector.BaseConnector
dynamic_loading, dynamic_loading, enable_log, end_run, get_connection, is_select_mode, output_as_xml, output_as_xml, render_connector, render_set, render_sql, render_sql, render_sql, render_table, render_table, render_table, render, safe_field_name, servlet, set_encoding, uuid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extra_output

protected java.lang.StringBuffer extra_output
The extra info , which need to be mixed in output


options

protected java.util.HashMap<java.lang.String,BaseConnector> options
The collections of options

Constructor Detail

GridConnector

public GridConnector(java.sql.Connection db)
Instantiates a new grid connector.

Parameters:
db - the db connection

GridConnector

public GridConnector(java.sql.Connection db,
                     DBType db_type)
Instantiates a new grid connector.

Parameters:
db - the db connection
db_type - the db type

GridConnector

public GridConnector(java.sql.Connection db,
                     DBType db_type,
                     BaseFactory a_factory)
Instantiates a new grid connector.

Parameters:
db - the db connection
db_type - the db type
a_factory - the class factory, which will be used by object
Method Detail

parse_request

protected void parse_request()
Description copied from class: BaseConnector
Parse http request Methods sets "dynloading", "editing" flags and fill request object with info about requested sorting|filtering options.

Overrides:
parse_request in class BaseConnector

fill_collections

protected void fill_collections(java.lang.String[] columns)
                         throws ConnectorConfigException
Fill collections of options with data from DB

Parameters:
columns - the columns for which options are requested
Throws:
ConnectorConfigException - the connector config exception

set_options

public void set_options(java.lang.String name,
                        BaseConnector connector)
Define connector for options retrieving

Parameters:
name - the name of column
connector - the connector

set_options

public void set_options(java.lang.String name,
                        java.lang.Iterable object)
Define fixed list of options

Parameters:
name - the name of column
object - the iterable object ( array )

set_options

public void set_options(java.lang.String name,
                        java.util.HashMap object)
Define fixed list of options

Parameters:
name - the name of column
object - the hash object

resolve_parameter

protected java.lang.String resolve_parameter(java.lang.String name)
Description copied from class: BaseConnector
Resolve incoming http parameter Translate name of incoming parameter to the name of related DB field

Overrides:
resolve_parameter in class BaseConnector
Parameters:
name - the name of http parameter
Returns:
the DB field name

xml_end

protected java.lang.String xml_end()
Description copied from class: BaseConnector
Get closing top level xml tag

Overrides:
xml_end in class BaseConnector
Returns:
the xml string

xml_start

protected java.lang.String xml_start()
Description copied from class: BaseConnector
Get opening top level xml tag

Overrides:
xml_start in class BaseConnector
Returns:
the xml string