public void addAction ( String firstName , String lastName , String actionType , String actionValue ) { // Create a new UserActionsModel, and add a new actions map to it with a // single action value. Even if one exists in this row, since it has a lone // keyAsColumn field, it won't remove any actions that already exist in the // actions column family. UserActionsModel actionsModel = UserActionsModel . newBuilder ( ) . setLastName ( lastName ) . setFirstName ( firstName ) . setActions ( new HashMap < String , String > ( ) ) . build ( ) ; actionsModel . getActions ( ) . put ( actionType , actionValue ) ; // Perform the put. userActionsDao . put ( actionsModel ) ; }
Add an action to the user profile .