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(java.lang.String name)
          Constructor for a query of the specified name.
 
Method Summary
 java.lang.String getFetchPlanName()
           
 java.lang.String getLanguage()
           
 java.lang.String getName()
           
 java.lang.String getQuery()
           
 java.lang.String getResultClass()
           
 java.lang.String getResultMetaDataName()
           
 java.lang.String getScope()
           
 boolean isUnique()
           
 boolean isUnmodifiable()
           
 QueryMetaData setFetchPlanName(java.lang.String fpName)
           
 QueryMetaData setLanguage(java.lang.String language)
           
 QueryMetaData setQuery(java.lang.String query)
           
 QueryMetaData setResultClass(java.lang.String resultClass)
           
 QueryMetaData setResultMetaDataName(java.lang.String mdName)
           
 QueryMetaData setScope(java.lang.String scope)
           
 QueryMetaData setUnique(boolean unique)
           
 QueryMetaData setUnique(java.lang.String unique)
           
 QueryMetaData setUnmodifiable(boolean unmodifiable)
           
 QueryMetaData setUnmodifiable(java.lang.String unmodifiable)
           
 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, assertIfInitialised, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, newExtensionMetaData, removeExtension, setParent, 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 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(java.lang.String name)
Constructor for a query of the specified name. Set fields using setters, before populate().

Parameters:
name - The Query name
Method Detail

getScope

public java.lang.String getScope()

setScope

public QueryMetaData setScope(java.lang.String scope)

getName

public java.lang.String getName()

getLanguage

public java.lang.String getLanguage()

setLanguage

public QueryMetaData setLanguage(java.lang.String language)

isUnmodifiable

public boolean isUnmodifiable()

setUnmodifiable

public QueryMetaData setUnmodifiable(boolean unmodifiable)

setUnmodifiable

public QueryMetaData setUnmodifiable(java.lang.String unmodifiable)

getQuery

public java.lang.String getQuery()

setQuery

public QueryMetaData setQuery(java.lang.String query)

getResultClass

public java.lang.String getResultClass()

setResultClass

public QueryMetaData setResultClass(java.lang.String resultClass)

getResultMetaDataName

public java.lang.String getResultMetaDataName()

setResultMetaDataName

public QueryMetaData setResultMetaDataName(java.lang.String mdName)

isUnique

public boolean isUnique()

setUnique

public QueryMetaData setUnique(boolean unique)

setUnique

public QueryMetaData setUnique(java.lang.String unique)

getFetchPlanName

public java.lang.String getFetchPlanName()

setFetchPlanName

public QueryMetaData setFetchPlanName(java.lang.String fpName)

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 © 2011. All Rights Reserved.