org.eclipse.persistence.exceptions.QueryException.objectToModifyNotSpecified()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(8.3k)|赞(0)|评价(0)|浏览(68)

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

QueryException.objectToModifyNotSpecified介绍

暂无

代码示例

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

/**
 * INTERNAL:
 * Ensure that the descriptor has been set.
 */
public void checkDescriptor(Object object, AbstractSession session) throws QueryException {
  if (this.descriptor == null) {
    if (object == null) {
      throw QueryException.objectToModifyNotSpecified(this);
    }
    //Bug#3947714  Pass the object instead of class in case object is proxy            
    ClassDescriptor referenceDescriptor = session.getDescriptor(object);
    if (referenceDescriptor == null) {
      throw QueryException.descriptorIsMissing(object.getClass(), this);
    }
    setDescriptor(referenceDescriptor);
  }
}

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

/**
 * INTERNAL:
 * Ensure that the descriptor has been set.
 */
public void checkDescriptor(Object object, AbstractSession session) throws QueryException {
  if (this.descriptor == null) {
    if (object == null) {
      throw QueryException.objectToModifyNotSpecified(this);
    }
    //Bug#3947714  Pass the object instead of class in case object is proxy
    ClassDescriptor referenceDescriptor = session.getDescriptor(object);
    if (referenceDescriptor == null) {
      throw QueryException.descriptorIsMissing(object.getClass(), this);
    }
    setDescriptor(referenceDescriptor);
  }
}

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

/**
 * INTERNAL:
 * Ensure that the descriptor has been set.
 */
public void checkDescriptor(Object object, AbstractSession session) throws QueryException {
  if (this.descriptor == null) {
    if (object == null) {
      throw QueryException.objectToModifyNotSpecified(this);
    }
    //Bug#3947714  Pass the object instead of class in case object is proxy            
    ClassDescriptor referenceDescriptor = session.getDescriptor(object);
    if (referenceDescriptor == null) {
      throw QueryException.descriptorIsMissing(object.getClass(), this);
    }
    setDescriptor(referenceDescriptor);
  }
}

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

/**
 * INTERNAL:
 * Ensure that the descriptor has been set.
 */
public void checkDescriptor(AbstractSession session) throws QueryException {
  if (this.descriptor == null) {
    if (getObject() == null) {
      throw QueryException.objectToModifyNotSpecified(this);
    }
    //Bug#3947714  Pass the object instead of class in case object is proxy
    ClassDescriptor referenceDescriptor = session.getDescriptor(getObject());
    if (referenceDescriptor == null) {
      throw QueryException.descriptorIsMissing(getObject().getClass(), this);
    }
    setDescriptor(referenceDescriptor);
  }
}

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

/**
 * INTERNAL:
 * Ensure that the descriptor has been set.
 */
public void checkDescriptor(AbstractSession session) throws QueryException {
  if (this.descriptor == null) {
    if (getObject() == null) {
      throw QueryException.objectToModifyNotSpecified(this);
    }
    //Bug#3947714  Pass the object instead of class in case object is proxy            
    ClassDescriptor referenceDescriptor = session.getDescriptor(getObject());
    if (referenceDescriptor == null) {
      throw QueryException.descriptorIsMissing(getObject().getClass(), this);
    }
    setDescriptor(referenceDescriptor);
  }
}

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

/**
 * INTERNAL:
 * Ensure that the descriptor has been set.
 */
public void checkDescriptor(AbstractSession session) throws QueryException {
  if (this.descriptor == null) {
    if (getObject() == null) {
      throw QueryException.objectToModifyNotSpecified(this);
    }
    //Bug#3947714  Pass the object instead of class in case object is proxy            
    ClassDescriptor referenceDescriptor = session.getDescriptor(getObject());
    if (referenceDescriptor == null) {
      throw QueryException.descriptorIsMissing(getObject().getClass(), this);
    }
    setDescriptor(referenceDescriptor);
  }
}

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

/**
 * INTERNAL:
 * Prepare the receiver for execution in a session.
 * In particular check that the tables on the descriptor are set.
 */
public void prepareForExecution() throws QueryException {
  super.prepareForExecution();
  if (this.object == null) {
    throw QueryException.objectToModifyNotSpecified(this);
  }
  this.object = this.descriptor.getObjectBuilder().unwrapObject(this.object, this.session);
  if (this.primaryKey == null) {
    if (this.objectChangeSet != null) {
      this.primaryKey = this.objectChangeSet.getId();
    } else {
      this.primaryKey = this.descriptor.getObjectBuilder().extractPrimaryKeyFromObject(this.object, this.session);
    }
  }
}

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

/**
 * INTERNAL:
 * Prepare the receiver for execution in a session.
 * In particular check that the tables on the descriptor are set.
 */
public void prepareForExecution() throws QueryException {
  super.prepareForExecution();
  if (this.object == null) {
    throw QueryException.objectToModifyNotSpecified(this);
  }
  this.object = this.descriptor.getObjectBuilder().unwrapObject(this.object, this.session);
  if (this.primaryKey == null) {
    if (this.objectChangeSet != null) {
      this.primaryKey = this.objectChangeSet.getId();
    } else {
      this.primaryKey = this.descriptor.getObjectBuilder().extractPrimaryKeyFromObject(this.object, this.session);
    }
  }
}

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

/**
 * INTERNAL:
 * Prepare the receiver for execution in a session.
 * In particular check that the tables on the descriptor are set.
 */
public void prepareForExecution() throws QueryException {
  super.prepareForExecution();
  if (this.object == null) {
    throw QueryException.objectToModifyNotSpecified(this);
  }
  this.object = this.descriptor.getObjectBuilder().unwrapObject(this.object, this.session);
  if (this.primaryKey == null) {
    if (this.objectChangeSet != null) {
      this.primaryKey = this.objectChangeSet.getPrimaryKeys();
    } else {
      this.primaryKey = this.descriptor.getObjectBuilder().extractPrimaryKeyFromObject(this.object, this.session);
    }
  }
}

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

throw QueryException.objectToModifyNotSpecified(deleteQuery);

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

throw QueryException.objectToModifyNotSpecified(deleteQuery);

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

throw QueryException.objectToModifyNotSpecified(deleteQuery);

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

/**
 * INTERNAL:
 * Prepare the receiver for execution in a session.
 */
public void prepareForExecution() throws QueryException {
  super.prepareForExecution();
  if (getObject() == null) {
    throw QueryException.objectToModifyNotSpecified(this);
  }
  setObject(this.descriptor.getObjectBuilder().unwrapObject(getObject(), getSession()));
  if (this.descriptor == null) {
    setDescriptor(getSession().getDescriptor(getObject().getClass()));
  }
  if (getPrimaryKey() == null) {
    setPrimaryKey(this.descriptor.getObjectBuilder().extractPrimaryKeyFromObject(getObject(), getSession()));
  }
  if ((getTranslationRow() == null) || (getTranslationRow().isEmpty())) {
    setTranslationRow(this.descriptor.getObjectBuilder().buildRowForTranslation(getObject(), getSession()));
  }
}

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

/**
 * INTERNAL:
 * Prepare the receiver for execution in a session.
 */
public void prepareForExecution() throws QueryException {
  super.prepareForExecution();
  if (getObject() == null) {
    throw QueryException.objectToModifyNotSpecified(this);
  }
  setObject(this.descriptor.getObjectBuilder().unwrapObject(getObject(), getSession()));
  if (this.descriptor == null) {
    setDescriptor(getSession().getDescriptor(getObject().getClass()));
  }
  if (getPrimaryKey() == null) {
    setPrimaryKey(this.descriptor.getObjectBuilder().extractPrimaryKeyFromObject(getObject(), getSession()));
  }
  if ((getTranslationRow() == null) || (getTranslationRow().isEmpty())) {
    setTranslationRow(this.descriptor.getObjectBuilder().buildRowForTranslation(getObject(), getSession()));
  }
}

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

/**
 * INTERNAL:
 * Prepare the receiver for execution in a session.
 */
public void prepareForExecution() throws QueryException {
  super.prepareForExecution();
  if (getObject() == null) {
    throw QueryException.objectToModifyNotSpecified(this);
  }
  setObject(this.descriptor.getObjectBuilder().unwrapObject(getObject(), getSession()));
  if (this.descriptor == null) {
    setDescriptor(getSession().getDescriptor(getObject().getClass()));
  }
  if (getPrimaryKey() == null) {
    setPrimaryKey(this.descriptor.getObjectBuilder().extractPrimaryKeyFromObject(getObject(), getSession()));
  }
  if ((getTranslationRow() == null) || (getTranslationRow().isEmpty())) {
    setTranslationRow(this.descriptor.getObjectBuilder().buildRowForTranslation(getObject(), getSession()));
  }
}

相关文章

微信公众号

最新文章

更多

QueryException类方法