Class PkType
- java.lang.Object
-
- org.exolab.castor.xml.schema.annotations.jdo.PkType
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
PrimaryKey
public class PkType extends java.lang.Object implements java.io.Serializable
Class PkType.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PkType()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addKey(int index, java.lang.String vKey)
void
addKey(java.lang.String vKey)
java.util.Enumeration
enumerateKey()
Method enumerateKey.java.lang.String[]
getKey()
Method getKey.Returns the contents of the collection in an Array.java.lang.String
getKey(int index)
Method getKey.int
getKeyCount()
Method getKeyCount.boolean
isValid()
Method isValid.java.util.Iterator
iterateKey()
Method iterateKey.void
marshal(java.io.Writer out)
void
marshal(org.xml.sax.ContentHandler handler)
void
removeAllKey()
boolean
removeKey(java.lang.String vKey)
Method removeKey.java.lang.String
removeKeyAt(int index)
Method removeKeyAt.void
setKey(int index, java.lang.String vKey)
void
setKey(java.lang.String[] vKeyArray)
static PkType
unmarshal(java.io.Reader reader)
Method unmarshal.void
validate()
-
-
-
Method Detail
-
addKey
public void addKey(java.lang.String vKey) throws java.lang.IndexOutOfBoundsException
- Parameters:
vKey
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addKey
public void addKey(int index, java.lang.String vKey) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vKey
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
enumerateKey
public java.util.Enumeration enumerateKey()
Method enumerateKey.- Returns:
- an Enumeration over all possible elements of this collection
-
getKey
public java.lang.String getKey(int index) throws java.lang.IndexOutOfBoundsException
Method getKey.- Parameters:
index
-- Returns:
- the value of the java.lang.String at the given index
- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getKey
public java.lang.String[] getKey()
Method getKey.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
-
getKeyCount
public int getKeyCount()
Method getKeyCount.- Returns:
- the size of this collection
-
isValid
public boolean isValid()
Method isValid.- Returns:
- true if this object is valid according to the schema
-
iterateKey
public java.util.Iterator iterateKey()
Method iterateKey.- 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
-
removeAllKey
public void removeAllKey()
-
removeKey
public boolean removeKey(java.lang.String vKey)
Method removeKey.- Parameters:
vKey
-- Returns:
- true if the object was removed from the collection.
-
removeKeyAt
public java.lang.String removeKeyAt(int index)
Method removeKeyAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
setKey
public void setKey(int index, java.lang.String vKey) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vKey
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setKey
public void setKey(java.lang.String[] vKeyArray)
- Parameters:
vKeyArray
-
-
unmarshal
public static PkType unmarshal(java.io.Reader reader) throws MarshalException, ValidationException
Method unmarshal.- Parameters:
reader
-- Returns:
- the unmarshaled org.exolab.castor.xml.schema.annotations.jdo.PkType
- 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
-
-