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

com.anysoft.util.DataProviderProperties Maven / Gradle / Ivy

There is a newer version: 1.6.17
Show newest version
package com.anysoft.util;

import com.anysoft.formula.DataProvider;

/**
 * 将DataProvider包装为Properties
 * 
 * @author yyduan
 * @since 1.6.6.13
 */
public class DataProviderProperties extends Properties {

	/**
	 * DataProvider
	 */
	protected DataProvider provider = null;
	
	public DataProviderProperties(DataProvider p){
		provider = p;
	}
	
	@Override
	protected void _SetValue(String _name, String _value) {
		// noting to do
	}

	@Override
	protected String _GetValue(String _name) {
		String found = null;
		
		if (provider != null){
			Object context = provider.getContext(_name);			
			found = provider.getValue(_name, context, null);
		}
		
		return found;
	}

	@Override
	public void Clear() {
		// nothing to do
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy