public class HQLX extends AbstractImplementation
ImplementationIF| Modifier and Type | Field and Description |
|---|---|
protected AoSession |
aoSession |
protected java.lang.String |
loglevel |
protected java.lang.String |
messagelevel |
protected ResultSetPrinterIF |
printer |
protected QueryStructureExt |
queryStructureExt |
protected java.lang.String |
tracelevel |
arguments, ctx, descriptor, NEW_LINE| Constructor and Description |
|---|
HQLX()
Create the HQLX using a context.
|
HQLX(XSDContextIF ctx)
Create the HQLX using a context.
|
HQLX(XSDContextIF ctx,
Hqlx hqlxXSD)
Create the HQLX using a context.
|
HQLX(XSDContextIF ctx,
java.util.Properties arguments)
Create the HQLX using a context.
|
HQLX(XSDContextIF ctx,
java.util.Properties arguments,
Hqlx hqlxXSD)
Create the HQLX using a context.
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
checkDescriptor(java.lang.Object descriptor) |
static HQLX |
createInstance(XSDContextIF ctx,
java.io.InputStream is)
Use this method to create a HQLX object from XML input stream
|
static HQLX |
createInstance(XSDContextIF ctx,
java.lang.String buf)
Use this method to create a HQLX object XML string
|
static HQLX |
createInstance(XSDContextIF ctx,
java.lang.String[] buf)
Use this method to create a HQLX object from XML string array
|
static HQLX |
createInstance(XSDContextIF ctx,
java.lang.StringBuffer buf)
Use this method to create a object from XML string buffer
|
java.util.List<java.lang.String> |
createQueryStructureExt()
Create a QueryStructureExt from XML querystructureext descriptor.
|
ResultSetPrinterIF |
createResultSetPrinter()
Create a result set printer from an implementation xml descriptor.
|
AoSession |
createSession()
Create a session from XML aosession descriptor.
|
java.util.List<java.lang.String> |
getAliases()
Get the current alias list.
|
static java.lang.String[] |
getDefaultColumnNames(ApplicationStructure asObj,
ResultSetExt[] resultSet)
Get the default column names from a resultSet.
|
java.util.List<FormatToStringIF> |
getFormatStrings()
Get the current format string list.
|
static java.lang.String |
getLocalFilename(XSDContextIF ctx,
java.lang.String filename)
Get the local filename.
|
int |
getMaxRows()
Get the maximum number of rows to be selected.
|
QueryStructureExt |
getQueryStructureExt()
Return the internal QueryStructureExt structure.
|
ResultSetExt[] |
getResultSet()
Get the result set.
|
ResultSetExt[] |
getResultSet(java.util.List<java.lang.String> alias)
Get the result set and fill the default alias list.
|
AoSession |
getSession()
Get the internal session.
|
void |
init()
Initialize the program.
|
static void |
main(java.lang.String[] args)
The main program to execute an HQLX XML fromn commandline.
|
void |
printResultSet(java.util.List<java.lang.String> alias,
ResultSetPrinterIF printer,
java.lang.String prefix,
java.lang.String postfix)
Print the result set.
|
void |
printResultSet(ResultSetExt[] resultSet)
Print the result set.
|
void |
printResultSet(ResultSetExt[] resultSet,
java.util.List<java.lang.String> alias)
Print the result set.
|
void |
printResultSet(ResultSetExt[] resultSet,
java.util.List<java.lang.String> alias,
java.util.List<FormatToStringIF> formats,
ResultSetPrinterIF printer,
java.lang.String prefix,
java.lang.String postfix)
Print the result set.
|
void |
printResultSet(ResultSetExt[] resultSet,
java.util.List<java.lang.String> alias,
java.util.List<FormatToStringIF> formats,
java.lang.String prefix,
java.lang.String postfix)
Print the result set.
|
void |
printResultSet(ResultSetExt[] resultSet,
java.util.List<java.lang.String> alias,
ResultSetPrinterIF printer,
java.lang.String prefix,
java.lang.String postfix)
Print the result set.
|
void |
printResultSet(ResultSetExt[] resultSet,
java.lang.String prefix,
java.lang.String postfix)
Print the result set.
|
void |
printResultSet(java.lang.String prefix,
java.util.List<java.lang.String> alias,
java.lang.String postfix)
Print the result set.
|
void |
setDescriptor(java.lang.Object descriptor)
Set the xml tree descriptor.
|
void |
setMaxRows(int maxRows)
Set the maximum number of rows to be selected.
|
void |
setResultSetPrinter(ResultSetPrinterIF printer)
Set a resultset printer.
|
void |
setSession(AoSession aoSession)
Set the session.
|
addAttributesToNameValueUnitArray, addAttributeToNameValueUnitArray, addStringValueToNameValueUnitArray, checkDirectoy, checkDirectoy, checkDirectoy, checkFile, checkFile, checkFile, checkIntValue, checkStringValue, compressNvuArray, createMessageFromPropertyFile, createMessageFromPropertyFile, createMessageFromPropertyFile, createTsUnionFromObject, deleteRowWithAttributes, getArguments, getContext, getDescriptor, getListFromProperty, getMandatoryProperty, getMandatoryProperty, getMandatoryPropertyAsInt, getMandatoryPropertyAsList, getMandatoryPropertyWithRuleException, getNvuArrayFromMap, getNvuArrayFromMap, getNvuObjectWithName, getNvuObjectWithName, getNvuObjectWithName, getOdsCacheFromProperty, getOptioanlPropertyAsInt, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsList, makeUpperCaseKeyword, removeAttributeFromNameValueUnitArray, removeAttributeFromNameValueUnitArray, setArguments, setContextprotected AoSession aoSession
protected java.lang.String loglevel
protected java.lang.String messagelevel
protected java.lang.String tracelevel
protected QueryStructureExt queryStructureExt
protected ResultSetPrinterIF printer
public HQLX()
public HQLX(XSDContextIF ctx, java.util.Properties arguments, Hqlx hqlxXSD) throws InvalidArgumentException, InvalidDescriptorException
ctx - the context in that the query should run.properties - the arguments (may be null)hqlxXSD - the XML tree node of the query.InvalidArgumentExceptionInvalidDescriptorExceptionpublic HQLX(XSDContextIF ctx, Hqlx hqlxXSD) throws InvalidArgumentException, InvalidDescriptorException
ctx - the context in that the query should run.hqlxXSD - the XML tree node of the query.InvalidArgumentExceptionInvalidDescriptorExceptionpublic HQLX(XSDContextIF ctx, java.util.Properties arguments) throws InvalidArgumentException, InvalidDescriptorException
ctx - the context in that the query should run.properties - the arguments (may be null)InvalidArgumentExceptionInvalidDescriptorExceptionpublic HQLX(XSDContextIF ctx) throws InvalidArgumentException, InvalidDescriptorException
ctx - the context in that the query should run.InvalidArgumentExceptionInvalidDescriptorExceptionpublic static HQLX createInstance(XSDContextIF ctx, java.lang.StringBuffer buf) throws java.lang.Exception
ctx - the contextbuf - the string bufferjava.lang.Exceptionpublic static HQLX createInstance(XSDContextIF ctx, java.lang.String[] buf) throws java.lang.Exception
ctx - the contextbuf - the string arrayjava.lang.Exceptionpublic static HQLX createInstance(XSDContextIF ctx, java.lang.String buf) throws java.lang.Exception
ctx - the contextbuf - the stringjava.lang.Exceptionpublic static HQLX createInstance(XSDContextIF ctx, java.io.InputStream is) throws java.lang.Exception
ctx - the contextis - the inputstreamjava.lang.Exceptionpublic void setDescriptor(java.lang.Object descriptor)
throws InvalidDescriptorException
setDescriptor in interface ImplementationIFsetDescriptor in class AbstractImplementationdescriptor - the tree node.InvalidDescriptorException - if the descriptor isn't valid.protected static void checkDescriptor(java.lang.Object descriptor)
throws InvalidDescriptorException
InvalidDescriptorExceptionpublic void init()
throws InitializationFailedException
init in interface ImplementationIFinit in class AbstractImplementationInitializationFailedException - if the initialization fails.public void setSession(AoSession aoSession)
aoSession - the ASAM ODS session.public AoSession createSession() throws AoException, java.lang.Exception
AoExceptionjava.lang.Exceptionpublic java.util.List<java.lang.String> createQueryStructureExt()
throws AoException,
java.text.ParseException,
java.lang.Exception
alias - a list containing the aliases for column names.AoExceptionjava.text.ParseExceptionjava.lang.Exceptionpublic java.util.List<java.lang.String> getAliases()
public java.util.List<FormatToStringIF> getFormatStrings()
public void setResultSetPrinter(ResultSetPrinterIF printer)
printer - the printerpublic ResultSetPrinterIF createResultSetPrinter() throws java.io.FileNotFoundException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.Exception
java.io.FileNotFoundExceptionjava.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.Exceptionpublic AoSession getSession()
public void setMaxRows(int maxRows)
maxRows - the total numberpublic int getMaxRows()
public QueryStructureExt getQueryStructureExt()
public ResultSetExt[] getResultSet() throws AoException
AoExceptionpublic ResultSetExt[] getResultSet(java.util.List<java.lang.String> alias) throws AoException
alias - the list containing the aliases. It is also used to return the alias list.AoExceptionpublic void printResultSet(ResultSetExt[] resultSet) throws java.lang.Exception
resultSet - the result setAoExceptionjava.lang.Exceptionpublic void printResultSet(ResultSetExt[] resultSet, java.util.List<java.lang.String> alias) throws java.lang.Exception
resultSet - the result setalias - the list of aliases.AoExceptionjava.lang.Exceptionpublic void printResultSet(ResultSetExt[] resultSet, java.util.List<java.lang.String> alias, java.util.List<FormatToStringIF> formats, java.lang.String prefix, java.lang.String postfix) throws java.lang.Exception
resultSet - the result setalias - the list of aliases.prefix - the line prefix for printing.postfix - the line postfix.AoExceptionjava.lang.Exceptionpublic void printResultSet(ResultSetExt[] resultSet, java.lang.String prefix, java.lang.String postfix) throws java.lang.Exception
resultSet - the result setprefix - the line prefix for printing.postfix - the line postfix.AoExceptionjava.lang.Exceptionpublic void printResultSet(java.lang.String prefix,
java.util.List<java.lang.String> alias,
java.lang.String postfix)
throws java.lang.Exception
prefix - the line prefix for printing.alias - the list of aliases.postfix - the line postfix.AoExceptionjava.lang.Exceptionpublic void printResultSet(java.util.List<java.lang.String> alias,
ResultSetPrinterIF printer,
java.lang.String prefix,
java.lang.String postfix)
throws java.lang.Exception
printer - the printer to be used.alias - the list of aliases.prefix - the line prefix for printing.postfix - the line postfix.AoExceptionjava.lang.Exceptionpublic void printResultSet(ResultSetExt[] resultSet, java.util.List<java.lang.String> alias, ResultSetPrinterIF printer, java.lang.String prefix, java.lang.String postfix) throws java.lang.Exception
resultSet - the result set.alias - the list of aliases.printer - the printer to be used.prefix - the line prefix for printing.postfix - the line postfix.AoExceptionjava.lang.Exceptionpublic void printResultSet(ResultSetExt[] resultSet, java.util.List<java.lang.String> alias, java.util.List<FormatToStringIF> formats, ResultSetPrinterIF printer, java.lang.String prefix, java.lang.String postfix) throws java.lang.Exception
resultSet - the result set.alias - the list of aliases.printer - the printer to be used.prefix - the line prefix for printing.postfix - the line postfix.AoExceptionjava.lang.Exceptionpublic static java.lang.String[] getDefaultColumnNames(ApplicationStructure asObj, ResultSetExt[] resultSet)
asObj - The application structure.resultSet - the result set.public static void main(java.lang.String[] args)
args - the command line arguments.public static java.lang.String getLocalFilename(XSDContextIF ctx, java.lang.String filename) throws java.io.IOException
a - filename spec.java.io.IOException