net.ontopia.persistence.proxy
Class QueryDescriptor

java.lang.Object
  extended by net.ontopia.persistence.proxy.QueryDescriptor

public class QueryDescriptor
extends java.lang.Object

INTERNAL: Class used for loading and managing SQL query declarations. It is used by the rdbms proxy implementation, but should implement a query factory interface in the future.


Field Summary
protected  int fetchSize
           
protected  boolean lookup_identities
           
protected  java.lang.String name
           
protected  java.lang.Class[] params
           
protected  net.ontopia.persistence.proxy.QueryDescriptor.SelectField[] selects
           
protected  java.util.Map statements
           
protected  java.lang.String type
           
 
Constructor Summary
QueryDescriptor(java.lang.String name, java.lang.String type, boolean lookup_identities)
           
 
Method Summary
 void addStatement(java.lang.String[] platforms, java.lang.String statement)
          INTERNAL: Registers the query statement for the specified platforms.
protected  DetachedQueryIF createDetachedQuery(SQLStatementIF stm, java.lang.String type, boolean lookup_identities)
           
 QueryIF createQuery(RDBMSAccess access, ObjectAccessIF oaccess, AccessRegistrarIF registrar, java.lang.String[] platforms)
          INTERNAL: Creates a QueryIF instance that uses the specified storage access, object access, access registrar and platform settings for this query descriptor.
 DetachedQueryIF createSharedQuery(StorageIF storage, AccessRegistrarIF registrar, java.lang.String[] platforms)
          INTERNAL: Creates a QueryIF instance that uses the specified storage access and platform settings.
protected  SQLStatement createSQLStatement(StorageIF storage, java.lang.String[] platforms)
           
 int getFetchSize()
          INTERNAL: Gets the default fetch size.
protected  FieldHandlerIF getFieldHandler(ObjectRelationalMappingIF mapping, java.lang.Class klass)
           
 java.lang.String getName()
          INTERNAL: Returns the name of the query.
protected  FieldHandlerIF[] getParameterHandlers(ObjectRelationalMappingIF mapping, java.lang.Class[] params)
           
protected  FieldHandlerIF getSelectFieldHandler(ObjectRelationalMappingIF mapping, net.ontopia.persistence.proxy.QueryDescriptor.SelectField select)
           
protected  FieldHandlerIF[] getSelectFieldHandlers(ObjectRelationalMappingIF mapping, net.ontopia.persistence.proxy.QueryDescriptor.SelectField[] selects)
           
 java.lang.String getStatement(java.lang.String[] platforms)
          INTERNAL: Gets the class type of the query parameters.
 java.lang.String getType()
          INTERNAL: Gets the query result type name.
 void setFetchSize(int fetchSize)
          INTERNAL: Sets the default fetch size.
 void setParameters(java.util.List params)
          INTERNAL: Sets the class type of the query parameters.
 void setSelects(java.util.List selects)
          INTERNAL: Sets the selected fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

type

protected java.lang.String type

fetchSize

protected int fetchSize

selects

protected net.ontopia.persistence.proxy.QueryDescriptor.SelectField[] selects

params

protected java.lang.Class[] params

statements

protected java.util.Map statements

lookup_identities

protected boolean lookup_identities
Constructor Detail

QueryDescriptor

public QueryDescriptor(java.lang.String name,
                       java.lang.String type,
                       boolean lookup_identities)
Method Detail

getName

public java.lang.String getName()
INTERNAL: Returns the name of the query. This field is used together with named query execution.


getType

public java.lang.String getType()
INTERNAL: Gets the query result type name.


getFetchSize

public int getFetchSize()
INTERNAL: Gets the default fetch size.


setFetchSize

public void setFetchSize(int fetchSize)
INTERNAL: Sets the default fetch size.


setSelects

public void setSelects(java.util.List selects)
INTERNAL: Sets the selected fields.


setParameters

public void setParameters(java.util.List params)
INTERNAL: Sets the class type of the query parameters.


getStatement

public java.lang.String getStatement(java.lang.String[] platforms)
INTERNAL: Gets the class type of the query parameters.


addStatement

public void addStatement(java.lang.String[] platforms,
                         java.lang.String statement)
INTERNAL: Registers the query statement for the specified platforms.


createSharedQuery

public DetachedQueryIF createSharedQuery(StorageIF storage,
                                         AccessRegistrarIF registrar,
                                         java.lang.String[] platforms)
INTERNAL: Creates a QueryIF instance that uses the specified storage access and platform settings.


createQuery

public QueryIF createQuery(RDBMSAccess access,
                           ObjectAccessIF oaccess,
                           AccessRegistrarIF registrar,
                           java.lang.String[] platforms)
INTERNAL: Creates a QueryIF instance that uses the specified storage access, object access, access registrar and platform settings for this query descriptor.


createSQLStatement

protected SQLStatement createSQLStatement(StorageIF storage,
                                          java.lang.String[] platforms)

createDetachedQuery

protected DetachedQueryIF createDetachedQuery(SQLStatementIF stm,
                                              java.lang.String type,
                                              boolean lookup_identities)

getSelectFieldHandlers

protected FieldHandlerIF[] getSelectFieldHandlers(ObjectRelationalMappingIF mapping,
                                                  net.ontopia.persistence.proxy.QueryDescriptor.SelectField[] selects)

getSelectFieldHandler

protected FieldHandlerIF getSelectFieldHandler(ObjectRelationalMappingIF mapping,
                                               net.ontopia.persistence.proxy.QueryDescriptor.SelectField select)

getParameterHandlers

protected FieldHandlerIF[] getParameterHandlers(ObjectRelationalMappingIF mapping,
                                                java.lang.Class[] params)

getFieldHandler

protected FieldHandlerIF getFieldHandler(ObjectRelationalMappingIF mapping,
                                         java.lang.Class klass)


Copyright © 2000-2012 Ontopia.