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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
getByName(String field)
Retrieves a field from the object by name.Object
getByPeerName(String name)
Retrieves a field from the object by name passed in as a String.Object
getByPosition(int pos)
Retrieves a field from the object by position as specified in a database schema for example.boolean
setByName(String name, Object value)
Set a field in the object by field (Java) name.boolean
setByPeerName(String name, Object value)
Set field values by Peer Field Name-boolean
setByPosition(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 TorqueException
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.
-
-