|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.metadata.DescriptorBase
org.apache.ojb.broker.metadata.ArgumentDescriptor
An ArgumentDescriptor contains information that defines a single argument
that is passed to a procedure/function.
Note: Be careful when use ArgumentDescriptor variables or caching
ArgumentDescriptor instances, because instances could become invalid
during runtime (see MetadataManager
).
Field Summary |
Constructor Summary | |
ArgumentDescriptor(ProcedureDescriptor procedureDescriptor)
Constructor declaration. |
Method Summary | |
void |
addAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Store the specified attribute and it's value. |
java.lang.String |
getAttribute(java.lang.String attributeName)
Get the value of an attribute |
java.lang.String |
getAttribute(java.lang.String attributeName,
java.lang.String defaultValue)
Get the value of an attribute |
java.lang.String[] |
getAttributeNames()
Returns an array of the names of all atributes of this descriptor. |
java.util.Map |
getAttributes()
Returns the attribute map (name, value) of this descriptor. |
FieldDescriptor |
getFieldRef()
Retrieve the field descriptor that this argument is related to. |
boolean |
getIsReturnedByProcedure()
|
int |
getJdbcType()
Retrieve the jdbc type for the field descriptor that is related to this argument. |
ProcedureDescriptor |
getProcedureDescriptor()
Retrieve the procedure descriptor that this object is related to. |
java.lang.Object |
getValue(java.lang.Object objekt)
|
void |
saveValue(java.lang.Object objekt,
java.lang.Object value)
|
void |
setValue()
Sets up this object to represent a null value. |
void |
setValue(java.lang.String constantValue)
Sets up this object to represent an argument that will be set to a constant value. |
void |
setValue(java.lang.String fieldRefName,
boolean returnedByProcedure)
Sets up this object to represent a value that is derived from a field in the corresponding class-descriptor. |
java.lang.String |
toString()
Provide a string representation of this object |
java.lang.String |
toXML()
returns the XML marshalled version of this instance. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ArgumentDescriptor(ProcedureDescriptor procedureDescriptor)
#fieldSource
will be null. To
change this, call either version of the setValue method.
setValue()
,
setValue(String)
,
setValue(String,boolean)
Method Detail |
public void setValue()
public void setValue(java.lang.String fieldRefName, boolean returnedByProcedure)
If the value of fieldRefName
is blank or refers to an
invalid field reference, then the value of the corresponding argument
will be set to null. In this case, getIsReturnedByProcedure()
will be set to false
, regardless of the value of the
returnedByProcedure
argument.
fieldRefName
- the name of the field reference that provides the
value of this argument.returnedByProcedure
- indicates that the value of the argument
is returned by the procedure that is invoked.public void setValue(java.lang.String constantValue)
constantValue
- the constant value.public boolean getIsReturnedByProcedure()
public java.lang.Object getValue(java.lang.Object objekt)
public void saveValue(java.lang.Object objekt, java.lang.Object value)
public final FieldDescriptor getFieldRef()
This reference can only be set via the setValue(String,boolean)
method.
public final int getJdbcType()
public final ProcedureDescriptor getProcedureDescriptor()
public java.lang.String toXML()
XmlCapable
toXML
in interface XmlCapable
public java.lang.String toString()
public void addAttribute(java.lang.String attributeName, java.lang.String attributeValue)
AttributeContainer
addAttribute
in interface AttributeContainer
attributeName
- the name of the attribute to retrieveattributeValue
- the attribute's valueAttributeContainer.addAttribute(String, String)
public java.lang.String getAttribute(java.lang.String attributeName, java.lang.String defaultValue)
AttributeContainer
getAttribute
in interface AttributeContainer
attributeName
- the attribute to retrievedefaultValue
- the value to return if the attribute is not present
AttributeContainer.getAttribute(String, String)
public java.lang.String getAttribute(java.lang.String attributeName)
AttributeContainer
getAttribute
in interface AttributeContainer
attributeName
- the attribute to retrieve
AttributeContainer.getAttribute(String)
public java.util.Map getAttributes()
public java.lang.String[] getAttributeNames()
null
)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |