本文整理汇总了Java中net.sourceforge.stripes.validation.ValidateNestedProperties类的典型用法代码示例。如果您正苦于以下问题:Java ValidateNestedProperties类的具体用法?Java ValidateNestedProperties怎么用?Java ValidateNestedProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ValidateNestedProperties类属于net.sourceforge.stripes.validation包,在下文中一共展示了ValidateNestedProperties类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUser
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(on = {"accept"},
field = "name",
required = true,
minlength = 5,
maxlength = 20),
@Validate(on = {"accept"},
field = "password",
required = true,
minlength = 5,
maxlength = 20),
@Validate(on = {"accept"},
field = "visible",
required = true,
converter = BooleanTypeConverter.class),
@Validate(on = {"accept"},
field = "role.id",
required = true)})
@Override
public void setUser(User user) {
super.setUser(user);
}
示例2: setCategory
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(on = {"form", "update", "delete"},
field = "id",
required = true,
converter = StringTypeConverter.class),
@Validate(on = {"update"},
field = "name",
required = true,
trim = true,
maxlength = 255),
@Validate(on = {"update"},
field = "code",
trim = true,
maxlength = 4)
})
@Override
public void setCategory(ProductCategory category) {
super.setCategory(category);
}
示例3: setCategory
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(on = "add",
field = "name",
required = true,
trim = true,
maxlength = 255),
@Validate(field = "code",
required = true,
trim = true,
maxlength = 4,
mask = "[0-9]+")
})
@Override
public void setCategory(ProductCategory category) {
super.setCategory(category);
}
示例4: setProduct
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(field = "code",
required = true,
trim = true)
})
@Override
public void setProduct(Product product) {
super.setProduct(product);
}
示例5: setCustomer
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(on = {"login"},
field = "name",
required = true,
minlength = 5,
maxlength = 20)})
@Override
public void setCustomer(Customer customer) {
super.setCustomer(customer);
}
示例6: setPayment
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(on = {"accept", "post"},
field = "type",
required = true,
trim = true,
expression = "${type == 'cash' || type == 'magcard'}"),
@Validate(on = {"accept", "post"},
field = "amount",
required = true,
trim = true,
expression = "${(type == 'cash' && amount >= context.order.totalValue) || (type == 'magcard' && amount == context.order.totalValue)}")})
public void setPayment(Payment payment) {
this.payment = payment;
}
示例7: setTicket
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(field = "id",
required = true,
trim = true)
})
public void setTicket(Ticket ticket) {
this.ticket = ticket;
}
示例8: setCategory
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(field = "id",
required = true,
converter = StringTypeConverter.class)
})
@Override
public void setCategory(ProductCategory category) {
super.setCategory(category);
}
示例9: setCustomer
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(on = {"accept"},
field = "name",
required = true,
minlength = 5,
maxlength = 20),
@Validate(on = {"accept"},
field = "password",
required = true,
minlength = 5,
maxlength = 20)})
@Override
public void setCustomer(Customer customer) {
super.setCustomer(customer);
}
示例10: setPlace
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(on = "add",
field = "id",
required = true,
trim = true)
})
@Override
public void setPlace(Place place) {
super.setPlace(place);
}
示例11: setUser
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(on = {"login"},
field = "name",
required = true,
minlength = 5,
maxlength = 20)})
@Override
public void setUser(User user) {
super.setUser(user);
}
示例12: setProduct
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(on = {"form", "update", "delete"},
field = "id",
required = true,
converter = StringTypeConverter.class),
@Validate(on = {"update"},
field = "name",
required = true,
trim = true,
maxlength = 255),
@Validate(on = {"update"},
field = "code",
required = true,
trim = true,
minlength = 13,
maxlength = 13,
mask = "[0-9]+"),
@Validate(on = {"update"},
field = "taxPriceSell",
required = true,
converter = BigDecimalTypeConverter.class),
@Validate(on = {"update"},
field = "priceBuy",
required = true,
converter = BigDecimalTypeConverter.class),
@Validate(on = {"update"},
field = "productCategory.id",
required = true,
converter = StringTypeConverter.class)
})
@Override
public void setProduct(Product product) {
super.setProduct(product);
}
示例13: setProduct
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(on = {"add"},
field = "name",
required = true,
trim = true,
maxlength = 255),
@Validate(on = {"add"},
field = "code",
required = true,
trim = true,
minlength = 13,
maxlength = 13,
mask = "[0-9]+"),
@Validate(on = {"add"},
field = "reference",
required = true,
trim = true),
@Validate(on = {"add"},
field = "priceSell",
required = true,
converter = BigDecimalTypeConverter.class),
@Validate(on = {"add"},
field = "priceBuy",
required = true,
converter = BigDecimalTypeConverter.class),
@Validate(field = "productCategory.id",
required = true,
converter = StringTypeConverter.class)
})
@Override
public void setProduct(Product product) {
super.setProduct(product);
}
示例14: getAccountingAccount
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(on="save", field="code", required=true, maxlength=50),
@Validate(on="save", field="description", required=true, maxlength=100),
})
public AccountingAccount getAccountingAccount() {
return account;
}
示例15: getUser
import net.sourceforge.stripes.validation.ValidateNestedProperties; //导入依赖的package包/类
@ValidateNestedProperties({
@Validate(field="email", required=true, on="save", maxlength=200, converter=EmailTypeConverter.class),
@Validate(field="firstName", required=true, on="save", maxlength=64),
@Validate(field="lastName", required=true, on="save", maxlength=64),
@Validate(field="password",required=true, on="save", minlength=6, maxlength=20)
})
public User getUser() {
return user;
}