Update of /cvsroot/openamf/openamf/src/java/org/openamf/config
In directory sc8-pr-cvs1:/tmp/cvs-serv16187/src/java/org/openamf/config
Modified Files:
Config.java ConfigDigester.java
Added Files:
PageableRecordsetConfig.java
Log Message:
1) Initial PageableRecordSet support, still needs testing and cleanup
2) Added HttpServletRequest to ServiceInvoker constructor
3) Added PageableRecordSet config
4) Config is now a singleton and can be accessed from Config.getInstance()
--- NEW FILE: PageableRecordsetConfig.java ---
package org.openamf.config;
public class PageableRecordsetConfig {
private int initialDataRowCount;
public int getInitialDataRowCount() {
return initialDataRowCount;
}
public void setInitialDataRowCount(int initialDataRowCount) {
this.initialDataRowCount = initialDataRowCount;
}
public String toString() {
return "initialDataRowCount: " + initialDataRowCount;
}
}
Index: Config.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/config/Config.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Config.java 30 Apr 2003 01:02:04 -0000 1.3
--- Config.java 28 May 2003 15:53:28 -0000 1.4
***************
*** 6,14 ****
--- 6,28 ----
public class Config {
+
+ private static Config config;
private HashMap serviceConfigs = new HashMap();
+ private PageableRecordsetConfig pageableRecordsetConfig;
private ArrayList serviceInvokerConfigs = new ArrayList();
private HashMap stateBeanConfigs = new HashMap();
+ private Config() {
+ //no public create
+ }
+
+ public static synchronized Config getInstance() {
+ if (config == null) {
+ config = new Config();
+ }
+ return config;
+ }
+
public void addServiceInvokerConfig(ServiceInvokerConfig serviceInvokerConfig) {
serviceInvokerConfigs.add(serviceInvokerConfig);
***************
*** 33,36 ****
--- 47,58 ----
}
+ public PageableRecordsetConfig getPageableRecordsetConfig() {
+ return pageableRecordsetConfig;
+ }
+
+ public void setPageableRecordsetConfig(PageableRecordsetConfig pageableRecordsetConfig) {
+ this.pageableRecordsetConfig = pageableRecordsetConfig;
+ }
+
public void addServiceConfig(ServiceConfig serviceConfig) {
serviceConfig.setConfig(this);
***************
*** 69,72 ****
--- 91,98 ----
sb.append(sic);
}
+
+ sb.append("\nPageableRecordsetConfig\n");
+ sb.append(pageableRecordsetConfig);
+
sb.append("\n=========\n");
Index: ConfigDigester.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/config/ConfigDigester.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ConfigDigester.java 21 May 2003 01:36:58 -0000 1.9
--- ConfigDigester.java 28 May 2003 15:53:28 -0000 1.10
***************
*** 10,13 ****
--- 10,14 ----
private static final String INVOKER_PATH = "config/invoker";
+ private static final String PAGEABLE_RECORDSET_PATH = "config/pageable-recordset";
private static final String SERVICE_PATH = "config/service";
private static final String METHOD_PATH = SERVICE_PATH + "/method";
***************
*** 36,42 ****
}
- addObjectCreate("config", Config.class);
-
addInvokerRules();
addServiceRules();
addServiceMethodRules();
--- 37,42 ----
}
addInvokerRules();
+ addPageableRecordSetRules();
addServiceRules();
addServiceMethodRules();
***************
*** 57,60 ****
--- 57,73 ----
addCallMethod(INVOKER_PATH + "/name", "setName", 0);
addCallMethod(INVOKER_PATH + "/class", "setClassName", 0);
+ }
+
+ private void addPageableRecordSetRules() {
+ addObjectCreate(PAGEABLE_RECORDSET_PATH, PageableRecordsetConfig.class);
+ addSetNext(
+ PAGEABLE_RECORDSET_PATH,
+ "setPageableRecordsetConfig",
+ "org.openamf.config.PageableRecordsetConfig");
+ addCallMethod(
+ PAGEABLE_RECORDSET_PATH + "/initial-data-row-count",
+ "setInitialDataRowCount",
+ 0,
+ new Class[] { Integer.TYPE });
}
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.