Package org.exolab.castor.mapping.xml
Class Sql
java.lang.Object
org.exolab.castor.mapping.xml.Sql
- All Implemented Interfaces:
Serializable
The 'sql' element is used to store information about the
database
column to which a Java object is mapped to.
- Version:
- $Revision$ $Date$
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addManyKey
(int index, String vManyKey) void
addManyKey
(String vManyKey) void
void
void
void
Enumeration<? extends String>
Method enumerateManyKey.Enumeration<? extends String>
Method enumerateName.Returns the value of field 'cascading'.getDirty()
Returns the value of field 'dirty'.String[]
Method getManyKey.Returns the contents of the collection in an Array.getManyKey
(int index) Method getManyKey.int
Method getManyKeyCount.Returns the value of field 'manyTable'.String[]
getName()
Method getName.Returns the contents of the collection in an Array.getName
(int index) Method getName.int
Method getNameCount.boolean
Returns the value of field 'readOnly'.boolean
Returns the value of field 'transient'.getType()
Returns the value of field 'type'.boolean
Method hasReadOnly.boolean
Method hasTransient.boolean
Returns the value of field 'readOnly'.boolean
Returns the value of field 'transient'.boolean
isValid()
Method isValid.Method iterateManyKey.Method iterateName.void
void
marshal
(ContentHandler handler) void
void
boolean
removeManyKey
(String vManyKey) Method removeManyKey.removeManyKeyAt
(int index) Method removeManyKeyAt.boolean
removeName
(String vName) Method removeName.removeNameAt
(int index) Method removeNameAt.void
setCascading
(String cascading) Sets the value of field 'cascading'.void
setDirty
(SqlDirtyType dirty) Sets the value of field 'dirty'.void
setManyKey
(int index, String vManyKey) void
setManyKey
(String[] vManyKeyArray) void
setManyTable
(String manyTable) Sets the value of field 'manyTable'.void
void
void
setReadOnly
(boolean readOnly) Sets the value of field 'readOnly'.void
setTransient
(boolean _transient) Sets the value of field 'transient'.void
Sets the value of field 'type'.static Sql
Method unmarshal.void
validate()
-
Constructor Details
-
Sql
public Sql()
-
-
Method Details
-
addManyKey
- Parameters:
vManyKey
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addManyKey
- Parameters:
index
-vManyKey
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addName
- Parameters:
vName
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addName
- Parameters:
index
-vName
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
deleteReadOnly
public void deleteReadOnly() -
deleteTransient
public void deleteTransient() -
enumerateManyKey
Method enumerateManyKey.- Returns:
- an Enumeration over all possible elements of this collection
-
enumerateName
Method enumerateName.- Returns:
- an Enumeration over all possible elements of this collection
-
getCascading
Returns the value of field 'cascading'. The field 'cascading' has the following description: An optional attribute to specify cascading support; possible values are 'none', 'all', 'create', 'delete' and 'update'; it is possible to use more than one of those values (when not using 'all' or 'none'), using whitespace as a delimiter (as in 'create delete').- Returns:
- the value of field 'Cascading'.
-
getDirty
Returns the value of field 'dirty'.- Returns:
- the value of field 'Dirty'.
-
getManyKey
Method getManyKey.- Parameters:
index
-- Returns:
- the value of the java.lang.String at the given index
- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getManyKey
Method getManyKey.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
-
getManyKeyCount
public int getManyKeyCount()Method getManyKeyCount.- Returns:
- the size of this collection
-
getManyTable
Returns the value of field 'manyTable'. The field 'manyTable' has the following description: An optional attribute to specify the name of the bridge table containing the primary keys of the object on each side of the many to many relationship.- Returns:
- the value of field 'ManyTable'.
-
getName
Method getName.- Parameters:
index
-- Returns:
- the value of the java.lang.String at the given index
- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getName
Method getName.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
-
getNameCount
public int getNameCount()Method getNameCount.- Returns:
- the size of this collection
-
getReadOnly
public boolean getReadOnly()Returns the value of field 'readOnly'.- Returns:
- the value of field 'ReadOnly'.
-
getTransient
public boolean getTransient()Returns the value of field 'transient'.- Returns:
- the value of field 'Transient'.
-
getType
Returns the value of field 'type'. The field 'type' has the following description: An optional attibute used to specify the DB-specific type of the column.- Returns:
- the value of field 'Type'.
-
hasReadOnly
public boolean hasReadOnly()Method hasReadOnly.- Returns:
- true if at least one ReadOnly has been added
-
hasTransient
public boolean hasTransient()Method hasTransient.- Returns:
- true if at least one Transient has been added
-
isReadOnly
public boolean isReadOnly()Returns the value of field 'readOnly'.- Returns:
- the value of field 'ReadOnly'.
-
isTransient
public boolean isTransient()Returns the value of field 'transient'.- Returns:
- the value of field 'Transient'.
-
isValid
public boolean isValid()Method isValid.- Returns:
- true if this object is valid according to the schema
-
iterateManyKey
Method iterateManyKey.- Returns:
- an Iterator over all possible elements in this collection
-
iterateName
Method iterateName.- Returns:
- an Iterator over all possible elements in this collection
-
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
-
removeAllManyKey
public void removeAllManyKey() -
removeAllName
public void removeAllName() -
removeManyKey
Method removeManyKey.- Parameters:
vManyKey
-- Returns:
- true if the object was removed from the collection.
-
removeManyKeyAt
Method removeManyKeyAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
removeName
Method removeName.- Parameters:
vName
-- Returns:
- true if the object was removed from the collection.
-
removeNameAt
Method removeNameAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
setCascading
Sets the value of field 'cascading'. The field 'cascading' has the following description: An optional attribute to specify cascading support; possible values are 'none', 'all', 'create', 'delete' and 'update'; it is possible to use more than one of those values (when not using 'all' or 'none'), using whitespace as a delimiter (as in 'create delete').- Parameters:
cascading
- the value of field 'cascading'.
-
setDirty
Sets the value of field 'dirty'.- Parameters:
dirty
- the value of field 'dirty'.
-
setManyKey
- Parameters:
index
-vManyKey
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setManyKey
- Parameters:
vManyKeyArray
-
-
setManyTable
Sets the value of field 'manyTable'. The field 'manyTable' has the following description: An optional attribute to specify the name of the bridge table containing the primary keys of the object on each side of the many to many relationship.- Parameters:
manyTable
- the value of field 'manyTable'.
-
setName
- Parameters:
index
-vName
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setName
- Parameters:
vNameArray
-
-
setReadOnly
public void setReadOnly(boolean readOnly) Sets the value of field 'readOnly'.- Parameters:
readOnly
- the value of field 'readOnly'.
-
setTransient
public void setTransient(boolean _transient) Sets the value of field 'transient'.- Parameters:
_transient
-transient
- the value of field 'transient'.
-
setType
Sets the value of field 'type'. The field 'type' has the following description: An optional attibute used to specify the DB-specific type of the column.- Parameters:
type
- the value of field 'type'.
-
unmarshal
Method unmarshal.- Parameters:
reader
-- Returns:
- the unmarshaled org.exolab.castor.mapping.xml.Sql
- 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
-