本文整理汇总了Java中org.kuali.rice.krad.service.KRADServiceLocatorWeb.getLegacyDataAdapter方法的典型用法代码示例。如果您正苦于以下问题:Java KRADServiceLocatorWeb.getLegacyDataAdapter方法的具体用法?Java KRADServiceLocatorWeb.getLegacyDataAdapter怎么用?Java KRADServiceLocatorWeb.getLegacyDataAdapter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.krad.service.KRADServiceLocatorWeb
的用法示例。
在下文中一共展示了KRADServiceLocatorWeb.getLegacyDataAdapter方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLegacyDataAdapter
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
/**
* Get the legacy data adapter.
*
* @return The legacy data adapter.
*/
protected LegacyDataAdapter getLegacyDataAdapter() {
if (legacyDataAdapter == null) {
legacyDataAdapter = KRADServiceLocatorWeb.getLegacyDataAdapter();
}
return legacyDataAdapter;
}
示例2: getLegacyDataAdapter
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
@Override
@Deprecated // KNS Service
protected LegacyDataAdapter getLegacyDataAdapter() {
if (legacyDataAdapter == null) {
legacyDataAdapter = KRADServiceLocatorWeb.getLegacyDataAdapter();
}
return this.legacyDataAdapter;
}
示例3: getLegacyDataAdapter
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
@Deprecated
public LegacyDataAdapter getLegacyDataAdapter() {
if (legacyDataAdapter == null) {
legacyDataAdapter = KRADServiceLocatorWeb.getLegacyDataAdapter();
}
return legacyDataAdapter;
}
示例4: getLegacyDataAdapter
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected static LegacyDataAdapter getLegacyDataAdapter() {
if (legacyDataAdapter == null) {
legacyDataAdapter = KRADServiceLocatorWeb.getLegacyDataAdapter();
}
return legacyDataAdapter;
}
示例5: setUp
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
@Override
public void setUp() throws Exception {
super.setUp();
legacyDataAdapter = KRADServiceLocatorWeb.getLegacyDataAdapter();
}
示例6: refreshReference
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void refreshReference(Object parentObject, String referenceObjectName) {
if (!(parentObject instanceof PersistableBusinessObjectBaseAdapter)) {
KRADServiceLocator.getDataObjectService().wrap(parentObject).fetchRelationship(referenceObjectName);
}
else {
//support legacy data objects
LegacyDataAdapter legacyDataAdapter = KRADServiceLocatorWeb.getLegacyDataAdapter();
DataDictionaryService dataDictionaryService = KRADServiceLocatorWeb.getDataDictionaryService();
if (legacyDataAdapter.hasReference(parentObject.getClass(), referenceObjectName) || legacyDataAdapter
.hasCollection(parentObject.getClass(), referenceObjectName)) {
// refresh via database mapping
legacyDataAdapter.retrieveReferenceObject(parentObject, referenceObjectName);
} else if (dataDictionaryService.hasRelationship(parentObject.getClass().getName(), referenceObjectName)) {
// refresh via data dictionary mapping
Object referenceObject = KradDataServiceLocator.getDataObjectService().wrap(parentObject).getPropertyValue(
referenceObjectName);
if (!(referenceObject instanceof PersistableBusinessObjectBaseAdapter)) {
LOG.warn("Could not refresh reference " + referenceObjectName + " off class " + parentObject.getClass()
.getName() + ". Class not of type PersistableBusinessObject");
return;
}
referenceObject = legacyDataAdapter.retrieve(referenceObject);
if (referenceObject == null) {
LOG.warn("Could not refresh reference " + referenceObjectName + " off class " + parentObject.getClass()
.getName() + ".");
return;
}
try {
KRADUtils.setObjectProperty(parentObject, referenceObjectName, referenceObject);
} catch (Exception e) {
LOG.error("Unable to refresh persistable business object: " + referenceObjectName + "\n" + e
.getMessage());
throw new RuntimeException(
"Unable to refresh persistable business object: " + referenceObjectName + "\n" + e
.getMessage());
}
} else {
LOG.warn("Could not refresh reference " + referenceObjectName + " off class " + parentObject.getClass()
.getName() + ".");
}
}
}
示例7: getLegacyDataAdapter
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected LegacyDataAdapter getLegacyDataAdapter() {
return KRADServiceLocatorWeb.getLegacyDataAdapter();
}
示例8: getLegacyDataAdapter
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
private static LegacyDataAdapter getLegacyDataAdapter() {
if (legacyDataAdapter == null) {
legacyDataAdapter = KRADServiceLocatorWeb.getLegacyDataAdapter();
}
return legacyDataAdapter;
}
示例9: getLegacyDataAdapter
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
private LegacyDataAdapter getLegacyDataAdapter() {
return KRADServiceLocatorWeb.getLegacyDataAdapter();
}
示例10: getLegacyDataAdapter
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected LegacyDataAdapter getLegacyDataAdapter() {
if (this.legacyDataAdapter == null) {
this.legacyDataAdapter = KRADServiceLocatorWeb.getLegacyDataAdapter();
}
return this.legacyDataAdapter;
}
示例11: getLegacyDataAdapter
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected LegacyDataAdapter getLegacyDataAdapter() {
if (legacyDataAdapter == null) {
legacyDataAdapter = KRADServiceLocatorWeb.getLegacyDataAdapter();
}
return legacyDataAdapter;
}
示例12: getLegacyDataAdapter
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
/**
* Gets the legacyDataAdapter service.
*
* @return Returns the legacyDataAdapter service.
*/
protected LegacyDataAdapter getLegacyDataAdapter() {
return legacyDataAdapter != null ? legacyDataAdapter : KRADServiceLocatorWeb.getLegacyDataAdapter();
}