Skip to content

Commit

Permalink
extract some methods
Browse files Browse the repository at this point in the history
  • Loading branch information
iliyan-velichkov committed Jun 17, 2024
1 parent 3c4bc46 commit 7b17e71
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/zcl_dirigible_employee_dao.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,4 @@ CLASS zcl_dirigible_employee_dao IMPLEMENTATION.
ENDIF.
ENDMETHOD.



ENDCLASS.
35 changes: 31 additions & 4 deletions src/zcl_hello_world.clas.abap
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
CLASS zcl_hello_world DEFINITION PUBLIC FINAL CREATE PUBLIC.

PUBLIC SECTION.
CLASS-METHODS run.
CLASS-METHODS:
run,
print_hello_world,
delete_all_employees,
insert_employee,
select_all_employees,
update_employee_last_name.

ENDCLASS.

CLASS zcl_hello_world IMPLEMENTATION.


METHOD run.
DATA: lv_result TYPE string.
print_hello_world( ).

delete_all_employees( ).
select_all_employees( ).

insert_employee( ).
select_all_employees( ).

update_employee_last_name( ).
select_all_employees( ).

delete_all_employees( ).
select_all_employees( ).
ENDMETHOD.

METHOD print_hello_world.
zcl_dirigible_response=>println(
EXPORTING
message_in = 'Hello world!' ).
ENDMETHOD.

METHOD delete_all_employees.
zcl_dirigible_response=>println(
EXPORTING
message_in = 'Deleting all employees...' ).
Expand All @@ -23,8 +46,9 @@ CLASS zcl_hello_world IMPLEMENTATION.
zcl_dirigible_response=>println(
EXPORTING
message_in = 'All employees were deleted.' ).
ENDMETHOD.


METHOD insert_employee.
zcl_dirigible_response=>println(
EXPORTING
message_in = 'Inserting an employee...' ).
Expand All @@ -34,7 +58,9 @@ CLASS zcl_hello_world IMPLEMENTATION.
zcl_dirigible_response=>println(
EXPORTING
message_in = 'An employee was inserted.' ).
ENDMETHOD.

METHOD select_all_employees.
zcl_dirigible_response=>println(
EXPORTING
message_in = 'Selecting all employees...' ).
Expand All @@ -44,7 +70,9 @@ CLASS zcl_hello_world IMPLEMENTATION.
zcl_dirigible_response=>println(
EXPORTING
message_in = 'Employees selected.' ).
ENDMETHOD.

METHOD update_employee_last_name.
zcl_dirigible_response=>println(
EXPORTING
message_in = 'Updating employee last name...' ).
Expand All @@ -54,7 +82,6 @@ CLASS zcl_hello_world IMPLEMENTATION.
zcl_dirigible_response=>println(
EXPORTING
message_in = 'Employee last name was updated.' ).

ENDMETHOD.

ENDCLASS.

0 comments on commit 7b17e71

Please sign in to comment.