Package org.apache.torque.om
Interface ColumnAccessByName
public interface ColumnAccessByName
Define accessors by name.
- Version:
- $Id: ColumnAccessByName.java 1448414 2013-02-20 21:06:35Z tfischer $
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves a field from the object by name.getByPeerName(String name) Retrieves a field from the object by name passed in as a String.getByPosition(int pos) Retrieves a field from the object by position as specified in a database schema for example.booleanSet 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 Details
-
getByName
Retrieves a field from the object by name.- Parameters:
field- The name of the field to retrieve.- Returns:
- The retrieved field value
-
setByName
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
Retrieves a field from the object by name passed in as a String.- Parameters:
name- field name.- Returns:
- value of the field.
-
setByPeerName
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
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
Set 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.
-