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

info.archinnov.achilles.proxy.wrapper.builder.ThriftWideMapWrapperBuilder Maven / Gradle / Ivy

There is a newer version: 2.0.9
Show newest version
package info.archinnov.achilles.proxy.wrapper.builder;

import info.archinnov.achilles.composite.ThriftCompositeFactory;
import info.archinnov.achilles.context.ThriftPersistenceContext;
import info.archinnov.achilles.dao.ThriftGenericWideRowDao;
import info.archinnov.achilles.entity.metadata.PropertyMeta;
import info.archinnov.achilles.helper.ThriftPropertyHelper;
import info.archinnov.achilles.iterator.factory.ThriftIteratorFactory;
import info.archinnov.achilles.iterator.factory.ThriftKeyValueFactory;
import info.archinnov.achilles.proxy.ThriftEntityInterceptor;
import info.archinnov.achilles.proxy.wrapper.ThriftWideMapWrapper;

/**
 * ThriftWideMapWrapperBuilder
 * 
 * @author DuyHai DOAN
 * 
 */
public class ThriftWideMapWrapperBuilder
{
	private Object id;
	private ThriftGenericWideRowDao dao;
	private PropertyMeta wideMapMeta;
	private ThriftEntityInterceptor interceptor;
	private ThriftPropertyHelper thriftPropertyHelper;
	private ThriftKeyValueFactory thriftKeyValueFactory;
	private ThriftIteratorFactory thriftIteratorFactory;
	private ThriftCompositeFactory thriftCompositeFactory;
	private ThriftPersistenceContext context;

	public ThriftWideMapWrapperBuilder(Object id, ThriftGenericWideRowDao dao,
			PropertyMeta wideMapMeta)
	{
		this.id = id;
		this.dao = dao;
		this.wideMapMeta = wideMapMeta;
	}

	public static  ThriftWideMapWrapperBuilder builder(Object id,
			ThriftGenericWideRowDao dao, PropertyMeta wideMapMeta)
	{
		return new ThriftWideMapWrapperBuilder(id, dao, wideMapMeta);
	}

	public ThriftWideMapWrapperBuilder interceptor(ThriftEntityInterceptor interceptor)
	{
		this.interceptor = interceptor;
		return this;
	}

	public ThriftWideMapWrapperBuilder context(ThriftPersistenceContext context)
	{
		this.context = context;
		return this;
	}

	public ThriftWideMapWrapperBuilder thriftPropertyHelper(
			ThriftPropertyHelper thriftPropertyHelper)
	{
		this.thriftPropertyHelper = thriftPropertyHelper;
		return this;
	}

	public ThriftWideMapWrapperBuilder thriftKeyValueFactory(
			ThriftKeyValueFactory thriftKeyValueFactory)
	{
		this.thriftKeyValueFactory = thriftKeyValueFactory;
		return this;
	}

	public ThriftWideMapWrapperBuilder thriftIteratorFactory(
			ThriftIteratorFactory thriftIteratorFactory)
	{
		this.thriftIteratorFactory = thriftIteratorFactory;
		return this;
	}

	public ThriftWideMapWrapperBuilder thriftCompositeFactory(
			ThriftCompositeFactory thriftCompositeFactory)
	{
		this.thriftCompositeFactory = thriftCompositeFactory;
		return this;
	}

	public ThriftWideMapWrapper build()
	{
		ThriftWideMapWrapper wrapper = new ThriftWideMapWrapper();
		wrapper.setId(id);
		wrapper.setDao(dao);
		wrapper.setWideMapMeta(wideMapMeta);
		wrapper.setInterceptor(interceptor);
		wrapper.setCompositeHelper(thriftPropertyHelper);
		wrapper.setCompositeKeyFactory(thriftCompositeFactory);
		wrapper.setIteratorFactory(thriftIteratorFactory);
		wrapper.setKeyValueFactory(thriftKeyValueFactory);
		wrapper.setContext(context);
		return wrapper;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy