Class ManipulationDataAction<S extends StorageSession,​A>

    • Method Summary

      Modifier and Type Method Description
      protected abstract A adaptObject​(java.lang.Object instance)
      Returns a object created from the original instance that contains all the elements to execute the insert into the underlying technology.
      <R> ResultSet<R> execute()
      The insert implementation has two steps to insert the instance
      protected abstract <R> R execute​(A adaptedInstance)
      Execute the operation on the underlying technology using the adapted instance.
      protected abstract java.util.Collection<java.lang.Object> getInstances()
      Returns the collection with all the instance to process.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ManipulationDataAction

        public ManipulationDataAction​(S session,
                                      java.lang.Class modelClass)
      • ManipulationDataAction

        public ManipulationDataAction​(S session)
    • Method Detail

      • getInstances

        protected abstract java.util.Collection<java.lang.Object> getInstances()
        Returns the collection with all the instance to process.
        Returns:
        Collection with all the instance to process.
      • execute

        public <R> ResultSet<R> execute()
        The insert implementation has two steps to insert the instance. - First, adapt the instance to obtain the format to insert the instance into the underlying technology. - Second, execute the insert into the underlying technology.
        Specified by:
        execute in class StorageAction<S extends StorageSession>
        Type Parameters:
        R - Expected return data type.
        Returns:
        Returns a result set instance with the instance inserted.
      • adaptObject

        protected abstract A adaptObject​(java.lang.Object instance)
        Returns a object created from the original instance that contains all the elements to execute the insert into the underlying technology.
        Parameters:
        instance - Original instance.
        Returns:
        Adapted instance.
      • execute

        protected abstract <R> R execute​(A adaptedInstance)
        Execute the operation on the underlying technology using the adapted instance.
        Type Parameters:
        R - Expected return data type.
        Parameters:
        adaptedInstance - Adapted instance.
        Returns:
        Inserted instance.