src/main/java/seedu/address/model/ModelManager.java
@Override
    public Constants.ENTITY_TYPE modelObjectToEntityType(ModelObject obj) throws CommandException {
        if (obj instanceof Staff) {
            return Constants.ENTITY_TYPE.STAFF;
        } else if (obj instanceof Student) {
            return Constants.ENTITY_TYPE.STUDENT;
        } else if (obj instanceof Finance) {
            return Constants.ENTITY_TYPE.FINANCE;
        } else if (obj instanceof Course) {
            return Constants.ENTITY_TYPE.COURSE;
        } else if (obj instanceof Assignment) {
            return Constants.ENTITY_TYPE.ASSIGNMENT;
        } else if (obj instanceof Progress) {
            return Constants.ENTITY_TYPE.PROGRESS;
        }
        throw new CommandException(
                "This command is accessing non-existent entity or entity not extending from ModelObject");
    }
/**
     * Returns Entity type of given ModelObject.
     *
     * @param obj The Model Object to get Entity Type.
     */
Returns Entity type of given ModelObject.
@param obj The Model Object to get Entity Type.
Returns Entity type of given ModelObject . @param obj The Model Object to get Entity Type .
@Override
    public Constants.ENTITY_TYPE modelObjectToEntityType(ModelObject obj) throws CommandException {
        if (obj instanceof Staff) {
            return Constants.ENTITY_TYPE.STAFF;
        } else if (obj instanceof Student) {
            return Constants.ENTITY_TYPE.STUDENT;
        } else if (obj instanceof Finance) {
            return Constants.ENTITY_TYPE.FINANCE;
        } else if (obj instanceof Course) {
            return Constants.ENTITY_TYPE.COURSE;
        } else if (obj instanceof Assignment) {
            return Constants.ENTITY_TYPE.ASSIGNMENT;
        } else if (obj instanceof Progress) {
            return Constants.ENTITY_TYPE.PROGRESS;
        }
        throw new CommandException(
                "This command is accessing non-existent entity or entity not extending from ModelObject");
    }
@ Override public Constants . ENTITY_TYPE modelObjectToEntityType ( ModelObject obj ) throws CommandException { if ( obj instanceof Staff ) { return Constants . ENTITY_TYPE . STAFF ; } else if ( obj instanceof Student ) { return Constants . ENTITY_TYPE . STUDENT ; } else if ( obj instanceof Finance ) { return Constants . ENTITY_TYPE . FINANCE ; } else if ( obj instanceof Course ) { return Constants . ENTITY_TYPE . COURSE ; } else if ( obj instanceof Assignment ) { return Constants . ENTITY_TYPE . ASSIGNMENT ; } else if ( obj instanceof Progress ) { return Constants . ENTITY_TYPE . PROGRESS ; } throw new CommandException ( "This command is accessing non-existent entity or entity not extending from ModelObject" ) ; }
Returns Entity type of given ModelObject.
Returns Entity type of given ModelObject .