Package org.exolab.castor.mapping.xml
Class CacheTypeMapping
- java.lang.Object
-
- org.exolab.castor.mapping.xml.CacheTypeMapping
-
- All Implemented Interfaces:
java.io.Serializable
public class CacheTypeMapping extends java.lang.Object implements java.io.SerializableClass CacheTypeMapping.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CacheTypeMapping()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParam(int index, Param vParam)voidaddParam(Param vParam)voiddeleteCapacity()voiddeleteDebug()java.util.Enumeration<? extends Param>enumerateParam()Method enumerateParam.longgetCapacity()Returns the value of field 'capacity'.booleangetDebug()Returns the value of field 'debug'.Param[]getParam()Method getParam.Returns the contents of the collection in an Array.ParamgetParam(int index)Method getParam.intgetParamCount()Method getParamCount.java.lang.StringgetType()Returns the value of field 'type'.booleanhasCapacity()Method hasCapacity.booleanhasDebug()Method hasDebug.booleanisDebug()Returns the value of field 'debug'.booleanisValid()Method isValid.java.util.Iterator<? extends Param>iterateParam()Method iterateParam.voidmarshal(java.io.Writer out)voidmarshal(org.xml.sax.ContentHandler handler)voidremoveAllParam()booleanremoveParam(Param vParam)Method removeParam.ParamremoveParamAt(int index)Method removeParamAt.voidsetCapacity(long capacity)Sets the value of field 'capacity'.voidsetDebug(boolean debug)Sets the value of field 'debug'.voidsetParam(int index, Param vParam)voidsetParam(Param[] vParamArray)voidsetType(java.lang.String type)Sets the value of field 'type'.static CacheTypeMappingunmarshal(java.io.Reader reader)Method unmarshal.voidvalidate()
-
-
-
Method Detail
-
addParam
public void addParam(Param vParam) throws java.lang.IndexOutOfBoundsException
- Parameters:
vParam-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addParam
public void addParam(int index, Param vParam) throws java.lang.IndexOutOfBoundsException- Parameters:
index-vParam-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
deleteCapacity
public void deleteCapacity()
-
deleteDebug
public void deleteDebug()
-
enumerateParam
public java.util.Enumeration<? extends Param> enumerateParam()
Method enumerateParam.- Returns:
- an Enumeration over all possible elements of this collection
-
getCapacity
public long getCapacity()
Returns the value of field 'capacity'.- Returns:
- the value of field 'Capacity'.
-
getDebug
public boolean getDebug()
Returns the value of field 'debug'.- Returns:
- the value of field 'Debug'.
-
getParam
public Param getParam(int index) throws java.lang.IndexOutOfBoundsException
Method getParam.- Parameters:
index-- Returns:
- the value of the org.exolab.castor.mapping.xml.Param at the given index
- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getParam
public Param[] getParam()
Method getParam.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
-
getParamCount
public int getParamCount()
Method getParamCount.- Returns:
- the size of this collection
-
getType
public java.lang.String getType()
Returns the value of field 'type'.- Returns:
- the value of field 'Type'.
-
hasCapacity
public boolean hasCapacity()
Method hasCapacity.- Returns:
- true if at least one Capacity has been added
-
hasDebug
public boolean hasDebug()
Method hasDebug.- Returns:
- true if at least one Debug has been added
-
isDebug
public boolean isDebug()
Returns the value of field 'debug'.- Returns:
- the value of field 'Debug'.
-
isValid
public boolean isValid()
Method isValid.- Returns:
- true if this object is valid according to the schema
-
iterateParam
public java.util.Iterator<? extends Param> iterateParam()
Method iterateParam.- 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
-
removeAllParam
public void removeAllParam()
-
removeParam
public boolean removeParam(Param vParam)
Method removeParam.- Parameters:
vParam-- Returns:
- true if the object was removed from the collection.
-
removeParamAt
public Param removeParamAt(int index)
Method removeParamAt.- Parameters:
index-- Returns:
- the element removed from the collection
-
setCapacity
public void setCapacity(long capacity)
Sets the value of field 'capacity'.- Parameters:
capacity- the value of field 'capacity'.
-
setDebug
public void setDebug(boolean debug)
Sets the value of field 'debug'.- Parameters:
debug- the value of field 'debug'.
-
setParam
public void setParam(int index, Param vParam) throws java.lang.IndexOutOfBoundsException- Parameters:
index-vParam-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setParam
public void setParam(Param[] vParamArray)
- Parameters:
vParamArray-
-
setType
public void setType(java.lang.String type)
Sets the value of field 'type'.- Parameters:
type- the value of field 'type'.
-
unmarshal
public static CacheTypeMapping unmarshal(java.io.Reader reader) throws MarshalException, ValidationException
Method unmarshal.- Parameters:
reader-- Returns:
- the unmarshaled org.exolab.castor.mapping.xml.CacheTypeMapping
- 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
-
-