package nccloud.impl.hrwa.pubinfo.wadataexplain.print;

import nc.bs.framework.common.NCLocator;
import nc.md.model.MetaDataException;
import nc.md.persist.framework.IMDPersistenceQueryService;
import nc.pub.templet.converter.util.helper.ExceptionUtils;
import nc.ui.pub.print.IMetaDataDataSource;
import nc.vo.hrwa.wadataexplain.Wadataexplain;

public class WadataexplainPrintDataSource implements IMetaDataDataSource{

	private String[] oids;
	
	@Override
	public String[] getAllDataItemExpress() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String[] getAllDataItemNames() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String[] getDependentItemExpressByExpress(String arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String[] getItemValuesByExpress(String arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getModuleName() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean isNumber(String arg0) {
		// TODO Auto-generated method stub
		return false;
	}

	public WadataexplainPrintDataSource(String[] oids)
   {
	    this.oids = oids;
	  }
	
	@Override
	public Object[] getMDObjects() {
		// TODO Auto-generated method stub
		IMDPersistenceQueryService qryService = (IMDPersistenceQueryService)NCLocator.getInstance().lookup(IMDPersistenceQueryService.class);
		
		 try {
			return (Object[])qryService.queryBillOfVOByPKsWithOrder(Wadataexplain.class, oids, false);
		} catch (MetaDataException e) {
			// TODO Auto-generated catch block
			ExceptionUtils.wrapException(e);
		}
		 return null;
	}

}
