Java Doc for SQLToJavaValueNode.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » sql » compile » 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 » db derby 10.2 » org.apache.derby.impl.sql.compile 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.impl.sql.compile.QueryTreeNode
      org.apache.derby.impl.sql.compile.JavaValueNode
         org.apache.derby.impl.sql.compile.SQLToJavaValueNode

SQLToJavaValueNode
public class SQLToJavaValueNode extends JavaValueNode (Code)
This node type converts a value in the SQL domain to a value in the Java domain.


Field Summary
 LocalFieldreturnsNullOnNullState
    
 ValueNodevalue
    


Method Summary
public  Visitableaccept(Visitor v)
     Accept a visitor, and call v.visit() on child nodes as necessary.
public  JavaValueNodebindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector)
     Bind this expression.
public  booleancategorize(JBitSet referencedTabs, boolean simplePredsOnly)
     Categorize this predicate.
public  voidgenerateExpression(ExpressionClassBuilder acb, MethodBuilder mb)
     Generate code to get the Java value out of a SQL value. Every SQL type has a corresponding Java type.
public  voidgenerateJavaValue(ExpressionClassBuilder acb, MethodBuilder mbex)
     Generate code to cast the SQLValue to a Java value.
public  voidgenerateSQLValue(ExpressionClassBuilder acb, MethodBuilder mb)
     Generate the SQLvalue that this node wraps.
 ObjectgetConstantValueAsObject()
    
public  JSQLTypegetJSQLType()
     Get the JSQLType that corresponds to this node.
public  StringgetJavaTypeName()
     Returns the name of the java class type that this node coerces to.
protected  intgetOrderableVariantType()
     Return the variant type for the underlying expression.
public  StringgetPrimitiveTypeName()
     Returns the name of the java primitive type that this node coerces to.
public  StringgetSQLValueInterfaceName()
     Get the type name of the SQLValue we generate.
 ValueNodegetSQLValueNode()
    
public  voidinit(Object value)
    
public  voidpreprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList)
     Preprocess an expression tree.
public  voidprintSubNodes(int depth)
     Prints the sub-nodes of this object.
public  JavaValueNoderemapColumnReferencesToExpressions()
     Remap all ColumnReferences in this tree to be clones of the underlying expression.
public  voidsetClause(int clause)
     Set the clause that this node appears in.

Field Detail
returnsNullOnNullState
LocalField returnsNullOnNullState(Code)



value
ValueNode value(Code)





Method Detail
accept
public Visitable accept(Visitor v) throws StandardException(Code)
Accept a visitor, and call v.visit() on child nodes as necessary.
Parameters:
  v - the visitor
exception:
  StandardException - on error



bindExpression
public JavaValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException(Code)
Bind this expression. This means binding the sub-expressions, as well as figuring out what the return type is for this expression.
Parameters:
  fromList - The FROM list for the query thisexpression is in, for binding columns.
Parameters:
  subqueryList - The subquery list being built as we findSubqueryNodes
Parameters:
  aggregateVector - The aggregate vector being built as we find AggregateNodes this
exception:
  StandardException - Thrown on error



categorize
public boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException(Code)
Categorize this predicate. Initially, this means building a bit map of the referenced tables for each predicate. If the source of this ColumnReference (at the next underlying level) is not a ColumnReference or a VirtualColumnNode then this predicate will not be pushed down. For example, in: select * from (select 1 from s) a (x) where x = 1 we will not push down x = 1. NOTE: It would be easy to handle the case of a constant, but if the inner SELECT returns an arbitrary expression, then we would have to copy that tree into the pushed predicate, and that tree could contain subqueries and method calls. RESOLVE - revisit this issue once we have views.
Parameters:
  referencedTabs - JBitSet with bit map of referenced FromTables
Parameters:
  simplePredsOnly - Whether or not to consider methodcalls, field references and conditional nodeswhen building bit map boolean Whether or not source.expression is a ColumnReferenceor a VirtualColumnNode.
exception:
  StandardException - Thrown on error



generateExpression
public void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code)
Generate code to get the Java value out of a SQL value. Every SQL type has a corresponding Java type. The getObject() method on the SQL type gets the right Java type. The generated code will be: () ((DataValueDescriptor) .getObject()) where comes from the getCorrespondingJavaTypeName() method of the value's TypeId.
Parameters:
  acb - The ExpressionClassBuilder for the class being built
Parameters:
  mb - The method the expression will go into
exception:
  StandardException - Thrown on error



generateJavaValue
public void generateJavaValue(ExpressionClassBuilder acb, MethodBuilder mbex) throws StandardException(Code)
Generate code to cast the SQLValue to a Java value.
Parameters:
  acb - The ExpressionClassBuilder for the class being built
Parameters:
  mbex - The method the expression will go into
exception:
  StandardException - Thrown on error



generateSQLValue
public void generateSQLValue(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code)
Generate the SQLvalue that this node wraps.
Parameters:
  acb - The ExpressionClassBuilder for the class being built
Parameters:
  mb - The method the expression will go into
exception:
  StandardException - Thrown on error



getConstantValueAsObject
Object getConstantValueAsObject() throws StandardException(Code)

See Also:   ValueNode.getConstantValueAsObject
See Also:   
exception:
  StandardException - Thrown on error



getJSQLType
public JSQLType getJSQLType() throws StandardException(Code)
Get the JSQLType that corresponds to this node. Could be a SQLTYPE, a Java primitive, or a Java class. Overrides method in JavaValueNode. the corresponding JSQLType



getJavaTypeName
public String getJavaTypeName() throws StandardException(Code)
Returns the name of the java class type that this node coerces to. name of java class type



getOrderableVariantType
protected int getOrderableVariantType() throws StandardException(Code)
Return the variant type for the underlying expression. The variant type can be: VARIANT - variant within a scan (method calls and non-static field access) SCAN_INVARIANT - invariant within a scan (column references from outer tables) QUERY_INVARIANT - invariant within the life of a query (constant expressions) The variant type for the underlying expression.
exception:
  StandardException - thrown on error



getPrimitiveTypeName
public String getPrimitiveTypeName() throws StandardException(Code)
Returns the name of the java primitive type that this node coerces to. name of java primitive type
exception:
  StandardException - Thrown on error



getSQLValueInterfaceName
public String getSQLValueInterfaceName() throws StandardException(Code)
Get the type name of the SQLValue we generate. name of interface corresponding to SQLValue
exception:
  StandardException - Thrown on error



getSQLValueNode
ValueNode getSQLValueNode()(Code)
Get the SQL ValueNode that is being converted to a JavaValueNode The underlying SQL ValueNode



init
public void init(Object value)(Code)
Constructor for a SQLToJavaValueNode
Parameters:
  value - A ValueNode representing a SQL value to convert tothe Java domain.



preprocess
public void preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException(Code)
Preprocess an expression tree. We do a number of transformations here (including subqueries, IN lists, LIKE and BETWEEN) plus subquery flattening. NOTE: This is done before the outer ResultSetNode is preprocessed.
Parameters:
  numTables - Number of tables in the DML Statement
Parameters:
  outerFromList - FromList from outer query block
Parameters:
  outerSubqueryList - SubqueryList from outer query block
Parameters:
  outerPredicateList - PredicateList from outer query block
exception:
  StandardException - Thrown on error



printSubNodes
public void printSubNodes(int depth)(Code)
Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.
Parameters:
  depth - The depth of this node in the tree



remapColumnReferencesToExpressions
public JavaValueNode remapColumnReferencesToExpressions() throws StandardException(Code)
Remap all ColumnReferences in this tree to be clones of the underlying expression. JavaValueNode The remapped expression tree.
exception:
  StandardException - Thrown on error



setClause
public void setClause(int clause)(Code)
Set the clause that this node appears in.
Parameters:
  clause - The clause that this node appears in.



Fields inherited from org.apache.derby.impl.sql.compile.JavaValueNode
protected boolean forCallStatement(Code)(Java Doc)
protected JSQLType jsqlType(Code)(Java Doc)

Methods inherited from org.apache.derby.impl.sql.compile.JavaValueNode
abstract JavaValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException(Code)(Java Doc)
public void castToPrimitive(boolean booleanValue)(Code)(Java Doc)
abstract public boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException(Code)(Java Doc)
public void checkReliability(ValueNode sqlNode) throws StandardException(Code)(Java Doc)
final protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc)
abstract protected void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc)
protected boolean generateReceiver(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc)
final protected boolean generateReceiver(ExpressionClassBuilder acb, MethodBuilder mb, JavaValueNode receiver) throws StandardException(Code)(Java Doc)
Object getConstantValueAsObject() throws StandardException(Code)(Java Doc)
public JSQLType getJSQLType() throws StandardException(Code)(Java Doc)
public String getJavaTypeName() throws StandardException(Code)(Java Doc)
protected int getOrderableVariantType() throws StandardException(Code)(Java Doc)
public String getPrimitiveTypeName() throws StandardException(Code)(Java Doc)
final protected void getReceiverExpression(ExpressionClassBuilder acb, MethodBuilder mb, JavaValueNode receiver) throws StandardException(Code)(Java Doc)
public boolean isPrimitiveType() throws StandardException(Code)(Java Doc)
public TypeId mapToTypeID(JSQLType jsqlType)(Code)(Java Doc)
public void markForCallStatement()(Code)(Java Doc)
protected void markReturnValueDiscarded()(Code)(Java Doc)
public boolean mustCastToPrimitive()(Code)(Java Doc)
abstract public void preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException(Code)(Java Doc)
abstract public JavaValueNode remapColumnReferencesToExpressions() throws StandardException(Code)(Java Doc)
protected boolean returnValueDiscarded()(Code)(Java Doc)
protected void returnValueToSQLDomain()(Code)(Java Doc)
public void setClause(int clause)(Code)(Java Doc)
public void setJavaTypeName(String javaTypeName)(Code)(Java Doc)
protected boolean valueReturnedToSQLDomain()(Code)(Java Doc)

Fields inherited from org.apache.derby.impl.sql.compile.QueryTreeNode
final public static int AUTOINCREMENT_CREATE_MODIFY(Code)(Java Doc)
final public static int AUTOINCREMENT_INC_INDEX(Code)(Java Doc)
final public static int AUTOINCREMENT_IS_AUTOINCREMENT_INDEX(Code)(Java Doc)
final public static int AUTOINCREMENT_START_INDEX(Code)(Java Doc)
boolean isPrivilegeCollectionRequired(Code)(Java Doc)

Methods inherited from org.apache.derby.impl.sql.compile.QueryTreeNode
public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc)
public QueryTreeNode bind() throws StandardException(Code)(Java Doc)
public DataValueDescriptor convertDefaultNode(DataTypeDescriptor typeDescriptor) throws StandardException(Code)(Java Doc)
protected static void debugFlush()(Code)(Java Doc)
public static void debugPrint(String outputString)(Code)(Java Doc)
public void disablePrivilegeCollection()(Code)(Java Doc)
public String executeSchemaName()(Code)(Java Doc)
public String executeStatementName()(Code)(Java Doc)
public static String formatNodeString(String nodeString, int depth)(Code)(Java Doc)
public boolean foundString(String[] list, String search)(Code)(Java Doc)
public GeneratedClass generate(ByteArray ignored) throws StandardException(Code)(Java Doc)
protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc)
void generateAuthorizeCheck(ActivationClassBuilder acb, MethodBuilder mb, int sqlOperation)(Code)(Java Doc)
public int getBeginOffset()(Code)(Java Doc)
final protected ClassFactory getClassFactory()(Code)(Java Doc)
final protected CompilerContext getCompilerContext()(Code)(Java Doc)
final public ContextManager getContextManager()(Code)(Java Doc)
public Object getCursorInfo() throws StandardException(Code)(Java Doc)
final public DataDictionary getDataDictionary()(Code)(Java Doc)
final public DependencyManager getDependencyManager()(Code)(Java Doc)
public int getEndOffset()(Code)(Java Doc)
final public ExecutionFactory getExecutionFactory()(Code)(Java Doc)
final public GenericConstantActionFactory getGenericConstantActionFactory()(Code)(Java Doc)
protected int getIntProperty(String value, String key) throws StandardException(Code)(Java Doc)
final protected LanguageConnectionContext getLanguageConnectionContext()(Code)(Java Doc)
final public NodeFactory getNodeFactory()(Code)(Java Doc)
protected int getNodeType()(Code)(Java Doc)
public ConstantNode getNullNode(TypeId typeId, ContextManager cm) throws StandardException(Code)(Java Doc)
public DataTypeDescriptor[] getParameterTypes() throws StandardException(Code)(Java Doc)
public long getRowEstimate()(Code)(Java Doc)
public String getSPSName()(Code)(Java Doc)
final SchemaDescriptor getSchemaDescriptor(String schemaName) throws StandardException(Code)(Java Doc)
final SchemaDescriptor getSchemaDescriptor(String schemaName, boolean raiseError) throws StandardException(Code)(Java Doc)
protected int getStatementType()(Code)(Java Doc)
final protected TableDescriptor getTableDescriptor(String tableName, SchemaDescriptor schema) throws StandardException(Code)(Java Doc)
final protected TypeCompiler getTypeCompiler(TypeId typeId)(Code)(Java Doc)
public void init(Object arg1) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14) throws StandardException(Code)(Java Doc)
public boolean isAtomic() throws StandardException(Code)(Java Doc)
protected boolean isInstanceOf(int nodeType)(Code)(Java Doc)
public boolean isPrivilegeCollectionRequired()(Code)(Java Doc)
final boolean isSessionSchema(SchemaDescriptor sd)(Code)(Java Doc)
final boolean isSessionSchema(String schemaName)(Code)(Java Doc)
public ConstantAction makeConstantAction() throws StandardException(Code)(Java Doc)
public ResultDescription makeResultDescription() throws StandardException(Code)(Java Doc)
public TableName makeTableName(String schemaName, String flatName) throws StandardException(Code)(Java Doc)
public boolean needsSavepoint()(Code)(Java Doc)
protected String nodeHeader()(Code)(Java Doc)
public QueryTreeNode optimize() throws StandardException(Code)(Java Doc)
public static QueryTreeNode parseQueryText(CompilerContext compilerContext, String queryText, Object[] paramDefaults, LanguageConnectionContext lcc) throws StandardException(Code)(Java Doc)
public void printLabel(int depth, String label)(Code)(Java Doc)
public void printSubNodes(int depth)(Code)(Java Doc)
public boolean referencesSessionSchema() throws StandardException(Code)(Java Doc)
public TableName resolveTableToSynonym(TableName tabName) throws StandardException(Code)(Java Doc)
public void setBeginOffset(int beginOffset)(Code)(Java Doc)
public void setContextManager(ContextManager cm)(Code)(Java Doc)
public void setEndOffset(int endOffset)(Code)(Java Doc)
public void setNodeType(int nodeType)(Code)(Java Doc)
public void setRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void treePrint()(Code)(Java Doc)
public void treePrint(int depth)(Code)(Java Doc)
String verifyClassExist(String javaClassName, boolean convertCase) throws StandardException(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.