AssetService.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:cr-private-server 作者:
public AssetEntity get(String name) {
    AssetEntity entity;

    try (Session session = session()) {
        try {
            entity = session.createNamedQuery("AssetEntity.byName", AssetEntity.class)
                    .setParameter("name", name)
                    .getSingleResult();
        } catch (NoResultException ignored) {
            entity = new AssetEntity();
            entity.setName(name);
            entity.setLastUpdated(new Date(System.currentTimeMillis()));
        }
    }

    return entity;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号