Package net.ontopia.persistence.proxy
Class QueryDescriptor
- java.lang.Object
-
- net.ontopia.persistence.proxy.QueryDescriptor
-
public class QueryDescriptor extends 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
Fields Modifier and Type Field Description protected int
fetchSize
protected boolean
lookup_identities
protected String
name
protected Class[]
params
protected net.ontopia.persistence.proxy.QueryDescriptor.SelectField[]
selects
protected Map<String,String>
statements
protected String
type
-
Constructor Summary
Constructors Constructor Description QueryDescriptor(String name, String type, boolean lookup_identities)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStatement(String[] platforms, String statement)
INTERNAL: Registers the query statement for the specified platforms.protected DetachedQueryIF
createDetachedQuery(SQLStatementIF stm, String type, boolean lookup_identities)
QueryIF
createQuery(RDBMSAccess access, ObjectAccessIF oaccess, AccessRegistrarIF registrar, 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, String[] platforms)
INTERNAL: Creates a QueryIF instance that uses the specified storage access and platform settings.protected SQLStatement
createSQLStatement(StorageIF storage, String[] platforms)
int
getFetchSize()
INTERNAL: Gets the default fetch size.protected FieldHandlerIF
getFieldHandler(ObjectRelationalMappingIF mapping, Class klass)
String
getName()
INTERNAL: Returns the name of the query.protected FieldHandlerIF[]
getParameterHandlers(ObjectRelationalMappingIF mapping, 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)
String
getStatement(String[] platforms)
INTERNAL: Gets the class type of the query parameters.String
getType()
INTERNAL: Gets the query result type name.void
setFetchSize(int fetchSize)
INTERNAL: Sets the default fetch size.void
setParameters(List<Class<?>> params)
INTERNAL: Sets the class type of the query parameters.void
setSelects(List<net.ontopia.persistence.proxy.QueryDescriptor.SelectField> selects)
INTERNAL: Sets the selected fields.
-
-
-
Method Detail
-
getName
public String getName()
INTERNAL: Returns the name of the query. This field is used together with named query execution.
-
getType
public 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(List<net.ontopia.persistence.proxy.QueryDescriptor.SelectField> selects)
INTERNAL: Sets the selected fields.
-
setParameters
public void setParameters(List<Class<?>> params)
INTERNAL: Sets the class type of the query parameters.
-
getStatement
public String getStatement(String[] platforms)
INTERNAL: Gets the class type of the query parameters.
-
addStatement
public void addStatement(String[] platforms, String statement)
INTERNAL: Registers the query statement for the specified platforms.
-
createSharedQuery
public DetachedQueryIF createSharedQuery(StorageIF storage, AccessRegistrarIF registrar, 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, 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, String[] platforms)
-
createDetachedQuery
protected DetachedQueryIF createDetachedQuery(SQLStatementIF stm, 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, Class[] params)
-
getFieldHandler
protected FieldHandlerIF getFieldHandler(ObjectRelationalMappingIF mapping, Class klass)
-
-