Class NamedQuery

java.lang.Object
org.exolab.castor.mapping.xml.NamedQuery
All Implemented Interfaces:
Serializable

public class NamedQuery extends Object implements Serializable
Version:
$Revision$ $Date$
See Also:
  • Constructor Details

    • NamedQuery

      public NamedQuery()
  • Method Details

    • addQueryHint

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

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

      public Enumeration<? extends QueryHint> enumerateQueryHint()
      Method enumerateQueryHint.
      Returns:
      an Enumeration over all possible elements of this collection
    • getName

      public String getName()
      Returns the value of field 'name'.
      Returns:
      the value of field 'Name'.
    • getQuery

      public String getQuery()
      Returns the value of field 'query'.
      Returns:
      the value of field 'Query'.
    • getQueryHint

      public QueryHint getQueryHint(int index) throws IndexOutOfBoundsException
      Method getQueryHint.
      Parameters:
      index -
      Returns:
      the value of the org.exolab.castor.mapping.xml.QueryHint at the given index
      Throws:
      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 Iterator<? extends QueryHint> iterateQueryHint()
      Method iterateQueryHint.
      Returns:
      an Iterator over all possible elements in this collection
    • marshal

      public void marshal(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(ContentHandler handler) throws IOException, MarshalException, ValidationException
      Parameters:
      handler -
      Throws:
      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(String name)
      Sets the value of field 'name'.
      Parameters:
      name - the value of field 'name'.
    • setQuery

      public void setQuery(String query)
      Sets the value of field 'query'.
      Parameters:
      query - the value of field 'query'.
    • setQueryHint

      public void setQueryHint(int index, QueryHint vQueryHint) throws IndexOutOfBoundsException
      Parameters:
      index -
      vQueryHint -
      Throws:
      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(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