== Generated Methods == These are the methods that are available for a given TransferObject, depending on its configuration. === Notation === The following notation is used in this document. {| border="1" cellpadding="2" ! Notation ! Description |- | ''property'' | An item in italics denotes a XML configuration element, such as ''id'', or ''property'', or ''manytoone'' |- | ''[@name]'' | The value of that ''@'' named attribute, i.e in this instance it would be the value of the 'name' attribute. |}
For example, if I had the following in my xml: The notation of get''property[@name]'' would translate to ''getFoo'', as it is the attribute value of ''name'', in the ''property'' element which corresponds to ''property[@name]'' === Default Methods === {| border="1" cellpadding="2" ! TransferObject ! Name ! Arguments ! Returns |- | rowspan="9" | Object | getClassName | none | string: The class name of the TransferObject as defined by the config file. |- | equalsTransfer | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : the TransferObject to check equality with | boolean : Whether or not two TransferObjects have the same class, and the same primary key. |- | sameTransfer | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : the TransferObject to check equality with | boolean : Whether or not two TransferObjects are the same object. |- | clone | none | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : A deep clone of this object, that is outside of the Transfer cache. |- | getIsDirty | none | boolean : Whether or not the data on this object as changed since it was last committed to the database. |- | getIsPersisted | none | boolean : Whether or not this TransferObject has been committed to the database. |- | getIsProxy | none | boolean: whether or not this object is a [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObjectProxy.html TransferObject Proxy] object. |- | getIsLoaded | none | boolean: whether or not the underlying object is loaded. For non-Proxy objects, this will always be true. For [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObjectProxy.html TransferObject Proxies], it depends on if it has been loaded. |- | getLoadedObject | none | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : For non-Proxy objects, returns ''this''. For [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObjectProxy.html TransferObject Proxies], it loads the Proxied object, and returns it. |} === ID Element === {| border="1" cellpadding="2" ! TransferObject ! Name ! Arguments ! Returns |- | rowspan="10" | Object | set''id[@name]'' | ''id[@type]'' : The id to set it to, of the type specified by the attribute 'type' | void : This will generally only be used by Transfer, however if the ID is set before the TransferObject is create()'ed, it will be inserted with the set ID, overwriting any generation or retrieval of the ID. |- | get''id[@name]'' | none | ''id[@type]'' : The primary key id, of the type specified by the attribute 'type'.
If the transferObject has yet to inserted into the database it will return the configured null value for its type. |} === Property Element === {| border="1" cellpadding="2" ! TransferObject ! Name ! Arguments ! Returns |- | rowspan="4" | Object | set''property[@name]''
(If ''property[@set]'' == 'true') | ''property[@type]'' : The id to set it to, of the type specified by the attribute 'type' | void |- | get''property[@name]''
(If ''property[@get]'' == 'true') | none | ''property[@type]'' : The property to set, of the type specified by the attribute 'type'. |- | get''property[@name]''IsNull
(If ''property[@nullable]'' == 'true') | none | boolean : if the property set is equal to the null value specified in configuration. |- | set''property[@name]''Null
(If ''property[@nullable]'' == 'true') | none | void : Sets the value to the configured NULL value. |} === ManyToOne Element === {| border="1" cellpadding="2" ! TransferObject ! Name ! Arguments ! Returns |- | rowspan="4" | Object | set''manytoone[@name]'' | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : A TransferObject of the class defined in the ''link[@to]'' child element. | void |- | get''manytoone[@name]'' | none | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : The TransferObject that is currently set. |- | remove''manytoone[@name]'' | none | void : Removes the set ManyToOne Child. This will cause Transfer to use NULL as the value for the foreign key in the database. |- | has''manytoone[@name]'' | none | boolean : Whether it as a ManyTOOne set or not |} === OneToMany Element === {| border="1" cellpadding="2" ! TransferObject ! Name ! Arguments ! Returns |- | rowspan="8" | Object | get''onetomany[@name]''
(if ''collection[@type]'' == 'array') | numeric : index of the array to get an item at. | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : A TransferObject of type defined by ''link[@to]'' |- | get''onetomany[@name]''
(if ''collection[@type]'' == 'struct') | key : The unique key the TransferObject is stored under. | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : A TransferObject of type defined by ''link[@to]'' |- | get''onetomany[@name]''Array
(if ''collection[@type]'' == 'array') | none | array : a shallow copy of the array of child TransferObjects. |- | get''onetomany[@name]''Struct
(if ''collection[@type]'' == 'struct') | none | struct : a shallow copy of the struct of child TransferObjects. |- | get''onetomany[@name]''Iterator | none | [http://java.sun.com/j2se/1.4.2/docs/api/java/util/Iterator.html java.util.Iterator] : creates a Iterator on a shallow copy of the collection. If ''collection[@type]'' == 'array' then the items will be sorted by the specified order, if it has one. |- | sort''onetomany[@name]''
(if ''collection[@type]'' == 'array') | none | void : Performs a software sort on the collection. Usually used after multiple setParent''object[@name]''() statements. |- | contains''onetomany[@name]'' | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : A TransferObject of type defined by ''link[@to]'' | boolean : whether or not the collection contains this object. |- | find''onetomany[@name]'' | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : A TransferObject of type defined by ''link[@to]'' | (if ''collection[@type]'' == 'array')
numeric : The index of the object in the array
(if ''collection[@type]'' == 'struct')
string : the key the object is stored under. |- | rowspan="4" | Child | setParent''object[@name]'' | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : TransferObject of the type of the Object. | void : This will add the Child to the Parent. |- | getParent''object[@name]'' | none | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : The TransferObject that is the parent. |- | removeParent''object[@name]'' | none | void : Sets the object to having no parent, and removes the Child from the Parent. This will cause Transfer to use NULL as the value for the foreign key in the database. |- | hasParent''object[@name]'' | none | boolean : If this TransferObject has a parent or not |} === ManyToManyElement === {| border="1" cellpadding="2" ! TransferObject ! Name ! Arguments ! Returns |- | rowspan="11" | Object | add''manytomany[@name]'' | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : The TransferObject of type defined by ''link[@to]'' to add to the collection | void |- | get''manytomany[@name]''
(if ''collection[@type]'' == 'array') | numeric : index of the array to get an item at. | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : A TransferObject of type defined by ''link[@to]'' |- | get''manytomany[@name]''
(if ''collection[@type]'' == 'struct') | key : The unique key the TransferObject is stored under. | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : A TransferObject of type defined by ''link[@to]'' |- | remove''manytomany[@name]'' | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : A TransferObject of type defined by ''link[@to]'' to be removed from the collection. | void |- | clear''manytomany[@name]'' | none | void : Removes all children from the collection. |- | sort''manytomany[@name]''
(if ''collection[@type]'' == 'array') | none | void : Performs a software sort on the collection. Usually used after multiple add''collection@name'' statements. |- | get''manytomany[@name]''Array
(if ''collection[@type]'' == 'array') | none | array : a shallow copy of the array of child TransferObjects. |- | get''manytomany[@name]''Struct
(if ''collection[@type]'' == 'struct') | none | struct : a shallow copy of the struct of child TransferObjects. |- | get''manytomany[@name]''Iterator | none | [http://java.sun.com/j2se/1.4.2/docs/api/java/util/Iterator.html java.util.Iterator] : creates a Iterator on a shallow copy of the collection. If ''collection[@type]'' == 'array' then the items will be sorted by the specified order, if it has one. |- | contains''manytomany[[@name]]'' | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : A TransferObject of type defined by ''link[@to]'' | boolean : whether or not the collection contains this object. |- | find''manytomany[@name]'' | [http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferObject.html transfer.com.TransferObject] : A TransferObject of type defined by ''link[@to]'' | (if ''collection[@type]'' == 'array')
numeric : The index of the object in the array
(if ''collection[@type]'' == 'struct')
string : the key the object is stored under. |}