Parsing a long without using inbuilt function parseLong
If the condition if(number==null || number.isEmpty()) holds true the method should throw a ParseException rather than incorrectly returning 0. 

Also your logic for non-negative numbers isn't quite correct, as you are ignoring the first character if the length of the input is > 1. To fix this you should include charAt(0) in your else statement as follows: 

    if(number.charAt(0)=='-'){
        isNegative=true;
    }
    else {
        n = getValue(number.charAt(0));

        for(int i=1;i&lt;number.length();i++){
            n = n*10 + getValue(number.charAt(i));
        }
    }


Also in your getValue method your check, whether the character is a digit can be simplified: 

public int getValue(char ch){
    if (Character.isDigit(ch)){
        return ch - 48;
    } else {
        throw new NumberFormatException();
    }
}


These are local optimizations. I would consider converting the string to an array of integers first (and by doing that determine, whether the string is valid in the first place) and then compute the value. By doing the computations as you go you are risking doing them in vain if a later input character is not a digit. 

One thing that is missing in your code is considering the maximum value for a long and checking for violations.