org.exolab.castor.mapping.xml
Class NamedNativeQuery

java.lang.Object
  extended by org.exolab.castor.mapping.xml.NamedNativeQuery
All Implemented Interfaces:
java.io.Serializable

public class NamedNativeQuery
extends java.lang.Object
implements java.io.Serializable

Class NamedNativeQuery.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
NamedNativeQuery()
           
 
Method Summary
 void addQueryHint(int index, QueryHint vQueryHint)
           
 void addQueryHint(QueryHint vQueryHint)
           
 java.util.Enumeration<? extends QueryHint> enumerateQueryHint()
          Method enumerateQueryHint.
 java.lang.String getName()
          Returns the value of field 'name'.
 java.lang.String getQuery()
          Returns the value of field 'query'.
 QueryHint[] getQueryHint()
          Method getQueryHint.Returns the contents of the collection in an Array.
 QueryHint getQueryHint(int index)
          Method getQueryHint.
 int getQueryHintCount()
          Method getQueryHintCount.
 java.lang.String getResultClass()
          Returns the value of field 'resultClass'.
 java.lang.String getResultSetMapping()
          Returns the value of field 'resultSetMapping'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends QueryHint> iterateQueryHint()
          Method iterateQueryHint.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllQueryHint()
           
 boolean removeQueryHint(QueryHint vQueryHint)
          Method removeQueryHint.
 QueryHint removeQueryHintAt(int index)
          Method removeQueryHintAt.
 void setName(java.lang.String name)
          Sets the value of field 'name'.
 void setQuery(java.lang.String query)
          Sets the value of field 'query'.
 void setQueryHint(int index, QueryHint vQueryHint)
           
 void setQueryHint(QueryHint[] vQueryHintArray)
           
 void setResultClass(java.lang.String resultClass)
          Sets the value of field 'resultClass'.
 void setResultSetMapping(java.lang.String resultSetMapping)
          Sets the value of field 'resultSetMapping'.
static NamedNativeQuery unmarshal(java.io.Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedNativeQuery

public NamedNativeQuery()
Method Detail

addQueryHint

public void addQueryHint(QueryHint vQueryHint)
                  throws java.lang.IndexOutOfBoundsException
Parameters:
vQueryHint -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addQueryHint

public void addQueryHint(int index,
                         QueryHint vQueryHint)
                  throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vQueryHint -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateQueryHint

public java.util.Enumeration<? extends QueryHint> enumerateQueryHint()
Method enumerateQueryHint.

Returns:
an Enumeration over all possible elements of this collection

getName

public java.lang.String getName()
Returns the value of field 'name'.

Returns:
the value of field 'Name'.

getQuery

public java.lang.String getQuery()
Returns the value of field 'query'.

Returns:
the value of field 'Query'.

getQueryHint

public QueryHint getQueryHint(int index)
                       throws java.lang.IndexOutOfBoundsException
Method getQueryHint.

Parameters:
index -
Returns:
the value of the org.exolab.castor.mapping.xml.QueryHint at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getQueryHint

public QueryHint[] getQueryHint()
Method getQueryHint.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getQueryHintCount

public int getQueryHintCount()
Method getQueryHintCount.

Returns:
the size of this collection

getResultClass

public java.lang.String getResultClass()
Returns the value of field 'resultClass'.

Returns:
the value of field 'ResultClass'.

getResultSetMapping

public java.lang.String getResultSetMapping()
Returns the value of field 'resultSetMapping'.

Returns:
the value of field 'ResultSetMapping'.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iterateQueryHint

public java.util.Iterator<? extends QueryHint> iterateQueryHint()
Method iterateQueryHint.

Returns:
an Iterator over all possible elements in this collection

marshal

public void marshal(java.io.Writer out)
             throws MarshalException,
                    ValidationException
Parameters:
out -
Throws:
MarshalException - if object is null or if any SAXException is thrown during marshaling
ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(org.xml.sax.ContentHandler handler)
             throws java.io.IOException,
                    MarshalException,
                    ValidationException
Parameters:
handler -
Throws:
java.io.IOException - if an IOException occurs during marshaling
ValidationException - if this object is an invalid instance according to the schema
MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllQueryHint

public void removeAllQueryHint()

removeQueryHint

public boolean removeQueryHint(QueryHint vQueryHint)
Method removeQueryHint.

Parameters:
vQueryHint -
Returns:
true if the object was removed from the collection.

removeQueryHintAt

public QueryHint removeQueryHintAt(int index)
Method removeQueryHintAt.

Parameters:
index -
Returns:
the element removed from the collection

setName

public void setName(java.lang.String name)
Sets the value of field 'name'.

Parameters:
name - the value of field 'name'.

setQuery

public void setQuery(java.lang.String query)
Sets the value of field 'query'.

Parameters:
query - the value of field 'query'.

setQueryHint

public void setQueryHint(int index,
                         QueryHint vQueryHint)
                  throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vQueryHint -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setQueryHint

public void setQueryHint(QueryHint[] vQueryHintArray)
Parameters:
vQueryHintArray -

setResultClass

public void setResultClass(java.lang.String resultClass)
Sets the value of field 'resultClass'.

Parameters:
resultClass - the value of field 'resultClass'.

setResultSetMapping

public void setResultSetMapping(java.lang.String resultSetMapping)
Sets the value of field 'resultSetMapping'.

Parameters:
resultSetMapping - the value of field 'resultSetMapping'

unmarshal

public static NamedNativeQuery unmarshal(java.io.Reader reader)
                                  throws MarshalException,
                                         ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.exolab.castor.mapping.xml.NamedNativeQuery
Throws:
MarshalException - if object is null or if any SAXException is thrown during marshaling
ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws ValidationException
Throws:
ValidationException - if this object is an invalid instance according to the schema


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com