本文整理汇总了Java中com.fasterxml.jackson.annotation.ObjectIdGenerator.IdKey方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectIdGenerator.IdKey方法的具体用法?Java ObjectIdGenerator.IdKey怎么用?Java ObjectIdGenerator.IdKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.fasterxml.jackson.annotation.ObjectIdGenerator
的用法示例。
在下文中一共展示了ObjectIdGenerator.IdKey方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveId
import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
@Override
public Object resolveId(final ObjectIdGenerator.IdKey id) {
Object entity = repository.findOne((Long) id.key);
if (entity == null) {
throw new BusinessException(ErrorConstants.ERR_NOTFOUND, "Can not resolve XmEntity by ID: " + id.key);
}
return entity;
}
示例2: findObjectId
import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
public ReadableObjectId findObjectId(Object paramObject, ObjectIdGenerator<?> paramObjectIdGenerator)
{
ObjectIdGenerator.IdKey localIdKey = paramObjectIdGenerator.key(paramObject);
if (this._objectIds == null)
{
this._objectIds = new LinkedHashMap();
}
else
{
ReadableObjectId localReadableObjectId1 = (ReadableObjectId)this._objectIds.get(localIdKey);
if (localReadableObjectId1 != null)
return localReadableObjectId1;
}
ReadableObjectId localReadableObjectId2 = new ReadableObjectId(paramObject);
this._objectIds.put(localIdKey, localReadableObjectId2);
return localReadableObjectId2;
}
示例3: resolveId
import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
@Override
public Object resolveId(final ObjectIdGenerator.IdKey id) {
Object entity = repository.findOne((Long) id.key);
if (entity == null) {
throw new BusinessException(ErrorConstants.ERR_NOTFOUND, "Can not resolve Calendar by ID: " + id.key);
}
return entity;
}
示例4: bindItem
import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
@Override
public void bindItem(ObjectIdGenerator.IdKey id, Object pojo) {
}
示例5: resolveId
import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
@Override
public Object resolveId(ObjectIdGenerator.IdKey id) {
return store == null ? null : store.findByKey(id.scope, id.key);
}
示例6: key
import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
public ObjectIdGenerator.IdKey key(Object paramObject)
{
return new ObjectIdGenerator.IdKey(getClass(), this._scope, paramObject);
}
示例7: addObjectId
import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
void addObjectId(ObjectIdGenerator.IdKey id, Object instance);
示例8: getObjectWithId
import com.fasterxml.jackson.annotation.ObjectIdGenerator; //导入方法依赖的package包/类
Object getObjectWithId(ObjectIdGenerator.IdKey id);