Java Doc for Function.java in  » Database-DBMS » hsql » org » hsqldb » 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 » Database DBMS » hsql » org.hsqldb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.hsqldb.Function

Function
class Function (Code)
Provides services to evaluate SQL function and stored procedure calls, by invoking Java methods. Extended in successive versions of HSQLDB.
author:
   Thomas Mueller (Hypersonic SQL Group)
version:
   1.8.0
since:
   Hypersonic SQL


Field Summary
 Expression[]eArg
    
 booleanhasAggregate
    
 booleanisSimple
    
 Stringname
    

Constructor Summary
 Function(String name, String fqn, boolean isSimple)
     Constructs a new Function object with the given function call name and using the specified Session context.

Method Summary
 booleancheckResolved(boolean check)
     Checks each of this object's arguments for resolution, throwing an HsqlException if any arguments have not yet been resolved.
 voidcheckTables(HsqlArrayList fa)
     Checks the Expresion parameters to this Function object against the set of TableFilter.
 voidcollectInGroupByExpressions(HsqlArrayList colExps)
    
public  Stringdescribe(Session session)
     Returns a String representation of this object.
 ObjectgetAggregatedValue(Session session, Object currValue)
    
 ClassgetArgClass(int i)
     Returns the Java Class of the i'th argument.
 intgetArgCount()
     Returns the number of parameters that must be supplied to evaluate this Function object from SQL.
 intgetArgNullability(int i)
     Returns the SQL nullability code of the i'th argument.
 intgetArgType(int i)
     Returns the type of the argument at the specified offset in this Function object's paramter list.
 StringgetDLL()
     Returns a DDL representation of this object.
 MethodgetMethod()
    
 StringgetReturnClassName()
     Returns the Java Class of the object returned by getValue().
 intgetReturnType()
     Returns the type of this Function object's return type.
 ObjectgetValue(Session session)
    
 ObjectgetValue(Session session, Object[] arguments)
     Evaluates the Function with the given arguments in the session context.
 voidreplaceAliases(Expression[] columns, int length)
     Remnoves the Table filters from Expression parameters to this Function.
 voidresolveTables(TableFilter f)
     Resolves the Expression parameters to this Function object against the specified TableFilter.
 voidresolveType(Session session)
     Resolves the type of this expression and performs certain transformations and optimisations of the expression tree.
 voidsetArgument(int i, Expression e)
     Binds the specified expression to the specified position in this Function object's parameter list.
 ObjectupdateAggregatingValue(Session session, Object currValue)
    

Field Detail
eArg
Expression[] eArg(Code)



hasAggregate
boolean hasAggregate(Code)



isSimple
boolean isSimple(Code)



name
String name(Code)




Constructor Detail
Function
Function(String name, String fqn, boolean isSimple) throws HsqlException(Code)
Constructs a new Function object with the given function call name and using the specified Session context.

The call name is the fully qualified name of a static Java method, in the form "package.class.method." This implies that Java methods with the same fully qualified name but different signatures cannot be used properly as HSQLDB SQL functions or stored procedures. For instance, it is impossible to call both System.getProperty(String) and System.getProperty(String,String) under this arrangement, because the HSQLDB Function object is unable to differentiate between the two; it simply chooses the first method matching the FQN in the array of methods obtained from calling getMethods() on an instance of the Class indicated in the FQN, hiding all other methods with the same FQN.

The function FQN must match at least one static Java method FQN in the specified class or construction cannot procede and an HsqlException is thrown.

The isSimple parameter is true when certain SQL standard functions that are used without brackets are invokded.
Parameters:
  name - this Function object's call name
Parameters:
  fqn - the fully qualified name of a Java method
Parameters:
  isSimple - if true, used to evalate CURRENT_TIME, NOW etc.evaluate
throws:
  HsqlException - if the specified function FQN corresponds to noJava method





Method Detail
checkResolved
boolean checkResolved(boolean check) throws HsqlException(Code)
Checks each of this object's arguments for resolution, throwing an HsqlException if any arguments have not yet been resolved.

The check boolean argument is passed on to further check calls.




checkTables
void checkTables(HsqlArrayList fa) throws HsqlException(Code)
Checks the Expresion parameters to this Function object against the set of TableFilter.



collectInGroupByExpressions
void collectInGroupByExpressions(HsqlArrayList colExps)(Code)



describe
public String describe(Session session)(Code)
Returns a String representation of this object.




getAggregatedValue
Object getAggregatedValue(Session session, Object currValue) throws HsqlException(Code)



getArgClass
Class getArgClass(int i)(Code)
Returns the Java Class of the i'th argument.




getArgCount
int getArgCount()(Code)
Returns the number of parameters that must be supplied to evaluate this Function object from SQL.

This value may be different than the number of parameters of the underlying Java method. This is because HSQLDB automatically detects if the first parameter is of type java.sql.Connection, and supplies a live Connection object constructed from the evaluating session context if so.




getArgNullability
int getArgNullability(int i)(Code)
Returns the SQL nullability code of the i'th argument.




getArgType
int getArgType(int i)(Code)
Returns the type of the argument at the specified offset in this Function object's paramter list.




getDLL
String getDLL() throws HsqlException(Code)
Returns a DDL representation of this object.




getMethod
Method getMethod()(Code)



getReturnClassName
String getReturnClassName()(Code)
Returns the Java Class of the object returned by getValue().




getReturnType
int getReturnType()(Code)
Returns the type of this Function object's return type.




getValue
Object getValue(Session session) throws HsqlException(Code)
Evaluates and returns this Function in the context of the session.




getValue
Object getValue(Session session, Object[] arguments) throws HsqlException(Code)
Evaluates the Function with the given arguments in the session context.



replaceAliases
void replaceAliases(Expression[] columns, int length) throws HsqlException(Code)
Remnoves the Table filters from Expression parameters to this Function.
throws:
  HsqlException - if there is a problem resolving a parameteragainst the specified TableFilter



resolveTables
void resolveTables(TableFilter f) throws HsqlException(Code)
Resolves the Expression parameters to this Function object against the specified TableFilter.



resolveType
void resolveType(Session session) throws HsqlException(Code)
Resolves the type of this expression and performs certain transformations and optimisations of the expression tree.



setArgument
void setArgument(int i, Expression e)(Code)
Binds the specified expression to the specified position in this Function object's parameter list.




updateAggregatingValue
Object updateAggregatingValue(Session session, Object currValue) throws HsqlException(Code)



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.