org.broadleafcommerce.openadmin.server.service.persistence
Class PersistenceManagerImpl

java.lang.Object
  extended by org.broadleafcommerce.openadmin.server.service.persistence.PersistenceManagerImpl
All Implemented Interfaces:
InspectHelper, PersistenceManager, org.springframework.context.ApplicationContextAware

public class PersistenceManagerImpl
extends Object
implements InspectHelper, PersistenceManager, org.springframework.context.ApplicationContextAware


Field Summary
protected  AdminSecurityServiceRemote adminRemoteSecurityService
           
protected  List<CustomPersistenceHandler> customPersistenceHandlers
           
protected  DynamicEntityDao dynamicEntityDao
           
protected  PersistenceModule[] modules
           
protected  SandBoxService sandBoxService
           
protected  Map<TargetModeType,String> targetEntityManagers
           
protected  TargetModeType targetMode
           
 
Constructor Summary
PersistenceManagerImpl(PersistenceModule[] modules)
           
 
Method Summary
 Entity add(PersistencePackage persistencePackage)
           
 void close()
           
 DynamicResultSet fetch(PersistencePackage persistencePackage, com.anasoft.os.daofusion.cto.client.CriteriaTransferObject cto)
           
 AdminSecurityServiceRemote getAdminRemoteSecurityService()
           
 Class<?>[] getAllPolymorphicEntitiesFromCeiling(Class<?> ceilingClass)
           
protected  PersistenceModule getCompatibleModule(OperationType operationType)
           
 List<CustomPersistenceHandler> getCustomPersistenceHandlers()
           
 DynamicEntityDao getDynamicEntityDao()
           
 ClassMetadata getMergedClassMetadata(Class<?>[] entities, Map<MergedPropertyType,Map<String,FieldMetadata>> mergedProperties)
           
 Class<?>[] getPolymorphicEntities(String ceilingEntityFullyQualifiedClassname)
           
 SandBoxService getSandBoxService()
           
 Map<String,FieldMetadata> getSimpleMergedProperties(String entityName, PersistencePerspective persistencePerspective)
           
 Map<TargetModeType,String> getTargetEntityManagers()
           
 TargetModeType getTargetMode()
           
 DynamicResultSet inspect(PersistencePackage persistencePackage)
           
 void remove(PersistencePackage persistencePackage)
           
 void setAdminRemoteSecurityService(AdminSecurityServiceRemote adminRemoteSecurityService)
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setCustomPersistenceHandlers(List<CustomPersistenceHandler> customPersistenceHandlers)
           
 void setDynamicEntityDao(DynamicEntityDao dynamicEntityDao)
           
 void setSandBoxService(SandBoxService sandBoxService)
           
 void setTargetEntityManagers(Map<TargetModeType,String> targetEntityManagers)
           
 void setTargetMode(TargetModeType targetMode)
           
 Entity update(PersistencePackage persistencePackage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sandBoxService

protected SandBoxService sandBoxService

dynamicEntityDao

protected DynamicEntityDao dynamicEntityDao

customPersistenceHandlers

protected List<CustomPersistenceHandler> customPersistenceHandlers

modules

protected PersistenceModule[] modules

targetEntityManagers

protected Map<TargetModeType,String> targetEntityManagers

targetMode

protected TargetModeType targetMode

adminRemoteSecurityService

protected AdminSecurityServiceRemote adminRemoteSecurityService
Constructor Detail

PersistenceManagerImpl

public PersistenceManagerImpl(PersistenceModule[] modules)
Method Detail

close

public void close()
           throws Exception
Specified by:
close in interface PersistenceManager
Throws:
Exception

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

getAllPolymorphicEntitiesFromCeiling

public Class<?>[] getAllPolymorphicEntitiesFromCeiling(Class<?> ceilingClass)
Specified by:
getAllPolymorphicEntitiesFromCeiling in interface PersistenceManager

getPolymorphicEntities

public Class<?>[] getPolymorphicEntities(String ceilingEntityFullyQualifiedClassname)
                                  throws ClassNotFoundException
Specified by:
getPolymorphicEntities in interface PersistenceManager
Throws:
ClassNotFoundException

getSimpleMergedProperties

public Map<String,FieldMetadata> getSimpleMergedProperties(String entityName,
                                                           PersistencePerspective persistencePerspective)
                                                    throws ClassNotFoundException,
                                                           SecurityException,
                                                           IllegalArgumentException,
                                                           NoSuchMethodException,
                                                           IllegalAccessException,
                                                           InvocationTargetException,
                                                           NoSuchFieldException
Specified by:
getSimpleMergedProperties in interface InspectHelper
Specified by:
getSimpleMergedProperties in interface PersistenceManager
Throws:
ClassNotFoundException
SecurityException
IllegalArgumentException
NoSuchMethodException
IllegalAccessException
InvocationTargetException
NoSuchFieldException

getMergedClassMetadata

public ClassMetadata getMergedClassMetadata(Class<?>[] entities,
                                            Map<MergedPropertyType,Map<String,FieldMetadata>> mergedProperties)
                                     throws ClassNotFoundException,
                                            IllegalArgumentException
Specified by:
getMergedClassMetadata in interface InspectHelper
Specified by:
getMergedClassMetadata in interface PersistenceManager
Throws:
ClassNotFoundException
IllegalArgumentException

inspect

public DynamicResultSet inspect(PersistencePackage persistencePackage)
                         throws ServiceException,
                                ClassNotFoundException
Specified by:
inspect in interface PersistenceManager
Throws:
ServiceException
ClassNotFoundException

fetch

public DynamicResultSet fetch(PersistencePackage persistencePackage,
                              com.anasoft.os.daofusion.cto.client.CriteriaTransferObject cto)
                       throws ServiceException
Specified by:
fetch in interface PersistenceManager
Throws:
ServiceException

add

public Entity add(PersistencePackage persistencePackage)
           throws ServiceException
Specified by:
add in interface PersistenceManager
Throws:
ServiceException

update

public Entity update(PersistencePackage persistencePackage)
              throws ServiceException
Specified by:
update in interface PersistenceManager
Throws:
ServiceException

remove

public void remove(PersistencePackage persistencePackage)
            throws ServiceException
Specified by:
remove in interface PersistenceManager
Throws:
ServiceException

getCompatibleModule

protected PersistenceModule getCompatibleModule(OperationType operationType)

getSandBoxService

public SandBoxService getSandBoxService()
Specified by:
getSandBoxService in interface PersistenceManager

setSandBoxService

public void setSandBoxService(SandBoxService sandBoxService)
Specified by:
setSandBoxService in interface PersistenceManager

getDynamicEntityDao

public DynamicEntityDao getDynamicEntityDao()
Specified by:
getDynamicEntityDao in interface PersistenceManager

setDynamicEntityDao

public void setDynamicEntityDao(DynamicEntityDao dynamicEntityDao)
Specified by:
setDynamicEntityDao in interface PersistenceManager

getTargetEntityManagers

public Map<TargetModeType,String> getTargetEntityManagers()
Specified by:
getTargetEntityManagers in interface PersistenceManager

setTargetEntityManagers

public void setTargetEntityManagers(Map<TargetModeType,String> targetEntityManagers)
Specified by:
setTargetEntityManagers in interface PersistenceManager

getTargetMode

public TargetModeType getTargetMode()
Specified by:
getTargetMode in interface PersistenceManager

setTargetMode

public void setTargetMode(TargetModeType targetMode)
Specified by:
setTargetMode in interface PersistenceManager

getCustomPersistenceHandlers

public List<CustomPersistenceHandler> getCustomPersistenceHandlers()
Specified by:
getCustomPersistenceHandlers in interface PersistenceManager

setCustomPersistenceHandlers

public void setCustomPersistenceHandlers(List<CustomPersistenceHandler> customPersistenceHandlers)
Specified by:
setCustomPersistenceHandlers in interface PersistenceManager

getAdminRemoteSecurityService

public AdminSecurityServiceRemote getAdminRemoteSecurityService()

setAdminRemoteSecurityService

public void setAdminRemoteSecurityService(AdminSecurityServiceRemote adminRemoteSecurityService)


Copyright © 2012. All Rights Reserved.