Package org.exolab.castor.mapping.xml
Class NamedNativeQuery
java.lang.Object
org.exolab.castor.mapping.xml.NamedNativeQuery
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addQueryHint
(int index, QueryHint vQueryHint) void
addQueryHint
(QueryHint vQueryHint) Enumeration
<? extends QueryHint> Method enumerateQueryHint.getName()
Returns the value of field 'name'.getQuery()
Returns the value of field 'query'.Method getQueryHint.Returns the contents of the collection in an Array.getQueryHint
(int index) Method getQueryHint.int
Method getQueryHintCount.Returns the value of field 'resultClass'.Returns the value of field 'resultSetMapping'.boolean
isValid()
Method isValid.Method iterateQueryHint.void
void
marshal
(ContentHandler handler) void
boolean
removeQueryHint
(QueryHint vQueryHint) Method removeQueryHint.removeQueryHintAt
(int index) Method removeQueryHintAt.void
Sets the value of field 'name'.void
Sets the value of field 'query'.void
setQueryHint
(int index, QueryHint vQueryHint) void
setQueryHint
(QueryHint[] vQueryHintArray) void
setResultClass
(String resultClass) Sets the value of field 'resultClass'.void
setResultSetMapping
(String resultSetMapping) Sets the value of field 'resultSetMapping'.static NamedNativeQuery
Method unmarshal.void
validate()
-
Constructor Details
-
NamedNativeQuery
public NamedNativeQuery()
-
-
Method Details
-
addQueryHint
- Parameters:
vQueryHint
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addQueryHint
- Parameters:
index
-vQueryHint
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
enumerateQueryHint
Method enumerateQueryHint.- Returns:
- an Enumeration over all possible elements of this collection
-
getName
-
getQuery
-
getQueryHint
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
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
Returns the value of field 'resultClass'.- Returns:
- the value of field 'ResultClass'.
-
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
-
marshal
- 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(ContentHandler handler) throws IOException, MarshalException, ValidationException - Parameters:
handler
-- Throws:
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
Method removeQueryHint.- Parameters:
vQueryHint
-- Returns:
- true if the object was removed from the collection.
-
removeQueryHintAt
Method removeQueryHintAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
setName
Sets the value of field 'name'.- Parameters:
name
- the value of field 'name'.
-
setQuery
Sets the value of field 'query'.- Parameters:
query
- the value of field 'query'.
-
setQueryHint
- Parameters:
index
-vQueryHint
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setQueryHint
- Parameters:
vQueryHintArray
-
-
setResultClass
Sets the value of field 'resultClass'.- Parameters:
resultClass
- the value of field 'resultClass'.
-
setResultSetMapping
Sets the value of field 'resultSetMapping'.- Parameters:
resultSetMapping
- the value of field 'resultSetMapping'
-
unmarshal
public static NamedNativeQuery unmarshal(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 marshalingValidationException
- if this object is an invalid instance according to the schema
-
validate
- Throws:
ValidationException
- if this object is an invalid instance according to the schema
-