本文整理汇总了Java中enkan.collection.Parameters.getLong方法的典型用法代码示例。如果您正苦于以下问题:Java Parameters.getLong方法的具体用法?Java Parameters.getLong怎么用?Java Parameters.getLong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类enkan.collection.Parameters
的用法示例。
在下文中一共展示了Parameters.getLong方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: unlock
import enkan.collection.Parameters; //导入方法依赖的package包/类
@RolesAllowed({"UNLOCK_USER", "UNLOCK_ANY_USER"})
@Transactional
public HttpResponse unlock(Parameters params) {
Long id = params.getLong("id");
UserDao userDao = daoProvider.getDao(UserDao.class);
User user = userDao.selectById(id);
userDao.unlock(user.getId());
return UrlRewriter.redirect(UserController.class, "show?id=" + id, SEE_OTHER);
}
示例2: lock
import enkan.collection.Parameters; //导入方法依赖的package包/类
@RolesAllowed({"LOCK_USER", "LOCK_ANY_USER"})
@Transactional
public HttpResponse lock(Parameters params) {
Long id = params.getLong("id");
UserDao userDao = daoProvider.getDao(UserDao.class);
User user = userDao.selectById(id);
userDao.lock(user.getId());
return UrlRewriter.redirect(UserController.class, "show?id=" + id, SEE_OTHER);
}
示例3: listByApplicationId
import enkan.collection.Parameters; //导入方法依赖的package包/类
@RolesAllowed({"LIST_REALMS", "LIST_ANY_REALMS"})
public HttpResponse listByApplicationId(Parameters params, UserPrincipal principal) {
Long applicationId = params.getLong("applicationId");
ApplicationDao applicationDao = daoProvider.getDao(ApplicationDao.class);
Application application = applicationDao.selectById(applicationId);
RealmDao realmDao = daoProvider.getDao(RealmDao.class);
SelectOptions options = SelectOptions.get();
List<Realm> realms = realmDao.selectByApplicationId(applicationId, principal, options);
return templateEngine.render("admin/realm/list",
"application", application,
"realms", realms);
}