public class JPAReplicationManager extends Object
Modifier and Type | Field and Description |
---|---|
protected Properties |
properties
Properties defining the replication process.
|
Constructor and Description |
---|
JPAReplicationManager(javax.persistence.EntityManagerFactory emf1,
javax.persistence.EntityManagerFactory emf2)
Constructor for replicating between source and target EMF.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
getBooleanProperty(String key) |
Properties |
getProperties()
Accessor for the replication properties.
|
void |
replicate(Class... types)
Method to perform the replication for all objects of the specified types.
|
void |
replicate(Object... oids)
Method to perform the replication of the objects defined by the supplied identities.
|
void |
replicate(String... classNames)
Method to perform the replication for all objects of the specified class names.
|
protected void |
replicateInTarget(Object... detachedObjects)
Method to replicate the provided detached objects in the target datastore.
|
void |
setProperty(String key,
String value)
Method to set a property for replication.
|
protected Properties properties
public JPAReplicationManager(javax.persistence.EntityManagerFactory emf1, javax.persistence.EntityManagerFactory emf2)
emf1
- EMF sourceemf2
- EMF targetpublic void setProperty(String key, String value)
key
- Property keyvalue
- Property valuepublic Properties getProperties()
protected boolean getBooleanProperty(String key)
public void replicate(Class... types)
types
- Classes to replicatepublic void replicate(String... classNames)
classNames
- Classes to replicatepublic void replicate(Object... oids)
oids
- Identities of the objects to replicateprotected void replicateInTarget(Object... detachedObjects)
detachedObjects
- The detached objects (from the source datastore)Copyright © 2015. All rights reserved.