Class PersistenceUtil


  • @Component
    public class PersistenceUtil
    extends Object
    Author:
    Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
    • Constructor Detail

      • PersistenceUtil

        public PersistenceUtil()
    • Method Detail

      • createSyncDataSourceConfigFromNode

        public static SyncDataSourceConfiguration createSyncDataSourceConfigFromNode​(org.neo4j.graphdb.Node syncDataSourceConfigNode)
                                                                              throws UnsupportedPropertyException,
                                                                                     InvalidArgumentException
        Converts a node to a SyncDataSourceConfiguration object
        Parameters:
        syncDataSourceConfigNode - The source node
        Returns:
        A SyncDataSourceConfiguration object built from the source node information
        Throws:
        InvalidArgumentException - if some element of the list of syncDataSourceConfiguration has more paramNames than paramValues
        UnsupportedPropertyException - if any property of the sync data source node is malformed or if there is an error with the relationship between the syncNode and it InventoryObjectNode
      • createGenericObjectListFromNode

        public static GenericObjectList createGenericObjectListFromNode​(org.neo4j.graphdb.Node node)
                                                                 throws InvalidArgumentException
        Creates a generic object list (a list type) from a node
        Parameters:
        node - the list type node
        Returns:
        a list type The specified list type node is malformed and lacks uuid property.
        Throws:
        InvalidArgumentException - if some element of the list of syncDataSourceConfiguration has more paramNames than paramValues
      • createSyncDSCommonPropertiesFromNode

        public static SyncDataSourceCommonParameters createSyncDSCommonPropertiesFromNode​(org.neo4j.graphdb.Node syncDSCommonPropertiesNode)
                                                                                   throws UnsupportedPropertyException,
                                                                                          InvalidArgumentException
        Converts a node to a SyncDataSourceConfiguration object
        Parameters:
        syncDSCommonPropertiesNode - The source node
        Returns:
        A SyncDataSourceCommonParameters object built from the source node information
        Throws:
        InvalidArgumentException - if the size of the list of paramNames and paramValues are not the same
        UnsupportedPropertyException - if any property of the sync data source node is malformed or if there is an error with the relationship between the syncNode and it InventoryObjectNode
      • setObjectGraphMappingService

        @Autowired
        public void setObjectGraphMappingService​(ObjectGraphMappingService ogmService)
        Reference to the service that maps nodes to inventory/application objects