gpt4 book ai didi

org.eclipse.persistence.oxm.mappings.XMLObjectReferenceMapping.getReferenceClass()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 07:44:40 26 4
gpt4 key购买 nike

本文整理了Java中org.eclipse.persistence.oxm.mappings.XMLObjectReferenceMapping.getReferenceClass()方法的一些代码示例,展示了XMLObjectReferenceMapping.getReferenceClass()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLObjectReferenceMapping.getReferenceClass()方法的具体详情如下:
包路径:org.eclipse.persistence.oxm.mappings.XMLObjectReferenceMapping
类名称:XMLObjectReferenceMapping
方法名:getReferenceClass

XMLObjectReferenceMapping.getReferenceClass介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**    
 * INTERNAL:
 * Retrieve the target object's primary key value that is mapped to a given
 * source xpath (in the source-target key field association list).
 * 
 * @param sourceObject
 * @param xmlFld
 * @param session
 * @return null if the target object is null, the reference class is null, or
 * a primary key field name does not exist on the reference descriptor that
 * matches the target field name - otherwise, return the associated primary 
 * key value   
 */
public Object buildFieldValue(Object targetObject, XMLField xmlFld, AbstractSession session) {
  if (targetObject == null || getReferenceClass() == null) {
    return null;
  }
  ClassDescriptor descriptor = getReferenceDescriptor();
  ObjectBuilder objectBuilder = descriptor.getObjectBuilder();
  Vector pks = objectBuilder.extractPrimaryKeyFromObject(targetObject, session);
  int idx = descriptor.getPrimaryKeyFields().indexOf(getSourceToTargetKeyFieldAssociations().get(xmlFld));
  if (idx == -1) {
    return null;
  }
  return pks.get(idx);
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

if (getReferenceClass() == null) {
  setReferenceClass(session.getDatasourcePlatform().getConversionManager().convertClassNameToClass(getReferenceClassName()));

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

if (targetObject == null || getReferenceClass() == null) {
  return null;
Object primaryKey = objectBuilder.extractPrimaryKeyFromObject(targetObject, session);
int idx = 0;
if(!(null == referenceClass || ClassConstants.OBJECT == getReferenceClass())) {
  idx = descriptor.getPrimaryKeyFields().indexOf(getSourceToTargetKeyFieldAssociations().get(xmlFld));
  if (idx == -1) {

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

if (targetObject == null || getReferenceClass() == null) {
  return null;
Object primaryKey = objectBuilder.extractPrimaryKeyFromObject(targetObject, session);
int idx = 0;
if(!(null == referenceClass || ClassConstants.OBJECT == getReferenceClass())) {
  idx = descriptor.getPrimaryKeyFields().indexOf(getSourceToTargetKeyFieldAssociations().get(xmlFld));
  if (idx == -1) {

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

ClassDescriptor descriptor = sourceQuery.getSession().getClassDescriptor(getReferenceClass());
Vector pkFieldNames = descriptor.getPrimaryKeyFieldNames();
Vector primaryKeys = new Vector();

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

ClassDescriptor clsDescriptor = session.getClassDescriptor(getReferenceClass());
Vector pkFieldNames = clsDescriptor.getPrimaryKeyFieldNames();
  Vector pks = new Vector();
  pks.setSize(pkFieldNames.size());
  reference = new Reference(this, srcObject, getReferenceClass(), pks);
  resolver.addReference(reference);
  record.reference(reference);

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

XMLObjectReferenceMapping refMapping = (XMLObjectReferenceMapping)nextMapping;
if(refMapping.getInverseReferenceMapping().getAttributeAccessor() != null && refMapping.getInverseReferenceMapping().getContainerPolicy() != null) {
  ClassDescriptor refDescriptor = ormSession.getClassDescriptor(refMapping.getReferenceClass());
  if(refDescriptor != null) {
    DatabaseMapping backpointerMapping =refDescriptor.getMappingForAttributeName(refMapping.getInverseReferenceMapping().getAttributeName());

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

if(refMapping.getReferenceClass() == this.getDescriptor().getJavaClass()) {
  refMapping.setInverseReferenceMapping(this);

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

if(refMapping.getReferenceClass() == this.getDescriptor().getJavaClass()) {
  refMapping.setInverseReferenceMapping(this);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com