public static void parseAndExecCommand(String args[]) {
        Command command = Command.UNKNOWN;

        //required count of arguments for command
        int argc = 0;

        if (args.length < 1) {
            logger.error("Wromg command name");
            printUsage(command);
            System.exit(0);
        }

        if (args[0].equalsIgnoreCase("ADDEMPL")) {
            argc = 2;
            command = Command.ADDEMPL;
        } else if (args[0].equalsIgnoreCase("DELEMPL")) {
            argc = 2;
            command = Command.DELEMPL;
        } else if (args[0].equalsIgnoreCase("CHANGETYPE")) {
            argc = 3;
            command = Command.CHANGETYPE;
        }  else if (args[0].equalsIgnoreCase("ADDTOMANAGER")) {
            argc = 3;
            command = Command.ADDTOMANAGER;
        }  else if (args[0].equalsIgnoreCase("SORTBYSURNAME")) {
            argc = 1;
            command = Command.SORTBYSURNAME;
        }  else if (args[0].equalsIgnoreCase("SORTBYHIRINGDATE")) {
            command = Command.SORTBYHIRINGDATE;
            argc = 1;
        }  else if (args[0].equalsIgnoreCase("ADDDESCR")) {
            argc = 3;
            command = Command.ADDDESCR;
        } else if (args[0].equalsIgnoreCase("IMPORT")) {
            argc = 1;
            command = Command.IMPORT;
        }

        executeCommand(args, argc, command);
    }