Package org.exolab.castor.mapping.xml
Class NamedQuery
- java.lang.Object
-
- org.exolab.castor.mapping.xml.NamedQuery
-
- All 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
Constructors Constructor Description NamedQuery()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.boolean
isValid()
Method isValid.java.util.Iterator<? extends QueryHint>
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()
-
-
-
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
-
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 marshalingValidationException
- 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 marshalingValidationException
- if this object is an invalid instance according to the schemaMarshalException
- 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
-
-
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 marshalingValidationException
- 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
-
-