Java Doc for JoSQLJRDataSource.java in  » Development » JoSQL » org » josql » contrib » 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 » Development » JoSQL » org.josql.contrib 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.josql.Query
      org.josql.contrib.JoSQLJRDataSource

JoSQLJRDataSource
public class JoSQLJRDataSource extends Query implements JRRewindableDataSource(Code)
A data source suitable for use with JasperReports. This is basically just an extension to Query that allows the results to be iterated over, thereby providing the ability for objects to be reported on that are held in memory.

One limitation here is that the SQL query must return columns rather than the objects since the values need to be mapped by JasperReports. For example:

 SELECT lastModified,
 name
 FROM   java.io.File
 WHERE  name LIKE '%.html'
 

This query would work but it should be noted that the select "columns" (since they do not have aliases assigned) will be labeled 1, 2, X and so on. You can assign aliases to the "columns" and then use them in the report definition file.

Please note: due to my bewilderment (and the fact that I can't get the examples to work ;) I haven't been able to adequately test this implementation, in the rudementary tests I performed it seemed to work. If it doesn't please send me an example so that I can try it!




Constructor Summary
public  JoSQLJRDataSource()
    

Method Summary
public  voidclearResults()
    
public  QueryResultsexecuteQuery(List l)
     Exectute the query and return the results.
public  ObjectgetFieldValue(JRField field)
    
public  ListgetResults()
    
public  voidmoveFirst()
    
public  booleannext()
    


Constructor Detail
JoSQLJRDataSource
public JoSQLJRDataSource()(Code)




Method Detail
clearResults
public void clearResults()(Code)



executeQuery
public QueryResults executeQuery(List l) throws QueryExecutionException(Code)
Exectute the query and return the results. A reference to the results is also held to allow them to be iterated over. If you plan on re-using this data source then you should call: JoSQLJRDataSource.clearResults() to free up the references to the results.
Parameters:
  l - The List of objects to execute the query on. The results.
throws:
  QueryExecutionException - If the query cannot be executed, or if the queryis set to return objects rather than "columns".



getFieldValue
public Object getFieldValue(JRField field)(Code)



getResults
public List getResults()(Code)



moveFirst
public void moveFirst()(Code)



next
public boolean next()(Code)



Fields inherited from org.josql.Query
final public static String ALL(Code)(Java Doc)
public static String ALL_OBJS_VAR_NAME(Code)(Java Doc)
public static String CURR_OBJ_VAR_NAME(Code)(Java Doc)
final public static String GROUP_BY_RESULTS(Code)(Java Doc)
public static String GRPBY_OBJ_VAR_NAME(Code)(Java Doc)
public static String GRPBY_OBJ_VAR_NAME_SYNONYM(Code)(Java Doc)
final public static String HAVING_RESULTS(Code)(Java Doc)
final public static String INT_BIND_VAR_PREFIX(Code)(Java Doc)
final public static String ORDER_BY_ASC(Code)(Java Doc)
final public static String ORDER_BY_DESC(Code)(Java Doc)
public static String PARENT_BIND_VAR_NAME(Code)(Java Doc)
public static String QUERY_BIND_VAR_NAME(Code)(Java Doc)
final public static String RESULTS(Code)(Java Doc)
final public static String WHERE_RESULTS(Code)(Java Doc)
final public static List nullQueryList(Code)(Java Doc)

Methods inherited from org.josql.Query
public void addBindVariableChangedListener(BindVariableChangedListener bvl)(Code)(Java Doc)
public void addFunctionHandler(Object o)(Code)(Java Doc)
public void addSaveValueChangedListener(SaveValueChangedListener svl)(Code)(Java Doc)
protected void addTiming(String id, double time)(Code)(Java Doc)
public void doExecuteOn(List l, String t) throws QueryExecutionException(Code)(Java Doc)
public QueryResults execute(List objs) throws QueryExecutionException(Code)(Java Doc)
protected void fireBindVariableChangedEvent(String name, Object from, Object to)(Code)(Java Doc)
protected void fireSaveValueChangedEvent(Object id, Object from, Object to)(Code)(Java Doc)
public Map getAliases()(Code)(Java Doc)
public List getAllObjects()(Code)(Java Doc)
public String getAnonymousBindVariableName()(Code)(Java Doc)
public ClassLoader getClassLoader()(Code)(Java Doc)
public List getColumns()(Code)(Java Doc)
public Object getCurrentObject()(Code)(Java Doc)
public List getDefaultFunctionHandlers()(Code)(Java Doc)
public Map getExecuteOnFunctions()(Code)(Java Doc)
public Expression getFrom()(Code)(Java Doc)
public Class getFromObjectClass()(Code)(Java Doc)
public FunctionHandler getFunctionHandler(String id)(Code)(Java Doc)
public List getFunctionHandlers()(Code)(Java Doc)
public List getGroupByColumns()(Code)(Java Doc)
public Object getGroupBySaveValue(Object id, List gbs)(Code)(Java Doc)
public Map getGroupBySaveValues(List gbs)(Code)(Java Doc)
public Object getGroupByVariable(int ind)(Code)(Java Doc)
public Expression getHavingClause()(Code)(Java Doc)
public Limit getLimit()(Code)(Java Doc)
public List getOrderByColumns()(Code)(Java Doc)
public Comparator getOrderByComparator()(Code)(Java Doc)
public Query getParent()(Code)(Java Doc)
public String getQuery()(Code)(Java Doc)
public QueryResults getQueryResults()(Code)(Java Doc)
public Object getSaveValue(Object id)(Code)(Java Doc)
public Query getTopLevelQuery()(Code)(Java Doc)
public Object getVariable(int index)(Code)(Java Doc)
public Object getVariable(String name)(Code)(Java Doc)
public Class getVariableClass(String name)(Code)(Java Doc)
public Map getVariables()(Code)(Java Doc)
public Expression getWhereClause()(Code)(Java Doc)
public char getWildcardCharacter()(Code)(Java Doc)
public void init() throws QueryParseException(Code)(Java Doc)
public void initOrderByComparator() throws QueryParseException(Code)(Java Doc)
public boolean isWantObjects()(Code)(Java Doc)
public boolean isWhereTrue(Object o) throws QueryExecutionException(Code)(Java Doc)
public Class loadClass(String name) throws Exception(Code)(Java Doc)
public void parse(String q) throws QueryParseException(Code)(Java Doc)
public boolean parsed()(Code)(Java Doc)
public void removeBindVariableChangedListener(BindVariableChangedListener bvl)(Code)(Java Doc)
public void removeSaveValueChangedListener(SaveValueChangedListener svl)(Code)(Java Doc)
public QueryResults reorder(List objs, SortedMap dirs) throws QueryExecutionException, QueryParseException(Code)(Java Doc)
public QueryResults reorder(List objs, String orderBys) throws QueryParseException, QueryExecutionException(Code)(Java Doc)
public void setAllObjects(List objs)(Code)(Java Doc)
public void setClassLoader(ClassLoader cl)(Code)(Java Doc)
public void setClassName(String n)(Code)(Java Doc)
public void setColumns(List cols)(Code)(Java Doc)
public void setCurrentGroupByObjects(List objs)(Code)(Java Doc)
public void setCurrentObject(Object o)(Code)(Java Doc)
public void setExecuteOnFunctions(Map ex)(Code)(Java Doc)
public void setFrom(Expression exp)(Code)(Java Doc)
public void setFromObjectClass(Class c)(Code)(Java Doc)
public void setGroupByColumns(List cols)(Code)(Java Doc)
public void setGroupByLimit(Limit g)(Code)(Java Doc)
public void setGroupByOrderColumns(List cols)(Code)(Java Doc)
public void setHaving(Expression be)(Code)(Java Doc)
public void setLimit(Limit l)(Code)(Java Doc)
public void setOrderByColumns(List cols)(Code)(Java Doc)
public void setParent(Query q)(Code)(Java Doc)
public void setSaveValue(Object id, Object value)(Code)(Java Doc)
public void setSaveValues(Map s)(Code)(Java Doc)
public void setVariable(String name, Object v)(Code)(Java Doc)
public void setVariable(int index, Object v)(Code)(Java Doc)
public void setVariables(Map bVars)(Code)(Java Doc)
public void setWantDistinctResults(boolean v)(Code)(Java Doc)
public void setWantObjects(boolean v)(Code)(Java Doc)
public void setWantTimings(boolean v)(Code)(Java Doc)
public void setWhere(Expression be)(Code)(Java Doc)
public void setWildcardCharacter(char c)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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