Java Doc for DataRetrievalService.java in  » XML-UI » xui32 » com » xoetrope » service » data » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML UI » xui32 » com.xoetrope.service.data 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.xoetrope.service.data.DataRetrievalService

DataRetrievalService
public class DataRetrievalService extends ServiceProxy (Code)
ServiceProxy class which needs to be subclassed in order to retrieve a specified or generated query on a database connection.

Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Xoetrope.

$Revision: 1.17 $



Field Summary
final public static  StringARG_NAME_MODEL_RESTORE_PATH
    
final public static  StringARG_NAME_QUERYFIELDS
    
final public static  StringARG_NAME_QUERYNAME
    
final public static  StringARG_NAME_RESULTSET
    
final public static  StringTYPE_GENERATED
    
final public static  StringTYPE_PROVIDED
    
protected  StringconnectionName
    
protected  XProjectcurrentProject
    
protected  Documentdoc
    
protected  charquote
    
protected  XModelrootModel
    
protected  ElementtopElement
    

Constructor Summary
public  DataRetrievalService()
     Constructor gets a reference to the root model.

Method Summary
protected  voidaddChildren(Element ele, ServiceProxyArgs args, String dataitemName)
     Returns the standard end of element text.
public  Objectcall(String method, ServiceContext context)
    
protected  voidcloseConnection(ConnectionObject conn)
    
protected  StringfixId(String id)
     Provided for overloading.
protected  StringfixSql(ServiceProxyArgs args, String sql)
     Provided for overloading, this is called when this ServiceProxy has finished generating the SQL.
protected  ElementgenerateDataset(Element parentEle, ServiceProxyArgs args, String sql, String datasetId, String datasetName, String dataitemName)
    
protected  ConnectionObjectgetConnection()
    
protected  StringgetGeneratedWhereClauses(ServiceProxyArgs args, XModel queryMdl)
    
protected  StringgetProvidedWhereClauses(ServiceProxyArgs args, String modelStr)
     Creates the where clause for the provided arguments.
protected  StringgetSql(ServiceProxyArgs args, String queryName, String modelStr)
    
protected  StatementgetStatement(ConnectionObject connObj)
    
public  voidloadResults(String resultSet, XModel model)
     Load the returned data into the model.
protected  voidrecordStarted(ResultSet rs, Element ele)
    
public  voidsetAttributes(Hashtable attribs)
     Set the attributes for this service proxy.

Field Detail
ARG_NAME_MODEL_RESTORE_PATH
final public static String ARG_NAME_MODEL_RESTORE_PATH(Code)
This parameter should be concatenated with the zero based index of the parameter being set



ARG_NAME_QUERYFIELDS
final public static String ARG_NAME_QUERYFIELDS(Code)
This parameter stores the contents of the query fields



ARG_NAME_QUERYNAME
final public static String ARG_NAME_QUERYNAME(Code)
This parameter stores the name of the query which is to be called or generated



ARG_NAME_RESULTSET
final public static String ARG_NAME_RESULTSET(Code)
This parameter stores the contents of the resultset



TYPE_GENERATED
final public static String TYPE_GENERATED(Code)



TYPE_PROVIDED
final public static String TYPE_PROVIDED(Code)



connectionName
protected String connectionName(Code)



currentProject
protected XProject currentProject(Code)



doc
protected Document doc(Code)



quote
protected char quote(Code)



rootModel
protected XModel rootModel(Code)



topElement
protected Element topElement(Code)




Constructor Detail
DataRetrievalService
public DataRetrievalService()(Code)
Constructor gets a reference to the root model.




Method Detail
addChildren
protected void addChildren(Element ele, ServiceProxyArgs args, String dataitemName)(Code)
Returns the standard end of element text. Overload this function if subitems need to be added to the returned dataset.
Parameters:
  args - the arguments passed to the ServiceProxy
Parameters:
  dataitemName - the name of the dataitem which need to be used if overloaded the record ending String



call
public Object call(String method, ServiceContext context) throws ServiceProxyException(Code)
Call this proxy with the specified arguments the result of the call
Parameters:
  context - The ServiceContext contain pass and return parameters
Parameters:
  method - the name of the service being called
throws:
  net.xoetrope.optional.service.ServiceProxyException - Throw an exception if there is a problem with the call



closeConnection
protected void closeConnection(ConnectionObject conn)(Code)



fixId
protected String fixId(String id)(Code)
Provided for overloading. Used to 'fix' the names of the database fields so that they do not have to be exposed on the client. For example 'name' might be fixed to 'accounts.account_name'.
Parameters:
  id - the id of the field which was passed from the client the fixed id



fixSql
protected String fixSql(ServiceProxyArgs args, String sql)(Code)
Provided for overloading, this is called when this ServiceProxy has finished generating the SQL. Overload to make final changes to the SQL before being executed
Parameters:
  args - the arguments which have been passed to the ServiceProxy
Parameters:
  sql - the SQL statement when this ServiceProxy has finished generating the fixed SQL statement



generateDataset
protected Element generateDataset(Element parentEle, ServiceProxyArgs args, String sql, String datasetId, String datasetName, String dataitemName)(Code)
Executes the generated SQL statement and returns the results dataset
Parameters:
  args - the arguments passed to the ServiceProxy
Parameters:
  sql - the SQL statement which will be executed
Parameters:
  datasetId - the name of the dataset tag
Parameters:
  datasetName - the name to be given to the dataset
Parameters:
  dataitemName - the name to be given to the dataset sub items



getConnection
protected ConnectionObject getConnection()(Code)



getGeneratedWhereClauses
protected String getGeneratedWhereClauses(ServiceProxyArgs args, XModel queryMdl)(Code)
Retrieves the where clause provided by a generated query if there is one
Parameters:
  args - the arguments passed to the Service
Parameters:
  queryMdl - the query model created from the passed query dataset the generated where clause if there is one



getProvidedWhereClauses
protected String getProvidedWhereClauses(ServiceProxyArgs args, String modelStr)(Code)
Creates the where clause for the provided arguments.
Parameters:
  args - the ServiceProxyArgs object which has been sent to this Service
Parameters:
  modelStr - the where clause dataset which has been passed to the Service the formatted Where clause



getSql
protected String getSql(ServiceProxyArgs args, String queryName, String modelStr)(Code)
Generate the SQL statement for retrieving data
Parameters:
  args - the arguments passed to the ServiceProxy
Parameters:
  queryName - the name of the query to be invoked
Parameters:
  modelStr - the query fields dataset passed to the query the formatted SQL statement



getStatement
protected Statement getStatement(ConnectionObject connObj)(Code)
Create a statment for the query



loadResults
public void loadResults(String resultSet, XModel model)(Code)
Load the returned data into the model.
Parameters:
  resultSet - the returned XML data



recordStarted
protected void recordStarted(ResultSet rs, Element ele)(Code)
Passes the ResultSet when a new record has its cursor set
Parameters:
  rs - the ResultSet which is being iterated



setAttributes
public void setAttributes(Hashtable attribs)(Code)
Set the attributes for this service proxy. This class can set attribute for 'connectionname'.
Parameters:
  attribs - The Hashtable of attributes as found in the XML declaration



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.