final class LocalSyncher extends AssociationSyncher
AssociationSyncher
,
ForeignResolver
,
RelationInfo
,
RecordBuffer
AssociationSyncher.Helper, AssociationSyncher.OneToManyHelper, AssociationSyncher.OneToOneHelper
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Method |
foreignGetter
Method used to retrieve foreign DMO from a local DMO
|
private ForeignResolver |
resolver
Object which resolves legacy keys to a foreign DMO instance
|
buffer, foreignSetter, helper, lockTable
Constructor and Description |
---|
LocalSyncher(RecordBuffer buffer,
RelationInfo info)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Set |
getLegacyKeys()
Retrieve the set of property names which represent the columns which
comprise the legacy key joining two records.
|
protected void |
preSynch(java.util.Set newLocalDMOs,
Persistable newForeignDMO)
The local end of an association has changed.
|
protected Persistable |
retrieveForeignDMO()
Retrieve the DMO, if any, at the foreign end of the association.
|
protected java.util.Set |
retrieveLocalDMOs()
Retrieve the set of DMOs which comprise the local end of the foreign
association.
|
acquireLock, attemptSynch
private final ForeignResolver resolver
private final java.lang.reflect.Method foreignGetter
LocalSyncher(RecordBuffer buffer, RelationInfo info)
buffer
- Record buffer containing the DMO whose property change(s)
will trigger synchronization attempts.info
- Foreign relation descriptor object.protected java.util.Set getLegacyKeys()
getLegacyKeys
in class AssociationSyncher
protected void preSynch(java.util.Set newLocalDMOs, Persistable newForeignDMO) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
preSynch
in class AssociationSyncher
newLocalDMOs
- Set of zero or more local DMOs which are about to be updated
with the new association.newForeignDMO
- Foreign DMO which is about to be updated with the new
association.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.protected java.util.Set retrieveLocalDMOs() throws PersistenceException
retrieveLocalDMOs
in class AssociationSyncher
null
.PersistenceException
- if there are any errors retrieving DMOs from the database.protected Persistable retrieveForeignDMO() throws PersistenceException
retrieveForeignDMO
in class AssociationSyncher
null
if none was
available.PersistenceException
- if there are any errors retrieving the DMO from the database.