Package org.supercsv.exception

Examples of org.supercsv.exception.SuperCsvCellProcessorException


    @Override
    public Object execute(Object value, CsvContext context) {
        validateInputNotNull(value, context);

        if( !(value instanceof Class) ) {
            throw new SuperCsvCellProcessorException(Class.class, value, context, this);
        }


        if(KiWiUriResource.class.equals(value)) {
            return "uri";
View Full Code Here


        if(value == null) {
            return null;
        }

        if( !(value instanceof Date) ) {
            throw new SuperCsvCellProcessorException(Date.class, value, context, this);
        }

        Timestamp date = new Timestamp(((Date)value).getTime());
        return date.toString();
    }
View Full Code Here

    @Override
    public Object execute(Object value, CsvContext context) {
        validateInputNotNull(value, context);

        if( !(value instanceof Locale) ) {
            throw new SuperCsvCellProcessorException(Locale.class, value, context, this);
        }

        return ((Locale)value).getLanguage();
    }
View Full Code Here

    @Override
    public Object execute(Object value, CsvContext context) {
        validateInputNotNull(value, context);

        if( !(value instanceof Boolean) ) {
            throw new SuperCsvCellProcessorException(Boolean.class, value, context, this);
        }

        if( ((Boolean)value).booleanValue()) {
            return "t";
        } else {
View Full Code Here

    @Override
    public Object execute(Object value, CsvContext context) {
        validateInputNotNull(value, context);

        if( !(value instanceof Date) ) {
            throw new SuperCsvCellProcessorException(Date.class, value, context, this);
        }

        java.sql.Date date = new java.sql.Date(((Date)value).getTime());
        return date.toString();
    }
View Full Code Here

    @Override
    public Object execute(Object value, CsvContext context) {
        validateInputNotNull(value, context);

        if( !(value instanceof KiWiNode) ) {
            throw new SuperCsvCellProcessorException(KiWiUriResource.class, value, context, this);
        }

        return ((KiWiNode)value).getId();

    }
View Full Code Here

            } else {
                    try {
                            result = Long.parseLong(value.toString());
                    }
                    catch(final NumberFormatException e) {
                            throw new SuperCsvCellProcessorException(String.format("'%s' could not be parsed as a Long", value),
                                    context, this, e);
                    }
            }
           
            return next.execute(result, context);
View Full Code Here

TOP

Related Classes of org.supercsv.exception.SuperCsvCellProcessorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.