当前位置: 首页>>代码示例>>Java>>正文


Java Validators.MAX_LENGTH属性代码示例

本文整理汇总了Java中org.lpw.tephra.ctrl.validate.Validators.MAX_LENGTH属性的典型用法代码示例。如果您正苦于以下问题:Java Validators.MAX_LENGTH属性的具体用法?Java Validators.MAX_LENGTH怎么用?Java Validators.MAX_LENGTH使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.lpw.tephra.ctrl.validate.Validators的用法示例。


在下文中一共展示了Validators.MAX_LENGTH属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: save

@Execute(name = "save", validates = {
        @Validate(validator = Validators.ID, parameter = "region", failureCode = 2),
        @Validate(validator = Validators.NOT_EMPTY, parameter = "detail", failureCode = 3),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "detail", failureCode = 4),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "postcode", failureCode = 5),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "name", failureCode = 12),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "phone", failureCode = 13),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "latitude", failureCode = 6),
        @Validate(validator = Validators.LATITUDE, emptyable = true, parameter = "latitude", failureCode = 7),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "longitude", failureCode = 8),
        @Validate(validator = Validators.LONGITUDE, emptyable = true, parameter = "longitude", failureCode = 9),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "label", failureCode = 10),
        @Validate(validator = Validators.BETWEEN, number = {0, 1}, parameter = "major", failureCode = 11),
        @Validate(validator = UserHelper.VALIDATOR_SIGN_IN),
        @Validate(validator = AddressService.VALIDATOR_UPDATABLE, emptyable = true, parameter = "id", failureCode = 1)
})
public Object save() {
    return addressService.save(request.setToModel(new AddressModel()));
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:19,代码来源:AddressCtrl.java

示例2: save

@Execute(name = "save", validates = {
        @Validate(validator = Validators.NOT_EMPTY, parameter = "key", failureCode = 2),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "key", failureCode = 3),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "name", failureCode = 4),
        @Validate(validator = Validators.NOT_EMPTY, parameter = "appId", failureCode = 5),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "appId", failureCode = 6),
        @Validate(validator = Validators.NOT_EMPTY, parameter = "secret", failureCode = 7),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "secret", failureCode = 8),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "token", failureCode = 9),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "mchId", failureCode = 10),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "mchKey", failureCode = 11),
        @Validate(validator = Validators.SIGN, string = {"ranch-weixin"}),
        @Validate(validator = WeixinService.VALIDATOR_NOT_EXISTS, parameters = {"key", "appId"}, failureCode = 12)

})
public Object save() {
    return weixinService.save(request.setToModel(new WeixinModel()));
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:18,代码来源:WeixinCtrl.java

示例3: remitIn

@Execute(name = "remit-in", validates = {
        @Validate(validator = Validators.MAX_LENGTH, number = {36}, parameter = "owner", failureCode = 1),
        @Validate(validator = Validators.BETWEEN, number = {0, 9}, parameter = "type", failureCode = 2),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "channel", failureCode = 3),
        @Validate(validator = Validators.GREATER_THAN, number = {0}, parameter = "amount", failureCode = 4),
        @Validate(validator = UserHelper.VALIDATOR_EXISTS_OR_SIGN_IN, parameter = "user", failureCode = 5)
})
public Object remitIn() {
    return execute(accountService.remitIn(request.get("user"), request.get("owner"), request.getAsInt("type"),
            request.get("channel"), request.getAsLong("amount")), 16, "remit-in");
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:11,代码来源:AccountCtrl.java

示例4: pass

@Execute(name = "pass", validates = {
        @Validate(validator = Validators.NOT_EMPTY, parameter = "user", failureCode = 1),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "memo", failureCode = 3),
        @Validate(validator = UserHelper.VALIDATOR_SIGN_IN),
        @Validate(validator = FriendService.VALIDATOR_EXISTS, parameter = "user", failureCode = 4)
})
public Object pass() {
    friendService.pass(request.get("user"), request.get("memo"));

    return "";
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:11,代码来源:FriendCtrl.java

示例5: save

@Execute(name = "save", validates = {
        @Validate(validator = Validators.ID, emptyable = true, parameter = "id", failureCode = 21),
        @Validate(validator = Validators.ID, parameter = "schema", failureCode = 22),
        @Validate(validator = Validators.ID, emptyable = true, parameter = "group", failureCode = 23),
        @Validate(validator = Validators.NOT_EMPTY, parameter = "name", failureCode = 24),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "name", failureCode = 25),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "memo", failureCode = 26),
        @Validate(validator = Validators.SIGN),
        @Validate(validator = SchemaService.VALIDATOR_EXISTS, parameter = "schema", failureCode = 29)
})
public Object save() {
    return tableService.save(request.setToModel(new TableModel()));
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:13,代码来源:TableCtrl.java

示例6: deposit

@Execute(name = "deposit", validates = {
        @Validate(validator = Validators.MAX_LENGTH, number = {36}, parameter = "owner", failureCode = 1),
        @Validate(validator = Validators.BETWEEN, number = {0, 9}, parameter = "type", failureCode = 2),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "channel", failureCode = 3),
        @Validate(validator = Validators.GREATER_THAN, number = {0}, parameter = "amount", failureCode = 4),
        @Validate(validator = UserHelper.VALIDATOR_EXISTS_OR_SIGN_IN, parameter = "user", failureCode = 5)
})
public Object deposit() {
    return execute(accountService.deposit(request.get("user"), request.get("owner"), request.getAsInt("type"),
            request.get("channel"), request.getAsLong("amount"), request.getMap()), 11, "deposit");
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:11,代码来源:AccountCtrl.java

示例7: save

@Execute(name = "save", validates = {
        @Validate(validator = Validators.NOT_EMPTY, parameter = "type", failureCode = 1),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "type", failureCode = 2),
        @Validate(validator = Validators.NOT_EMPTY, parameter = "id1", failureCode = 3),
        @Validate(validator = Validators.MAX_LENGTH, number = {36}, parameter = "id1", failureCode = 4),
        @Validate(validator = Validators.NOT_EMPTY, parameter = "id2", failureCode = 5),
        @Validate(validator = Validators.MAX_LENGTH, number = {36}, parameter = "id2", failureCode = 6)
})
public Object save() {
    return linkService.save(request.get("type"), request.get("id1"), request.get("id2"), request.getMap());
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:11,代码来源:LinkCtrl.java

示例8: modify

@Execute(name = "modify", validates = {
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, emptyable = true, parameter = "idcard", failureCode = 7),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, emptyable = true, parameter = "name", failureCode = 8),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, emptyable = true, parameter = "nick", failureCode = 9),
        @Validate(validator = Validators.MOBILE, emptyable = true, parameter = "mobile", failureCode = 10),
        @Validate(validator = Validators.EMAIL, emptyable = true, parameter = "email", failureCode = 11),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, emptyable = true, parameter = "email", failureCode = 12),
        @Validate(validator = Validators.BETWEEN, number = {0, 2}, emptyable = true, parameter = "gender", failureCode = 13),
        @Validate(validator = UserService.VALIDATOR_SIGN)
})
public Object modify() {
    userService.modify(request.setToModel(new UserModel()));

    return sign();
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:15,代码来源:UserCtrl.java

示例9: nick

@Execute(name = "nick", validates = {
        @Validate(validator = Validators.NOT_EMPTY, parameter = "id", failureCode = 23),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "nick", failureCode = 26),
        @Validate(validator = UserHelper.VALIDATOR_SIGN_IN),
        @Validate(validator = MemberService.VALIDATOR_EXISTS, parameter = "id", failureCode = 24),
        @Validate(validator = MemberService.VALIDATOR_SELF_OR_MANAGER, parameter = "id", failureCode = 27)
})
public Object nick() {
    memberService.nick(request.get("id"), request.get("nick"));

    return "";
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:12,代码来源:MemberCtrl.java

示例10: refund

@Execute(name = "refund", validates = {
        @Validate(validator = Validators.MAX_LENGTH, number = {36}, parameter = "owner", failureCode = 1),
        @Validate(validator = Validators.BETWEEN, number = {0, 9}, parameter = "type", failureCode = 2),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "channel", failureCode = 3),
        @Validate(validator = Validators.GREATER_THAN, number = {0}, parameter = "amount", failureCode = 4),
        @Validate(validator = UserHelper.VALIDATOR_EXISTS_OR_SIGN_IN, parameter = "user", failureCode = 5)
})
public Object refund() {
    return execute(accountService.refund(request.get("user"), request.get("owner"), request.getAsInt("type"),
            request.get("channel"), request.getAsLong("amount")), 18, "refund");
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:11,代码来源:AccountCtrl.java

示例11: name

@Execute(name = "name", validates = {
        @Validate(validator = Validators.NOT_EMPTY, parameter = "name", failureCode = 1),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "name", failureCode = 2),
        @Validate(validator = GroupService.VALIDATOR_OWNER, parameter = "id", failureCode = 5)
})
public Object name() {
    return groupService.name(request.get("id"), request.get("name"));
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:8,代码来源:GroupCtrl.java

示例12: note

@Execute(name = "note", validates = {
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "note", failureCode = 3),
        @Validate(validator = GroupService.VALIDATOR_OWNER, parameter = "id", failureCode = 5)
})
public Object note() {
    return groupService.note(request.get("id"), request.get("note"));
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:7,代码来源:GroupCtrl.java

示例13: signUp

@Execute(name = "sign-up", validates = {
        @Validate(validator = Validators.NOT_EMPTY, parameter = "uid", failureCode = 1),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "uid", failureCode = 2),
        @Validate(validator = UserService.VALIDATOR_PASSWORD, parameter = "password", failureCode = 3),
        @Validate(validator = Validators.BETWEEN, number = {0, 1}, parameter = "type", failureCode = 27),
        @Validate(validator = AuthService.VALIDATOR_UID_NOT_EXISTS, parameter = "uid", failureCode = 4)
})
public Object signUp() {
    userService.signUp(request.get("uid"), request.get("password"), UserService.Type.values()[request.getAsInt("type")]);

    return sign();
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:12,代码来源:UserCtrl.java

示例14: create

@Execute(name = "create", validates = {
        @Validate(validator = Validators.NOT_EMPTY, parameter = "code", failureCode = 2),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "code", failureCode = 3),
        @Validate(validator = Validators.NOT_EMPTY, parameter = "key", failureCode = 4),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "key", failureCode = 5),
        @Validate(validator = Validators.NOT_EMPTY, parameter = "name", failureCode = 6),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "name", failureCode = 7),
        @Validate(validator = Validators.SIGN),
        @Validate(validator = ClassifyService.VALIDATOR_CODE_KEY_NOT_EXISTS, parameters = {"code", "key"}, failureCode = 10)
})
public Object create() {
    return templates.get().success(classifyService.create(request.get("code"), request.get("key"), request.get("value"), request.get("name"), request.getMap()), null);
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:13,代码来源:ClassifyCtrl.java

示例15: pass

/**
 * 审核通过。
 * ids ID集,多个ID间以逗号分隔。
 * auditRemark 审核备注,可空。
 *
 * @return ""。
 */
@Execute(name = "pass", validates = {
        @Validate(validator = Validators.NOT_EMPTY, parameter = "ids", failureCode = 81),
        @Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "auditRemark", failureCode = 83),
        @Validate(validator = Validators.SIGN)
})
public Object pass() {
    getAuditService().pass(request.getAsArray("ids"), request.get("auditRemark"));

    return "";
}
 
开发者ID:heisedebaise,项目名称:ranch,代码行数:17,代码来源:AuditCtrlSupport.java


注:本文中的org.lpw.tephra.ctrl.validate.Validators.MAX_LENGTH属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。