com.healthmarketscience.jackcess.impl.query
Class QueryImpl

java.lang.Object
  extended by com.healthmarketscience.jackcess.impl.query.QueryImpl
All Implemented Interfaces:
Query
Direct Known Subclasses:
BaseSelectQueryImpl, DataDefinitionQueryImpl, PassthroughQueryImpl, UnionQueryImpl, UpdateQueryImpl

public abstract class QueryImpl
extends Object
implements Query

Base class for classes which encapsulate information about an Access query. The toSQLString() method can be used to convert this object into the actual SQL string which this query data represents.

Author:
James Ahlborn

Nested Class Summary
static class QueryImpl.Row
          Struct containing the information from a single row of the system query table.
 
Nested classes/interfaces inherited from interface com.healthmarketscience.jackcess.query.Query
Query.Type
 
Method Summary
static QueryImpl create(int objectFlag, String name, List<QueryImpl.Row> rows, int objectId)
          Creates a concrete Query instance from the given query data.
 String getName()
          Returns the name of the query.
 int getObjectFlag()
           
 int getObjectId()
          Returns the unique object id of the query.
 String getOwnerAccessType()
           
 List<String> getParameters()
          Returns the rows from the system query table from which the query information was derived.
 List<QueryImpl.Row> getRows()
          Returns the rows from the system query table from which the query information was derived.
 Query.Type getType()
          Returns the type of the query.
 QueryImpl.Row getTypeRow()
           
 boolean isHidden()
          Whether or not this query has been marked as hidden.
 String toSQLString()
          Returns the actual SQL string which this query data represents.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public String getName()
Returns the name of the query.

Specified by:
getName in interface Query

getType

public Query.Type getType()
Returns the type of the query.

Specified by:
getType in interface Query

isHidden

public boolean isHidden()
Description copied from interface: Query
Whether or not this query has been marked as hidden.

Specified by:
isHidden in interface Query

getObjectId

public int getObjectId()
Returns the unique object id of the query.

Specified by:
getObjectId in interface Query

getObjectFlag

public int getObjectFlag()
Specified by:
getObjectFlag in interface Query

getRows

public List<QueryImpl.Row> getRows()
Returns the rows from the system query table from which the query information was derived.


getTypeRow

public QueryImpl.Row getTypeRow()

getParameters

public List<String> getParameters()
Description copied from interface: Query
Returns the rows from the system query table from which the query information was derived.

Specified by:
getParameters in interface Query

getOwnerAccessType

public String getOwnerAccessType()
Specified by:
getOwnerAccessType in interface Query

toSQLString

public String toSQLString()
Returns the actual SQL string which this query data represents.

Specified by:
toSQLString in interface Query

toString

public String toString()
Overrides:
toString in class Object

create

public static QueryImpl create(int objectFlag,
                               String name,
                               List<QueryImpl.Row> rows,
                               int objectId)
Creates a concrete Query instance from the given query data.

Parameters:
objectFlag - the flag indicating the type of the query
name - the name of the query
rows - the rows from the system query table containing the data describing this query
objectId - the unique object id of this query
Returns:
a Query instance for the given query data


Copyright © 2005–2017 Health Market Science. All rights reserved.