package jp.sf.amateras.mirage.dialect;

import java.util.List;

import jp.sf.amateras.mirage.type.ValueType;

public class StandardDialect implements Dialect {

	@Override
	public String getName() {
		return null;
	}

	@Override
	public boolean needsParameterForResultSet() {
		return false;
	}

	@Override
	public ValueType getValueType(Class<?> clazz, List<ValueType> valueTypes) {
		{
			ValueType valueType = getValueTypeInternal(clazz, valueTypes);
			if (valueType != null){
				return valueType;
			}
		}
		for (ValueType valueType : valueTypes) {
			if (valueType.isSupport(clazz)){
				return valueType;
			}
		}
		return null;
	}

	protected ValueType getValueTypeInternal(Class<?> clazz, List<ValueType> valueTypes){
		return null;
	}

}
