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


org.apache.derby.iapi.sql.compile.CompilerContext

All known Subclasses:   org.apache.derby.impl.sql.compile.CompilerContextImpl,
CompilerContext
public interface CompilerContext extends Context(Code)
CompilerContext stores the parser and type id factory to be used by the compiler. Stack compiler contexts when a new, local parser is needed (if calling the compiler recursively from within the compiler, for example). CompilerContext objects are private to a LanguageConnectionContext.
author:
   ames
author:
   History:
author:
   5/22/97 Moved getExternalInterfaceFactory() to LanguageConnectionContext
author:
   because it had to be used at execution. - Jeff


Field Summary
final public static  intCHECK_CONSTRAINT
    
final public static  intCOLUMN_REFERENCE_ILLEGAL
    
 StringCONTEXT_ID
     this is the ID we expect compiler contexts to be stored into a context manager under.
final public static  intCURRENT_CONNECTION_ILLEGAL
    
final public static  intDATETIME_ILLEGAL
    
final public static  intDEFAULT_RESTRICTION
    
final public static  intDIAGNOSTICS_ILLEGAL
    
final public static  intFUNCTION_CALL_ILLEGAL
    
final public static  intIGNORE_MISSING_CLASSES
    
final public static  intINTERNAL_SQL_ILLEGAL
    
final public static  intINTERNAL_SQL_LEGAL
    
final public static  intMODIFIES_SQL_DATA_PROCEDURE_ILLEGAL
     Calling procedures that modify sql data from before triggers is illegal.
final public static  intSCHEMA_ILLEGAL
    
final public static  intSQL_LEGAL
    
final public static  intSUBQUERY_ILLEGAL
    
final public static  intUNNAMED_PARAMETER_ILLEGAL
    
final public static  intUSER_ILLEGAL
    


Method Summary
public  voidaddRequiredColumnPriv(ColumnDescriptor column)
     Add a column privilege to the list of used column privileges.
public  voidaddRequiredRoutinePriv(AliasDescriptor routine)
     Add a routine execute privilege to the list of used routine privileges.
public  voidaddRequiredSchemaPriv(String schema, String aid, int privType)
     Add a schema privilege to the list of used privileges.
public  voidaddRequiredTablePriv(TableDescriptor table)
     Add a table or view privilege to the list of used table privileges.
 intaddSavedObject(Object o)
     Add an object to the pool that is created at compile time and used at execution time.
public  voidaddWarning(SQLWarning warning)
     Add a compile time warning.
 voidcreateDependency(Provider p)
     Add a dependency for the current dependent.
public  voidcreateDependency(Dependent d, Provider p)
     Add a dependency between two objects.
public  voidfirstOnStack()
     Mark this CompilerContext as the first on the stack, so we can avoid continually popping and pushing a CompilerContext.
 ClassFactorygetClassFactory()
     Return the class factory to use in this compilation.
public  SchemaDescriptorgetCompilationSchema()
     Get the compilation schema descriptor for this compilation context. Will be null if no default schema lookups have occured.
 ProviderListgetCurrentAuxiliaryProviderList()
     Get the current auxiliary provider list from this CompilerContext.
public  ObjectgetCursorInfo()
     Get the cursor info stored in the context.
public  intgetEntryIsolationLevel()
     Get the entry isolation level from this CC.
public  booleangetInUse()
     Return the in use state for the compiler context.
 JavaFactorygetJavaFactory()
     Get the JavaFactory from this CompilerContext.
 intgetNextColumnNumber()
     Get the current next column number (for generated column names) from this CompilerContext.
public  intgetNextEquivalenceClass()
     Get the next equivalence class for equijoin clauses.
 intgetNextResultSetNumber()
     Get the current next ResultSet number from this CompilerContext.
 intgetNextSubqueryNumber()
     Get the current next subquery number from this CompilerContext.
 intgetNextTableNumber()
     Get the current next table number from this CompilerContext.
 NodeFactorygetNodeFactory()
     Get the NodeFactory from this CompilerContext.
 intgetNumResultSets()
     Get the number of Results in the current statement from this CompilerContext.
 intgetNumSubquerys()
     Get the number of subquerys in the current statement from this CompilerContext.
 intgetNumTables()
     Get the number of tables in the current statement from this CompilerContext.
public  VectorgetParameterList()
     Get the parameter list.
public  DataTypeDescriptor[]getParameterTypes()
     Get the array of DataTypeDescriptor representing the types of the ? parameters.
 ParsergetParser()
     Get the Parser from this CompilerContext.
public  intgetReliability()
     Return the reliability requirements of this clause.
public  ListgetRequiredPermissionsList()
    
public  booleangetReturnParameterFlag()
     Is the callable statement uses ? for return parameter.
 Object[]getSavedObjects()
     Get the saved object pool (for putting into the prepared statement).
public  intgetScanIsolationLevel()
     Get the isolation level for the scans in this query.
public  SortCostControllergetSortCostController()
     Get a SortCostController.
public  StoreCostControllergetStoreCostController(long conglomerateNumber)
     Get a StoreCostController for the given conglomerate.
 TypeCompilerFactorygetTypeCompilerFactory()
     Get the TypeCompilerFactory from this CompilerContext.
 StringgetUniqueClassName()
     Get a unique Class name from this CompilerContext.
public  SQLWarninggetWarnings()
     Get the chain of compile time warnings.
public  booleanisFirstOnStack()
    
public  voidpopCurrentPrivType()
    
public  voidpushCurrentPrivType(int privType)
     Sets the current privilege type context and pushes the previous on onto a stack. Column and table nodes do not know how they are being used.
 voidresetContext()
     Reset compiler context (as for instance, when we recycle a context for use by another compilation.
 voidresetNextResultSetNumber()
     Reset the next ResultSet number from this CompilerContext.
public  SchemaDescriptorsetCompilationSchema(SchemaDescriptor newDefault)
     Set the compilation schema descriptor for this compilation context.
 voidsetCurrentAuxiliaryProviderList(ProviderList apl)
     Set the current auxiliary provider list for this CompilerContext.
 voidsetCurrentDependent(Dependent d)
     Set the current dependent from this CompilerContext.
public  voidsetCursorInfo(Object cursorInfo)
    
public  voidsetEntryIsolationLevel(int isolationLevel)
     Set the isolation level on entry to this CC so that it can be restored on exit.
public  voidsetInUse(boolean inUse)
     Set the in use state for the compiler context.
public  voidsetParameterList(Vector parameterList)
     Set the parameter list.
public  voidsetReliability(int reliability)
     Sets which kind of query fragments are NOT allowed.
public  voidsetReturnParameterFlag()
    
public  voidsetSavedObjects(Object[] objs)
     Set the saved object pool (for putting into the prepared statement).
public  voidsetScanIsolationLevel(int isolationLevel)
     Set the isolation level for the scans in this query.

Field Detail
CHECK_CONSTRAINT
final public static int CHECK_CONSTRAINT(Code)



COLUMN_REFERENCE_ILLEGAL
final public static int COLUMN_REFERENCE_ILLEGAL(Code)



CONTEXT_ID
String CONTEXT_ID(Code)
this is the ID we expect compiler contexts to be stored into a context manager under.



CURRENT_CONNECTION_ILLEGAL
final public static int CURRENT_CONNECTION_ILLEGAL(Code)



DATETIME_ILLEGAL
final public static int DATETIME_ILLEGAL(Code)



DEFAULT_RESTRICTION
final public static int DEFAULT_RESTRICTION(Code)



DIAGNOSTICS_ILLEGAL
final public static int DIAGNOSTICS_ILLEGAL(Code)



FUNCTION_CALL_ILLEGAL
final public static int FUNCTION_CALL_ILLEGAL(Code)



IGNORE_MISSING_CLASSES
final public static int IGNORE_MISSING_CLASSES(Code)



INTERNAL_SQL_ILLEGAL
final public static int INTERNAL_SQL_ILLEGAL(Code)



INTERNAL_SQL_LEGAL
final public static int INTERNAL_SQL_LEGAL(Code)
Any SQL we support is legal



MODIFIES_SQL_DATA_PROCEDURE_ILLEGAL
final public static int MODIFIES_SQL_DATA_PROCEDURE_ILLEGAL(Code)
Calling procedures that modify sql data from before triggers is illegal.



SCHEMA_ILLEGAL
final public static int SCHEMA_ILLEGAL(Code)



SQL_LEGAL
final public static int SQL_LEGAL(Code)
Standard SQL is legal



SUBQUERY_ILLEGAL
final public static int SUBQUERY_ILLEGAL(Code)



UNNAMED_PARAMETER_ILLEGAL
final public static int UNNAMED_PARAMETER_ILLEGAL(Code)



USER_ILLEGAL
final public static int USER_ILLEGAL(Code)





Method Detail
addRequiredColumnPriv
public void addRequiredColumnPriv(ColumnDescriptor column)(Code)
Add a column privilege to the list of used column privileges.
Parameters:
  column -



addRequiredRoutinePriv
public void addRequiredRoutinePriv(AliasDescriptor routine)(Code)
Add a routine execute privilege to the list of used routine privileges.
Parameters:
  routine -



addRequiredSchemaPriv
public void addRequiredSchemaPriv(String schema, String aid, int privType)(Code)
Add a schema privilege to the list of used privileges.
Parameters:
  schema - Schema name of the object that is being accessed
Parameters:
  aid - Requested authorizationId for new schema
Parameters:
  privType - CREATE_SCHEMA_PRIV, MODIFY_SCHEMA_PRIV or DROP_SCHEMA_PRIV



addRequiredTablePriv
public void addRequiredTablePriv(TableDescriptor table)(Code)
Add a table or view privilege to the list of used table privileges.
Parameters:
  table -



addSavedObject
int addSavedObject(Object o)(Code)
Add an object to the pool that is created at compile time and used at execution time. Use the integer to reference it in execution constructs. Execution code will have to generate:
 (#objectType) (this.getPreparedStatement().getSavedObject(#int))
 <\pre>

Parameters:
  o - object to add to the pool of saved objects the entry # for the object



addWarning
public void addWarning(SQLWarning warning)(Code)
Add a compile time warning.



createDependency
void createDependency(Provider p) throws StandardException(Code)
Add a dependency for the current dependent.
Parameters:
  p - The Provider of the dependency.
exception:
  StandardException - thrown on failure.



createDependency
public void createDependency(Dependent d, Provider p) throws StandardException(Code)
Add a dependency between two objects.
Parameters:
  d - The Dependent object.
Parameters:
  p - The Provider of the dependency.
exception:
  StandardException - thrown on failure.



firstOnStack
public void firstOnStack()(Code)
Mark this CompilerContext as the first on the stack, so we can avoid continually popping and pushing a CompilerContext.



getClassFactory
ClassFactory getClassFactory()(Code)
Return the class factory to use in this compilation.



getCompilationSchema
public SchemaDescriptor getCompilationSchema()(Code)
Get the compilation schema descriptor for this compilation context. Will be null if no default schema lookups have occured. Ie. the statement is independent of the current schema. the compilation schema descirptor



getCurrentAuxiliaryProviderList
ProviderList getCurrentAuxiliaryProviderList()(Code)
Get the current auxiliary provider list from this CompilerContext. The current AuxiliaryProviderList.



getCursorInfo
public Object getCursorInfo()(Code)
Get the cursor info stored in the context. the cursor info



getEntryIsolationLevel
public int getEntryIsolationLevel()(Code)
Get the entry isolation level from this CC. The entry isolation level.



getInUse
public boolean getInUse()(Code)
Return the in use state for the compiler context. boolean The in use state for the compiler context.



getJavaFactory
JavaFactory getJavaFactory()(Code)
Get the JavaFactory from this CompilerContext. The JavaFactory associated with this CompilerContext



getNextColumnNumber
int getNextColumnNumber()(Code)
Get the current next column number (for generated column names) from this CompilerContext. int The next column number for the current statement.



getNextEquivalenceClass
public int getNextEquivalenceClass()(Code)
Get the next equivalence class for equijoin clauses. The next equivalence class for equijoin clauses.



getNextResultSetNumber
int getNextResultSetNumber()(Code)
Get the current next ResultSet number from this CompilerContext. int The next ResultSet number for the current statement.



getNextSubqueryNumber
int getNextSubqueryNumber()(Code)
Get the current next subquery number from this CompilerContext. int The next subquery number for the current statement.



getNextTableNumber
int getNextTableNumber()(Code)
Get the current next table number from this CompilerContext. int The next table number for the current statement.



getNodeFactory
NodeFactory getNodeFactory()(Code)
Get the NodeFactory from this CompilerContext. The NodeFactory associated with this CompilerContext



getNumResultSets
int getNumResultSets()(Code)
Get the number of Results in the current statement from this CompilerContext. The number of ResultSets in the current statement.



getNumSubquerys
int getNumSubquerys()(Code)
Get the number of subquerys in the current statement from this CompilerContext. int The number of subquerys in the current statement.



getNumTables
int getNumTables()(Code)
Get the number of tables in the current statement from this CompilerContext. int The number of tables in the current statement.



getParameterList
public Vector getParameterList()(Code)
Get the parameter list. The parameter list.



getParameterTypes
public DataTypeDescriptor[] getParameterTypes()(Code)
Get the array of DataTypeDescriptor representing the types of the ? parameters. The parameter descriptors



getParser
Parser getParser()(Code)
Get the Parser from this CompilerContext. The parser associated with this CompilerContext



getReliability
public int getReliability()(Code)
Return the reliability requirements of this clause. See setReliability() for a definition of clause reliability. a bitmask of which types of query fragments are to be forbidden



getRequiredPermissionsList
public List getRequiredPermissionsList()(Code)
The list of required privileges.



getReturnParameterFlag
public boolean getReturnParameterFlag()(Code)
Is the callable statement uses ? for return parameter. true if ? = call else false



getSavedObjects
Object[] getSavedObjects()(Code)
Get the saved object pool (for putting into the prepared statement). This turns it into its storable form, an array of objects. the saved object pool.



getScanIsolationLevel
public int getScanIsolationLevel()(Code)
Get the isolation level for the scans in this query. The isolation level for the scans in this query.



getSortCostController
public SortCostController getSortCostController() throws StandardException(Code)
Get a SortCostController.
exception:
  StandardException - Thrown on error



getStoreCostController
public StoreCostController getStoreCostController(long conglomerateNumber) throws StandardException(Code)
Get a StoreCostController for the given conglomerate.
Parameters:
  conglomerateNumber - The conglomerate for which to get aStoreCostController. The appropriate StoreCostController.
exception:
  StandardException - Thrown on error



getTypeCompilerFactory
TypeCompilerFactory getTypeCompilerFactory()(Code)
Get the TypeCompilerFactory from this CompilerContext. The TypeCompilerFactory associated with this CompilerContext



getUniqueClassName
String getUniqueClassName()(Code)
Get a unique Class name from this CompilerContext. Ensures it is globally unique for this JVM. String A unique-enough class name.



getWarnings
public SQLWarning getWarnings()(Code)
Get the chain of compile time warnings.



isFirstOnStack
public boolean isFirstOnStack()(Code)
Is this the first CompilerContext on the stack?



popCurrentPrivType
public void popCurrentPrivType()(Code)



pushCurrentPrivType
public void pushCurrentPrivType(int privType)(Code)
Sets the current privilege type context and pushes the previous on onto a stack. Column and table nodes do not know how they are being used. Higher level nodes in the query tree do not know what is being referenced. Keeping the context allows the two to come together.
Parameters:
  privType - One of the privilege types in org.apache.derby.iapi.sql.conn.Authorizer.



resetContext
void resetContext()(Code)
Reset compiler context (as for instance, when we recycle a context for use by another compilation.



resetNextResultSetNumber
void resetNextResultSetNumber()(Code)
Reset the next ResultSet number from this CompilerContext.



setCompilationSchema
public SchemaDescriptor setCompilationSchema(SchemaDescriptor newDefault)(Code)
Set the compilation schema descriptor for this compilation context.
Parameters:
  newDefault - compilation schema the previous compilation schema descirptor



setCurrentAuxiliaryProviderList
void setCurrentAuxiliaryProviderList(ProviderList apl)(Code)
Set the current auxiliary provider list for this CompilerContext.
Parameters:
  apl - The new current AuxiliaryProviderList.



setCurrentDependent
void setCurrentDependent(Dependent d)(Code)
Set the current dependent from this CompilerContext. This should be called at the start of a compile to register who has the dependencies needed for the compilation.
Parameters:
  d - The Dependent currently being compiled.



setCursorInfo
public void setCursorInfo(Object cursorInfo)(Code)
Set params
Parameters:
  cursorInfo - the cursor info



setEntryIsolationLevel
public void setEntryIsolationLevel(int isolationLevel)(Code)
Set the isolation level on entry to this CC so that it can be restored on exit.
Parameters:
  isolationLevel - The isolation level on entry.



setInUse
public void setInUse(boolean inUse)(Code)
Set the in use state for the compiler context.
Parameters:
  inUse - The new inUse state for the compiler context.



setParameterList
public void setParameterList(Vector parameterList)(Code)
Set the parameter list.
Parameters:
  parameterList - The parameter list.



setReliability
public void setReliability(int reliability)(Code)
Sets which kind of query fragments are NOT allowed. Basically, these are fragments which return unstable results. CHECK CONSTRAINTS and CREATE PUBLICATION want to forbid certain kinds of fragments.
Parameters:
  reliability - bitmask of types of query fragments to be forbiddensee the reliability bitmasks above



setReturnParameterFlag
public void setReturnParameterFlag()(Code)
If callable statement uses ? = form



setSavedObjects
public void setSavedObjects(Object[] objs)(Code)
Set the saved object pool (for putting into the prepared statement).
Parameters:
  objs - The new saved objects



setScanIsolationLevel
public void setScanIsolationLevel(int isolationLevel)(Code)
Set the isolation level for the scans in this query.
Parameters:
  isolationLevel - The isolation level to use.



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