org.broadleafcommerce.openadmin.server.service.persistence.module
Class MapStructurePersistenceModule

java.lang.Object
  extended by org.broadleafcommerce.openadmin.server.service.persistence.module.BasicPersistenceModule
      extended by org.broadleafcommerce.openadmin.server.service.persistence.module.MapStructurePersistenceModule
All Implemented Interfaces:
PersistenceModule, RecordHelper, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Component(value="blMapStructurePersistenceModule")
@Scope(value="prototype")
public class MapStructurePersistenceModule
extends BasicPersistenceModule

Author:
jfischer

Field Summary
 
Fields inherited from class org.broadleafcommerce.openadmin.server.service.persistence.module.BasicPersistenceModule
applicationContext, dateFormat, decimalFormat, persistenceManager
 
Constructor Summary
MapStructurePersistenceModule()
           
 
Method Summary
 Entity add(PersistencePackage persistencePackage)
           
protected  Object convertPrimitiveBasedOnType(String valuePropertyName, String value, Map<String,FieldMetadata> valueMergedProperties)
           
 void extractProperties(Class<?>[] inheritanceLine, Map<MergedPropertyType,Map<String,FieldMetadata>> mergedProperties, List<Property> properties)
           
 DynamicResultSet fetch(PersistencePackage persistencePackage, com.anasoft.os.daofusion.cto.client.CriteriaTransferObject cto)
           
protected  Entity[] getMapRecords(Serializable record, MapStructure mapStructure, Map<String,FieldMetadata> valueMergedProperties, Property symbolicIdProperty)
           
 boolean isCompatible(OperationType operationType)
           
 void remove(PersistencePackage persistencePackage)
           
 Entity update(PersistencePackage persistencePackage)
           
 void updateMergedProperties(PersistencePackage persistencePackage, Map<MergedPropertyType,Map<String,FieldMetadata>> allMergedProperties)
           
 
Methods inherited from class org.broadleafcommerce.openadmin.server.service.persistence.module.BasicPersistenceModule
buildProperty, createPopulatedInstance, extractPropertiesFromMetadata, extractPropertiesFromPersistentEntity, filterOutCollectionMetadata, getCompatibleModule, getCtoConverter, getFieldManager, getPrimaryKey, getRecord, getRecord, getRecords, getRecords, getRecords, getSimpleMergedProperties, getTotalRecords, parseDate, setApplicationContext, setPersistenceManager, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapStructurePersistenceModule

public MapStructurePersistenceModule()
Method Detail

isCompatible

public boolean isCompatible(OperationType operationType)
Specified by:
isCompatible in interface PersistenceModule
Overrides:
isCompatible in class BasicPersistenceModule

extractProperties

public void extractProperties(Class<?>[] inheritanceLine,
                              Map<MergedPropertyType,Map<String,FieldMetadata>> mergedProperties,
                              List<Property> properties)
                       throws NumberFormatException
Specified by:
extractProperties in interface PersistenceModule
Overrides:
extractProperties in class BasicPersistenceModule
Throws:
NumberFormatException

getMapRecords

protected Entity[] getMapRecords(Serializable record,
                                 MapStructure mapStructure,
                                 Map<String,FieldMetadata> valueMergedProperties,
                                 Property symbolicIdProperty)
                          throws IllegalAccessException,
                                 InvocationTargetException,
                                 NoSuchMethodException,
                                 SecurityException,
                                 IllegalArgumentException,
                                 ClassNotFoundException
Throws:
IllegalAccessException
InvocationTargetException
NoSuchMethodException
SecurityException
IllegalArgumentException
ClassNotFoundException

updateMergedProperties

public void updateMergedProperties(PersistencePackage persistencePackage,
                                   Map<MergedPropertyType,Map<String,FieldMetadata>> allMergedProperties)
                            throws ServiceException
Specified by:
updateMergedProperties in interface PersistenceModule
Overrides:
updateMergedProperties in class BasicPersistenceModule
Throws:
ServiceException

add

public Entity add(PersistencePackage persistencePackage)
           throws ServiceException
Specified by:
add in interface PersistenceModule
Overrides:
add in class BasicPersistenceModule
Throws:
ServiceException

convertPrimitiveBasedOnType

protected Object convertPrimitiveBasedOnType(String valuePropertyName,
                                             String value,
                                             Map<String,FieldMetadata> valueMergedProperties)
                                      throws ParseException
Throws:
ParseException

update

public Entity update(PersistencePackage persistencePackage)
              throws ServiceException
Specified by:
update in interface PersistenceModule
Overrides:
update in class BasicPersistenceModule
Throws:
ServiceException

remove

public void remove(PersistencePackage persistencePackage)
            throws ServiceException
Specified by:
remove in interface PersistenceModule
Overrides:
remove in class BasicPersistenceModule
Throws:
ServiceException

fetch

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


Copyright © 2013. All Rights Reserved.