protected final class AssociationSyncher.OneToManyHelper extends java.lang.Object implements AssociationSyncher.Helper
Helper interface which assumes
a one-to-many association from a foreign DMO to zero or more local
DMOs. This has implications for the methods used to retrieve and
update the foreign record's reference to the local end of the
association.| Modifier and Type | Field and Description |
|---|---|
private java.lang.reflect.Method |
getter
Method used to retrieve set of local DMOs from foreign DMO
|
private RelationInfo |
info
Object containing information about the nature of the association
|
private java.lang.reflect.Method |
setter
Method used to set local DMO set into foreign DMO
|
| Constructor and Description |
|---|
OneToManyHelper(RelationInfo info)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<Record> |
getLocalDMOs(Record foreignDMO)
Retrieve the set of local DMOs stored in a foreign DMO for this
association.
|
void |
remove(Record foreignDMO,
Record localDMO)
Remove the given local DMO from the set of local DMOs stored in a
foreign DMO for this association.
|
void |
replace(Record foreignDMO,
java.util.Set<Record> localDMOs)
Replace the set of local DMOs stored in a foreign DMO for this
association.
|
private final RelationInfo info
private final java.lang.reflect.Method getter
private java.lang.reflect.Method setter
OneToManyHelper(RelationInfo info)
info - Object which contains information regarding the nature of
the one-to-many, foreign association.public java.util.Set<Record> getLocalDMOs(Record foreignDMO) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
getLocalDMOs in interface AssociationSyncher.HelperforeignDMO - Foreign DMO from which to extract the set of local DMOs.null.java.lang.IllegalAccessException - if an access error occurs while invoking a method using
reflection.java.lang.reflect.InvocationTargetException - if a method invoked using reflection throws an exception.public void replace(Record foreignDMO, java.util.Set<Record> localDMOs) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
replace in interface AssociationSyncher.HelperforeignDMO - Foreign DMO which stores a reference to local DMOs.localDMOs - The set of local DMOs which must replace the existing set.java.lang.IllegalAccessException - if an access error occurs while invoking a method using
reflection.java.lang.reflect.InvocationTargetException - if a method invoked using reflection throws an exception.public void remove(Record foreignDMO, Record localDMO) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
remove in interface AssociationSyncher.HelperforeignDMO - Foreign DMO which stores a reference to local DMOs.localDMO - The local DMO to be removed from the existing set.java.lang.IllegalAccessException - if an access error occurs while invoking a method using
reflection.java.lang.reflect.InvocationTargetException - if a method invoked using reflection throws an exception.