org.datanucleus.ExecutionContext.newObjectId()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(74)

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

ExecutionContext.newObjectId介绍

暂无

代码示例

代码示例来源:origin: Blazebit/blaze-persistence

@Override
public boolean containsEntity(EntityManager em, Class<?> entityClass, Object id) {
  ExecutionContext ec = em.unwrap(ExecutionContext.class);
  return ec.getAttachedObjectForId(ec.newObjectId(entityClass, id)) != null;
}

代码示例来源:origin: com.blazebit/blaze-persistence-integration-datanucleus-5.1

@Override
public boolean containsEntity(EntityManager em, Class<?> entityClass, Object id) {
  ExecutionContext ec = em.unwrap(ExecutionContext.class);
  return ec.getAttachedObjectForId(ec.newObjectId(entityClass, id)) != null;
}

代码示例来源:origin: Blazebit/blaze-persistence

@Override
public boolean containsEntity(EntityManager em, Class<?> entityClass, Object id) {
  ExecutionContext ec = em.unwrap(ExecutionContext.class);
  return ec.getAttachedObjectForId(ec.newObjectId(entityClass, id)) != null;
}

代码示例来源:origin: org.datanucleus/datanucleus-api-jdo

/**
 * This method returns an object id instance corresponding to the pcClass and key arguments.
 * It has 2 modes of operation. Where SingleFieldIdentity is being used the key is the
 * value of the key field. For all other cases the key is the String form of the object id instance.
 * @param pcClass Class of the persistable to create the OID for.
 * @param key Value of the key for SingleFieldIdentity, or toString() for other cases
 * @return The new object-id instance
 */
public Object newObjectIdInstance(Class pcClass, Object key)
{
  assertIsOpen();
  try
  {
    return ec.newObjectId(pcClass, key);
  }
  catch (NucleusException ne)
  {
    throw NucleusJDOHelper.getJDOExceptionForNucleusException(ne);
  }
}

代码示例来源:origin: org.datanucleus/datanucleus-rdbms

Object id = ec.newObjectId(classNameForId, null);
if (mappedFieldNumbers == null)

相关文章