org.datanucleus.metadata
Class QueryMetaData

java.lang.Object
  extended by org.datanucleus.metadata.MetaData
      extended by org.datanucleus.metadata.QueryMetaData
All Implemented Interfaces:
java.io.Serializable

public class QueryMetaData
extends MetaData

Representation of the MetaData of a named Query.

See Also:
Serialized Form

Field Summary
protected  java.lang.String fetchPlanName
          Name of any fetch-plan to use.
protected  java.lang.String language
          Query language.
protected  java.lang.String name
          Name of the query.
protected  java.lang.String query
          The single string query
protected  java.lang.String resultClass
          The result class to use.
protected  java.lang.String resultMetaDataName
          Name for the MetaData defining the mapping of the result set (for JPA SQL).
protected  java.lang.String scope
          Scope of this query (if any).
protected  boolean unique
          Whether the query returns unique.
protected  boolean unmodifiable
          Whether the query is unmodifiable.
 
Fields inherited from class org.datanucleus.metadata.MetaData
extensions, LOCALISER, METADATA_CREATED_STATE, METADATA_INITIALISED_STATE, METADATA_POPULATED_STATE, METADATA_USED_STATE, metaDataState, parent, VENDOR_NAME, VENDOR_NAME_OLD
 
Constructor Summary
QueryMetaData(MetaData parent, java.lang.String scope, java.lang.String name, java.lang.String language, java.lang.String unmodifiable, java.lang.String resultClass, java.lang.String resultMetaDataName, java.lang.String unique, java.lang.String fetchPlanName)
          Constructor.
 
Method Summary
 java.lang.String getFetchPlanName()
          Accessor for the name of any FetchPlan to use.
 java.lang.String getLanguage()
          Accessor for the language.
 java.lang.String getName()
          Accessor for the query name.
 java.lang.String getQuery()
          Accessor for the query
 java.lang.String getResultClass()
          Accessor for the result class
 java.lang.String getResultMetaDataName()
          Accessor for the name of the QueryResult MetaData to use.
 java.lang.String getScope()
          Accessor for the scope of the query
 boolean isUnique()
          Accessor for the unique tag value.
 boolean isUnmodifiable()
          Accessor for the unmodifiable tag value.
 void setQuery(java.lang.String query)
          Mutator for the query
 java.lang.String toString(java.lang.String prefix, java.lang.String indent)
          Returns a string representation of the object.
 
Methods inherited from class org.datanucleus.metadata.MetaData
addExtension, addExtension, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, removeExtension, setInitialised, setParent, setPopulated, setUsed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

scope

protected java.lang.String scope
Scope of this query (if any).


name

protected final java.lang.String name
Name of the query.


language

protected java.lang.String language
Query language.


unmodifiable

protected boolean unmodifiable
Whether the query is unmodifiable.


query

protected java.lang.String query
The single string query


resultClass

protected java.lang.String resultClass
The result class to use. Only applies to SQL.


resultMetaDataName

protected java.lang.String resultMetaDataName
Name for the MetaData defining the mapping of the result set (for JPA SQL).


unique

protected boolean unique
Whether the query returns unique. Only applies to SQL.


fetchPlanName

protected java.lang.String fetchPlanName
Name of any fetch-plan to use.

Constructor Detail

QueryMetaData

public QueryMetaData(MetaData parent,
                     java.lang.String scope,
                     java.lang.String name,
                     java.lang.String language,
                     java.lang.String unmodifiable,
                     java.lang.String resultClass,
                     java.lang.String resultMetaDataName,
                     java.lang.String unique,
                     java.lang.String fetchPlanName)
Constructor.

Parameters:
parent - the parent of the Query
scope - Scope of the query (if any)
name - The Query name
language - The language name
unmodifiable - The unmodifiable tag
resultClass - The result class (optional)
resultMetaDataName - name of the result MetaData to use (optional)
unique - The unique tag
fetchPlanName - Name of any named fetchPlan to use with this query
Method Detail

getScope

public java.lang.String getScope()
Accessor for the scope of the query

Returns:
scope of the query (if any).

getName

public java.lang.String getName()
Accessor for the query name.

Returns:
query name

getLanguage

public java.lang.String getLanguage()
Accessor for the language.

Returns:
language tag value

isUnmodifiable

public boolean isUnmodifiable()
Accessor for the unmodifiable tag value.

Returns:
unmodifiable tag value

getQuery

public java.lang.String getQuery()
Accessor for the query

Returns:
The query

getResultClass

public java.lang.String getResultClass()
Accessor for the result class

Returns:
result class

getResultMetaDataName

public java.lang.String getResultMetaDataName()
Accessor for the name of the QueryResult MetaData to use.

Returns:
name of the QueryResult MetaData

isUnique

public boolean isUnique()
Accessor for the unique tag value.

Returns:
unique tag value

setQuery

public void setQuery(java.lang.String query)
Mutator for the query

Parameters:
query - The query

getFetchPlanName

public java.lang.String getFetchPlanName()
Accessor for the name of any FetchPlan to use.

Returns:
name of the FetchPlan.

toString

public java.lang.String toString(java.lang.String prefix,
                                 java.lang.String indent)
Returns a string representation of the object.

Overrides:
toString in class MetaData
Parameters:
prefix - prefix string
indent - indent string
Returns:
a string representation of the object.


Copyright © 2009. All Rights Reserved.