当前位置: 首页>>代码示例>>Java>>正文


Java PO.get_Table_ID方法代码示例

本文整理汇总了Java中org.compiere.model.PO.get_Table_ID方法的典型用法代码示例。如果您正苦于以下问题:Java PO.get_Table_ID方法的具体用法?Java PO.get_Table_ID怎么用?Java PO.get_Table_ID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.compiere.model.PO的用法示例。

在下文中一共展示了PO.get_Table_ID方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: assertPosted

import org.compiere.model.PO; //导入方法依赖的package包/类
private AcctFactAssert assertPosted(Object model, boolean expectedPosted)
{
	Assert.assertNotNull("model is null", model);

	PO po = InterfaceWrapperHelper.getPO(model);
	Assert.assertNotNull("no PO found for model " + model, po);

	assertPostedFlag(po, true);

	// final Properties ctx = po.getCtx();
	// final String trxName = po.get_TrxName();
	final int tableId = po.get_Table_ID();
	final int recordId = po.get_ID();

	final AcctDimension dimension = new AcctDimension()
			.setAD_Table_ID(tableId)
			.setRecord_ID(recordId);
	final Balance bal = getBalance(dimension);
	boolean hasFacts = bal.getRecordsCount() > 0;

	Assert.assertEquals("Document " + po + " has " + (expectedPosted ? "no" : "") + " facts (" + bal + ")",
			expectedPosted, hasFacts);

	return this;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:26,代码来源:AcctFactAssert.java


示例2: retrieveForPO

import org.compiere.model.PO; //导入方法依赖的package包/类
/**
 * 
 * @param po
 * @param cand if not null, only candidates with a C_AdvCommissionFactCand_ID lower than the given candidate's ID are returned
 * @return
 */
public static List<MCAdvCommissionFactCand> retrieveForPO(final PO po, final MCAdvCommissionFactCand cand)
{
	final String wc = I_C_AdvCommissionFactCand.COLUMNNAME_AD_Table_ID + "=? AND " + I_C_AdvCommissionFactCand.COLUMNNAME_Record_ID + "=? AND "
			+ I_C_AdvCommissionFactCand.COLUMNNAME_C_AdvCommissionFactCand_ID + "<?";

	final Object[] params = {
			po.get_Table_ID(),
			po.get_ID(),
			cand == null ? Integer.MAX_VALUE : cand.get_ID() };

	return new Query(po.getCtx(), I_C_AdvCommissionFactCand.Table_Name, wc, po.get_TrxName())
			.setParameters(params)
			.setOnlyActiveRecords(true)
			.setClient_ID()
			.setOrderBy(I_C_AdvCommissionFactCand.COLUMNNAME_C_AdvCommissionFactCand_ID)
			.list();
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:24,代码来源:MCAdvCommissionFactCand.java


示例3: addChatInfoToPO

import org.compiere.model.PO; //导入方法依赖的package包/类
@Override
public void addChatInfoToPO(final Object model, final String info)
{
	final PO po = InterfaceWrapperHelper.getPO(model);

	final MChat chat = new MChat(getCtx(), po.get_Table_ID(), po.get_ID(), null, getTrxName());
	chat.saveEx();
	final MChatEntry entry = new MChatEntry(chat, info);
	entry.saveEx();
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:11,代码来源:Helper.java


示例4: MigrationDataExecutor

import org.compiere.model.PO; //导入方法依赖的package包/类
public MigrationDataExecutor(final IMigrationExecutorContext migrationCtx, final I_AD_MigrationStep step, final I_AD_MigrationData data, final PO po, final IDataConverter converter)
{
	this.migrationCtx = migrationCtx;
	this.step = step;
	this.data = data;
	this.po = po;
	this.converter = converter;

	this.adTableId = po.get_Table_ID();
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:11,代码来源:MigrationDataExecutor.java


示例5: MWFActivity

import org.compiere.model.PO; //导入方法依赖的package包/类
/**
 * Parent Contructor
 *
 * @param process process
 * @param AD_WF_Node_ID start node
 * @param lastPO PO from the previously executed node
 */
public MWFActivity(MWFProcess process, int next_ID, PO lastPO)
{
	this(process, next_ID);
	if (lastPO != null)
	{
		// Compare if the last PO is the same type and record needed here, if yes, use it
		if (lastPO.get_Table_ID() == getAD_Table_ID() && lastPO.get_ID() == getRecord_ID())
		{
			m_po = lastPO;
		}
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:20,代码来源:MWFActivity.java


示例6: processEvent

import org.compiere.model.PO; //导入方法依赖的package包/类
@Override
public void processEvent(final ProcessEvent event)
{

	if (!ProcessEvent.EventType.trxFinished.equals(event.getType()))
	{
		return;
	}
	if (!(event.getSource() instanceof PO))
	{
		return;
	}
	final PO sourcePO = (PO)event.getSource();

	int currentTabAdTableId = -1;
	try
	{
		currentTabAdTableId = m_curTab.getAD_Table_ID();
	}
	catch (final NullPointerException e)
	{
		// TODO: this the NPE is only thrown if m_curTab.dispose() that been
		// called. But then, why hasn't this panel's dispose() method been
		// called as well?
		return;
	}
	if (m_curTab == null || sourcePO.get_Table_ID() != currentTabAdTableId)
	{
		return;
	}
	cmd_refresh();
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:33,代码来源:APanel.java


示例7: linkReferenceNo

import org.compiere.model.PO; //导入方法依赖的package包/类
@Override
public void linkReferenceNo(final PO po, final IReferenceNoGeneratorInstance instance)
{
	final IReferenceNoDAO dao = Services.get(IReferenceNoDAO.class);

	final Properties localCtx = Env.deriveCtx(po.getCtx());
	Env.setContext(localCtx, "#AD_Client_ID", po.getAD_Client_ID());
	Env.setContext(localCtx, "#AD_Org_ID", po.getAD_Org_ID());

	final String trxName = po.get_TrxName();
	final int tableId = po.get_Table_ID();
	final int recordId = po.get_ID();

	final String referenceNoStr = instance.generateReferenceNo(po);
	if (IReferenceNoGenerator.REFERENCENO_None == referenceNoStr)
	{
		logger.debug("Instance {} did not generate any referenceNo for '{}'. Skip.", new Object[] { instance, po });
		return;
	}

	final I_C_ReferenceNo referenceNo = dao.getCreateReferenceNo(localCtx, instance.getType(), referenceNoStr, trxName);
	dao.getCreateReferenceNoDoc(referenceNo, tableId, recordId);

	
	// 04153 : mark the reference numbers with 'referenceNoStr' created by the system with isManual = N
	if(referenceNo != null)
	{
		referenceNo.setIsManual(false);
		InterfaceWrapperHelper.save(referenceNo); // make sure the flag is saved
	}

	if (logger.isDebugEnabled())
	{
		logger.debug("Created reference " + referenceNoStr + " for " + po);
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:37,代码来源:ReferenceNoBL.java


示例8: unlinkReferenceNo

import org.compiere.model.PO; //导入方法依赖的package包/类
@Override
public void unlinkReferenceNo(final PO po, final IReferenceNoGeneratorInstance instance)
{
	final IReferenceNoDAO dao = Services.get(IReferenceNoDAO.class);

	final Properties ctx = po.getCtx();
	final String trxName = po.get_TrxName();
	final int tableId = po.get_Table_ID();
	final int recordId = po.get_ID();
	final int referenceNoTypeId = instance.getType().getC_ReferenceNo_Type_ID();

	final List<I_C_ReferenceNo_Doc> assignments = dao.retrieveDocAssignments(ctx, referenceNoTypeId, tableId, recordId, trxName);
	dao.removeDocAssignments(assignments);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:15,代码来源:ReferenceNoBL.java


示例9: retrieveFacts

import org.compiere.model.PO; //导入方法依赖的package包/类
/**
 * Returns all facts that belong to the given po
 * 
 * @param po
 * @return
 */
public static List<I_C_AdvCommissionFact> retrieveFacts(final PO po, final int commissionTermId)
{
	final Properties ctx = po.getCtx();
	final String trxName = po.get_TrxName();

	final int tableId = po.get_Table_ID();
	final int recordId = po.get_ID();

	return retrieveFacts(ctx, tableId, recordId, commissionTermId, trxName);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:17,代码来源:MCAdvCommissionFact.java


示例10: chatInfoForPO

import org.compiere.model.PO; //导入方法依赖的package包/类
private void chatInfoForPO(final Object model, final String info)
{
	final PO po = InterfaceWrapperHelper.getPO(model);

	final MChat chat = new MChat(po.getCtx(), po.get_Table_ID(), po.get_ID(), null, po.get_TrxName());
	chat.saveEx();
	final MChatEntry entry = new MChatEntry(chat, getClass().getSimpleName() + " - " + info);
	entry.saveEx();
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:10,代码来源:CommissionFactRecordAllocationLine.java


示例11: retrieveFor

import org.compiere.model.PO; //导入方法依赖的package包/类
@Override
public List<IAdvComInstance> retrieveFor(final PO po, final I_C_AdvComSystem_Type comSystemSystemType)
{
	final Object[] params = new Object[2];
	params[0] = po.get_Table_ID();
	params[1] = po.get_ID();

	final StringBuilder wc = new StringBuilder();

	wc.append("AD_Table_ID=? AND Record_ID=? AND " //
			+ IAdvComInstance.COLUMNNAME_C_AdvCommissionTerm_ID + " in (");

	boolean first = true;
	for (final I_C_AdvCommissionTerm term : Services.get(ICommissionTermDAO.class).retrieveAll(po.getCtx(), comSystemSystemType, po.getAD_Org_ID(), po.get_TrxName()))
	{
		if (first)
		{
			first = false;
		}
		else
		{
			wc.append(", ");
		}
		wc.append(term.getC_AdvCommissionTerm_ID());
	}
	wc.append(")");

	return new Query(po.getCtx(), IAdvComInstance.Table_Name, wc.toString(), po.get_TrxName())
			.setParameters(params)
			.setOnlyActiveRecords(true)
			.setOrderBy(IAdvComInstance.COLUMNNAME_LevelHierarchy)
			.setClient_ID()
			.list(IAdvComInstance.class);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:35,代码来源:AbstractCommissionInstanceDAO.java


示例12: process

import org.compiere.model.PO; //导入方法依赖的package包/类
/**
 * 	Process Document Value Workflow
 *	@param document document
 *	@param AD_Table_ID table
 *	@return true if WF started
 */
@Override
public boolean process (final PO document)
{
	m_noCalled++;
	
	final int AD_Table_ID = document.get_Table_ID();
	MWorkflow[] wfs = MWorkflow.getDocValue (document.getCtx(), 
		document.getAD_Client_ID(), AD_Table_ID
		, document.get_TrxName() // Bug 1568766 Trx should be kept all along the road	
	);
	if (wfs == null || wfs.length == 0)
		return false;
	
	boolean started = false;
	for (final MWorkflow wf : wfs)
	{
		//	We have a Document Workflow
		final String logic = wf.getDocValueLogic();
		if(Check.isEmpty(logic, true))
		{
			log.error("Workflow has no Logic - {}", wf);
			continue;
		}
	
		//	Re-check: Document must be same Client as workflow
		if (wf.getAD_Client_ID() != document.getAD_Client_ID())
		{
			continue;
		}
	
		//	Check Logic
		final boolean sql = logic.startsWith("SQL=");
		if (sql && !testStart(wf, document))
		{
			log.debug("SQL Logic evaluated to false ({})", logic);
			continue;
		}
		if (!sql && !Evaluator.evaluateLogic(document, logic))
		{
			log.debug("Logic evaluated to false ({})", logic);
			continue;
		}
	
		//	Start Workflow
		log.debug(logic);
		final ProcessInfo pi = ProcessInfo.builder()
				.setCtx(document.getCtx())
				.setAD_Process_ID(305) // FIXME HARDCODED
				.setAD_Client_ID(document.getAD_Client_ID())
				.setTitle(wf.getName())
				.setRecord(AD_Table_ID, document.get_ID())
				.build();
		//
		if (wf.start(pi) != null)
		{
			log.info("Workflow {} started for {}", wf, document);
			m_noStarted++;
			started = true;
		}
	}
	return started;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:69,代码来源:DocWorkflowManager.java


示例13: createOrUpdate

import org.compiere.model.PO; //导入方法依赖的package包/类
public static MCAdvCommissionFactCand createOrUpdate(final PO po, final MCAdvCommissionRelevantPO relevantPO)
{
	Check.assume(relevantPO != null, "Param 'relevantPO' is not null");

	final String whereClause =
			I_C_AdvCommissionFactCand.COLUMNNAME_AD_Table_ID + "=? AND "
					+ I_C_AdvCommissionFactCand.COLUMNNAME_Record_ID + "=? AND "
					+ I_C_AdvCommissionFactCand.COLUMNNAME_C_AdvCommissionRelevantPO_ID + "=? AND "
					+ I_C_AdvCommissionFactCand.COLUMNNAME_TrxName + "=?";

	final Object[] parameters = {
			po.get_Table_ID(),
			po.get_ID(),
			relevantPO.get_ID(),
			po.get_TrxName()
	};

	final List<MCAdvCommissionFactCand> existingCands =
			new Query(po.getCtx(), I_C_AdvCommissionFactCand.Table_Name, whereClause, po.get_TrxName())
					.setParameters(parameters)
					.list();

	Check.assume(existingCands.size() <= 1, "There is max 1 existing candidate; existingCands=" + existingCands);

	if (existingCands.isEmpty())
	{
		final MCAdvCommissionFactCand newCand = new MCAdvCommissionFactCand(po, relevantPO);
		newCand.saveEx();
		return newCand;
	}

	final MCAdvCommissionFactCand existingCand = existingCands.get(0);

	existingCand.setSeqNo(relevantPO.getSeqNo());
	existingCand.setInfo(relevantPO.isInfo());
	existingCand.setIsSubsequentProcessingDone(false);
	existingCand.setIsImmediateProcessingDone(false);
	existingCand.saveEx();

	return existingCand;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:42,代码来源:MCAdvCommissionFactCand.java



注:本文中的org.compiere.model.PO.get_Table_ID方法示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。