Package org.hcjf.layers.storage.actions
Class ManipulationDataAction<S extends StorageSession,A>
- java.lang.Object
-
- org.hcjf.layers.storage.actions.StorageAction<S>
-
- org.hcjf.layers.storage.actions.ManipulationDataAction<S,A>
-
public abstract class ManipulationDataAction<S extends StorageSession,A> extends StorageAction<S>
- Author:
- javaito
-
-
Constructor Summary
Constructors Constructor Description ManipulationDataAction(S session)ManipulationDataAction(S session, java.lang.Class modelClass)
-
Method Summary
Modifier and Type Method Description protected abstract AadaptObject(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 instanceprotected abstract <R> Rexecute(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 org.hcjf.layers.storage.actions.StorageAction
getModelClass, getSession
-
-
-
-
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:
executein classStorageAction<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.
-
-