Package org.apache.derby.impl.sql
Class GenericLanguageFactory
- java.lang.Object
-
- org.apache.derby.impl.sql.GenericLanguageFactory
-
- All Implemented Interfaces:
ModuleControl
,LanguageFactory
public class GenericLanguageFactory extends java.lang.Object implements LanguageFactory, ModuleControl
The LanguageFactory provides system-wide services that are available on the Database API.
-
-
Field Summary
Fields Modifier and Type Field Description private GenericParameterValueSet
emptySet
-
Fields inherited from interface org.apache.derby.iapi.sql.LanguageFactory
MODULE
-
-
Constructor Summary
Constructors Constructor Description GenericLanguageFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
boot(boolean create, java.util.Properties startParams)
Start-up method for this instance of the language factory.private static java.lang.Object
findServiceModule(java.lang.Object serviceModule, java.lang.String factoryInterface)
Privileged startup.ResultDescription
getResultDescription(ResultColumnDescriptor[] cols, java.lang.String type)
Get a new result descriptionResultDescription
getResultDescription(ResultDescription inputResultDescription, int[] theCols)
Get a new result description from the input result description.ParameterValueSet
newParameterValueSet(ClassInspector ci, int numParms, boolean hasReturnParam)
Factory method for getting a ParameterValueSetvoid
stop()
Stop this module.
-
-
-
Field Detail
-
emptySet
private GenericParameterValueSet emptySet
-
-
Method Detail
-
boot
public void boot(boolean create, java.util.Properties startParams) throws StandardException
Start-up method for this instance of the language factory. This service is expected to be started and accessed relative to a database.- Specified by:
boot
in interfaceModuleControl
- Parameters:
startParams
- The start-up parameters (ignored in this case)- Throws:
StandardException
- Thrown if module cannot be booted.- See Also:
Monitor
,ModuleFactory
-
stop
public void stop()
Stop this module. In this case, nothing needs to be done.- Specified by:
stop
in interfaceModuleControl
- See Also:
Monitor
,ModuleFactory
-
newParameterValueSet
public ParameterValueSet newParameterValueSet(ClassInspector ci, int numParms, boolean hasReturnParam)
Factory method for getting a ParameterValueSet- Specified by:
newParameterValueSet
in interfaceLanguageFactory
numParms
- The number of parameters in the ParameterValueSethasReturnParam
- true if this parameter set has a return parameter. The return parameter is always the 1st parameter in the list. It is due to a callableStatement like this: ? = CALL myMethod()- Returns:
- A new ParameterValueSet with the given number of parms
- See Also:
LanguageFactory.newParameterValueSet(org.apache.derby.iapi.services.loader.ClassInspector, int, boolean)
-
getResultDescription
public ResultDescription getResultDescription(ResultDescription inputResultDescription, int[] theCols)
Get a new result description from the input result description. Picks only the columns in the column array from the inputResultDescription.- Specified by:
getResultDescription
in interfaceLanguageFactory
- Parameters:
inputResultDescription
- the input rdtheCols
- array of ints, non null- Returns:
- ResultDescription the rd
-
getResultDescription
public ResultDescription getResultDescription(ResultColumnDescriptor[] cols, java.lang.String type)
Get a new result description- Specified by:
getResultDescription
in interfaceLanguageFactory
- Parameters:
cols
- an array of col descriptorstype
- the statement type- Returns:
- ResultDescription the rd
-
findServiceModule
private static java.lang.Object findServiceModule(java.lang.Object serviceModule, java.lang.String factoryInterface) throws StandardException
Privileged startup. Must be private so that user code can't call this entry point.- Throws:
StandardException
-
-