org.exolab.castor.mapping.xml

Class NamedQuery

Implemented Interfaces:
java.io.Serializable

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

Class NamedQuery.
Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary

NamedQuery()

Method Summary

void
addQueryHint(int index, QueryHint vQueryHint)
void
addQueryHint(QueryHint vQueryHint)
java.util.Enumeration
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.
boolean
isValid()
Method isValid.
java.util.Iterator
iterateQueryHint()
Method iterateQueryHint.
void
marshal(java.io.Writer out)
void
marshal(org.xml.sax.ContentHandler handler)
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)
static NamedQuery
unmarshal(java.io.Reader reader)
Method unmarshal.
void
validate()

Constructor Details

NamedQuery

public NamedQuery()

Method Details

addQueryHint

public void addQueryHint(int index,
                         QueryHint vQueryHint)
            throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vQueryHint -

addQueryHint

public void addQueryHint(QueryHint vQueryHint)
            throws java.lang.IndexOutOfBoundsException
Parameters:
vQueryHint -

enumerateQueryHint

public java.util.Enumeration 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()
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

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

getQueryHintCount

public int getQueryHintCount()
Method getQueryHintCount.
Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.
Returns:
true if this object is valid according to the schema

iterateQueryHint

public java.util.Iterator 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:
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 -

setQueryHint

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

unmarshal

public static NamedQuery unmarshal(java.io.Reader reader)
            throws MarshalException,
                   ValidationException
Method unmarshal.
Parameters:
reader -
Returns:
the unmarshaled org.exolab.castor.mapping.xml.NamedQuery
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