本文整理了Java中org.datanucleus.ExecutionContext.newObjectId()
方法的一些代码示例,展示了ExecutionContext.newObjectId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExecutionContext.newObjectId()
方法的具体详情如下:
包路径:org.datanucleus.ExecutionContext
类名称: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)
内容来源于网络,如有侵权,请联系作者删除!