All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.aguacate.configuration.field.Field Maven / Gradle / Ivy

There is a newer version: 0.10.9
Show newest version
package net.sf.aguacate.configuration.field;

import net.sf.aguacate.validator.ValidationConversionResult;

public abstract class Field {

	public static final String STRING = "STRING";

	public static final String INTEGER = "INTEGER";

	public static final String FLOAT = "FLOAT";

	public static final String BOOLEAN = "BOOLEAN";

	public static final String DATE = "DATE";

	public static final String TIME = "TIME";

	public static final String DATETIME = "DATETIME";

	public static final String DYNAMIC_DATE = "DYNAMIC_DATE";

	public static final String STRUCTURE_ARRAY = "STRUCTURE_ARRAY";

	public static final String STRUCTURE = "STRUCTURE";

	public static final String ARRAY = "ARRAY";

	private final String name;

	private final String type;

	private final boolean optional;

	public Field(String name, String type, boolean optional) {
		this.name = name;
		this.type = type;
		this.optional = optional;
	}

	public String getName() {
		return name;
	}

	public String getType() {
		return type;
	}

	public boolean isOptional() {
		return optional;
	}

	public abstract ValidationConversionResult validateAndConvert(Object value);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy