Package org.apache.torque.om
Interface ColumnAccessByName
-
public interface ColumnAccessByNameDefine accessors by name.- Version:
- $Id: ColumnAccessByName.java 1448414 2013-02-20 21:06:35Z tfischer $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectgetByName(String field)Retrieves a field from the object by name.ObjectgetByPeerName(String name)Retrieves a field from the object by name passed in as a String.ObjectgetByPosition(int pos)Retrieves a field from the object by position as specified in a database schema for example.booleansetByName(String name, Object value)Set a field in the object by field (Java) name.booleansetByPeerName(String name, Object value)Set field values by Peer Field Name-booleansetByPosition(int position, Object value)Set field values by it's position (zero based) in the XML schema.
-
-
-
Method Detail
-
getByName
Object getByName(String field)
Retrieves a field from the object by name.- Parameters:
field- The name of the field to retrieve.- Returns:
- The retrieved field value
-
setByName
boolean setByName(String name, Object value) throws TorqueException
Set a field in the object by field (Java) name.- Parameters:
name- field name.value- field value.- Returns:
- True if value was set, false if not (invalid name / protected field).
- Throws:
IllegalArgumentException- if object type of value does not match field object type.TorqueException- If a problem occurs with the set[Field] method.
-
getByPeerName
Object getByPeerName(String name)
Retrieves a field from the object by name passed in as a String.- Parameters:
name- field name.- Returns:
- value of the field.
-
setByPeerName
boolean setByPeerName(String name, Object value) throws TorqueException
Set field values by Peer Field Name-- Parameters:
name- field name.value- field value.- Returns:
- True if value was set, false if not (invalid name / protected field).
- Throws:
IllegalArgumentException- if object type of value does not match field object type.TorqueException- If a problem occurs with the set[Field] method.
-
getByPosition
Object getByPosition(int pos)
Retrieves a field from the object by position as specified in a database schema for example.- Parameters:
pos- field position.- Returns:
- the value of the field.
-
setByPosition
boolean setByPosition(int position, Object value) throws TorqueExceptionSet field values by it's position (zero based) in the XML schema.- Parameters:
position- The field position.value- field value.- Returns:
- True if value was set, false if not (invalid position / protected field).
- Throws:
IllegalArgumentException- if object type of value does not match field object type.TorqueException- If a problem occurs with the set[Field] method.
-
-