|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.migration.GenericMapper
public abstract class GenericMapper
| Field Summary | |
|---|---|
protected static String |
DATABASE_DATE_FORMAT
|
protected org.slf4j.Logger |
logger
|
protected static String |
PLUGIN_KEY_PREFIX
|
protected static String |
XML_DATE_FORMAT
|
| Constructor Summary | |
|---|---|
GenericMapper(org.hibernate.SessionFactory sessionFactory,
BatchProcessor batchProcessor)
|
|
| Method Summary | ||
|---|---|---|
protected
|
addEntities(List<T> entitiesToPersist)
Replicates a collection of Hiberanate persistable entities using the batch processor. |
|
protected void |
addEntity(Object entityToPersist)
Replicates a Hiberanate persistable entity. |
|
protected Object |
addEntityViaMerge(Object entityToPersist)
Replicates a Hiberanate persistable entity. |
|
protected Object |
addEntityViaSave(Object entityToPersist)
Replicates a Hiberanate persistable entity. |
|
protected String |
getAttributeValue(String name,
Map<String,Set<String>> attributes,
String defaultValue)
|
|
String |
getDateAsFormattedString(Date date)
Serialises a date/time to String in a standard format. |
|
Date |
getDateFromDatabase(String dateString)
|
|
Date |
getDateFromXml(String dateString)
Obtains a date object from a serialised string. |
|
protected DirectoryType |
getDirectoryTypeFromLegacyCode(int code)
|
|
protected String |
getNameFromLegacyCode(String codeName)
|
|
protected OperationType |
getOperationTypeFromLegacyPermissionName(String name)
|
|
org.hibernate.SessionFactory |
getSessionFactory()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger logger
protected static final String XML_DATE_FORMAT
protected static final String DATABASE_DATE_FORMAT
protected static final String PLUGIN_KEY_PREFIX
| Constructor Detail |
|---|
public GenericMapper(org.hibernate.SessionFactory sessionFactory,
BatchProcessor batchProcessor)
| Method Detail |
|---|
public String getDateAsFormattedString(Date date)
date - date to serialise.
public Date getDateFromXml(String dateString)
dateString - serialised string.
public Date getDateFromDatabase(String dateString)
protected void addEntity(Object entityToPersist)
throws ImportException
entityToPersist - entity to replicate.
SQLException - error persisting when calling connection().commit()
ImportException
protected <T extends Serializable> void addEntities(List<T> entitiesToPersist)
throws org.hibernate.HibernateException
entitiesToPersist - entity to replicate.
org.hibernate.HibernateException
protected Object addEntityViaMerge(Object entityToPersist)
throws ImportException
entityToPersist - entity to replicate.
ImportException - error persisting.
protected Object addEntityViaSave(Object entityToPersist)
throws ImportException
entityToPersist - entity to replicate.
ImportException - error persisting.public org.hibernate.SessionFactory getSessionFactory()
protected OperationType getOperationTypeFromLegacyPermissionName(String name)
protected String getAttributeValue(String name,
Map<String,Set<String>> attributes,
String defaultValue)
protected DirectoryType getDirectoryTypeFromLegacyCode(int code)
protected String getNameFromLegacyCode(String codeName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||