标准附件,如果上传了没有保存.怎么检查他是否上传了附件


 String[] sPkValues = new String[]{pk1_value, pk2_value, pk3_value, pk4_value, pk5_value};

//验证缓存和DB
public boolean attachmentExistsInCache(OAApplicationModule am, String EntityName,

String PklValue){

String[] sPkValue= new String[]{PklValue };
return OAAttachmentServerUtils.attachmentExistsInCacheOrDb(am, EntityName, sPkValue);

}

//仅验证DB

public boolean attachmentExistsInCache(OAApplicationModule am, String EntityName,
String PklValue){

String[] sPkValue= new String[]{PklValue };
return OAAttachmentServerUtils.attachmentExists(am, EntityName, sPkValue);

}

//vo.setAssociationConsistent(true)方法应该是会去查询缓存中的数据

if(associationConsistent){
vo.setAssociationConsistent(associationConsistent);

}

setAssociationConsistent

public void setAssociationConsistent(boolean consistent)
Sets the association-consistent flag for this Row Set.

Association-consistent mode allows the user to see data that includes changes not yet posted to database, but at the cost of degraded performance.

When association-consistency is on the Row Set will reflect rows with modified foreign keys, newly created rows, and removed (deleted) rows. When association-consistency is off the user must post pending changes to database to make them visible.

This method is relevant only if this Row Set was one returned from a call to an entity association accessor.

 
原文地址:https://www.cnblogs.com/huanghongbo/p/5646858.html