本文整理汇总了Java中nl.strohalm.cyclos.utils.Amount.Type类的典型用法代码示例。如果您正苦于以下问题:Java Type类的具体用法?Java Type怎么用?Java Type使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Type类属于nl.strohalm.cyclos.utils.Amount包,在下文中一共展示了Type类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDataBinder
import nl.strohalm.cyclos.utils.Amount.Type; //导入依赖的package包/类
public DataBinder<Collection<DefaultBrokerCommissionDTO>> getDataBinder() {
if (dataBinder == null) {
final LocalSettings localSettings = settingsService.getLocalSettings();
final BeanBinder<DefaultBrokerCommissionDTO> beanBinder = BeanBinder.instance(DefaultBrokerCommissionDTO.class);
beanBinder.registerBinder("id", PropertyBinder.instance(Long.class, "id", IdConverter.instance()));
beanBinder.registerBinder("brokerCommission", PropertyBinder.instance(BrokerCommission.class, "brokerCommission"));
beanBinder.registerBinder("type", PropertyBinder.instance(Type.class, "type"));
beanBinder.registerBinder("value", PropertyBinder.instance(BigDecimal.class, "value", localSettings.getNumberConverter()));
beanBinder.registerBinder("count", PropertyBinder.instance(Integer.class, "count"));
beanBinder.registerBinder("when", PropertyBinder.instance(BrokerCommission.When.class, "when"));
final BeanCollectionBinder<DefaultBrokerCommissionDTO> defaultBrokerCommissionsBinder = BeanCollectionBinder.instance(beanBinder, ArrayList.class);
dataBinder = defaultBrokerCommissionsBinder;
}
return dataBinder;
}
示例2: prepareForm
import nl.strohalm.cyclos.utils.Amount.Type; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
protected void prepareForm(final ActionContext context) throws Exception {
final HttpServletRequest request = context.getRequest();
if (!context.isBroker()) {
throw new ValidationException();
}
final Member broker = (Member) context.getElement();
final BrokerGroup brokerGroup = (BrokerGroup) broker.getGroup();
// Get broker commission transaction fees (from member) related to the broker group, including the not enabled ones
final TransactionFeeQuery transactionFeeQuery = new TransactionFeeQuery();
transactionFeeQuery.setEntityType(BrokerCommission.class);
transactionFeeQuery.setGeneratedTransferTypeFromNature(AccountType.Nature.MEMBER);
transactionFeeQuery.setBrokerGroup(brokerGroup);
transactionFeeQuery.setReturnDisabled(true);
final List<BrokerCommission> groupCommissions = (List<BrokerCommission>) transactionFeeService.search(transactionFeeQuery);
// Get current default broker commissions
final List<DefaultBrokerCommission> currentDefaults = commissionService.loadDefaultBrokerCommissions(broker, DefaultBrokerCommission.Relationships.BROKER_COMMISSION);
// Prepare list to JSP
final List<DefaultBrokerCommission> defaultBrokerCommissions = buildCommissions(groupCommissions, currentDefaults);
request.setAttribute("broker", broker);
request.setAttribute("defaultBrokerCommissions", defaultBrokerCommissions);
RequestHelper.storeEnum(request, BrokerCommission.When.class, "whens");
RequestHelper.storeEnum(request, Amount.Type.class, "amountTypes");
}
示例3: getType
import nl.strohalm.cyclos.utils.Amount.Type; //导入依赖的package包/类
public Type getType() {
return type;
}
示例4: setType
import nl.strohalm.cyclos.utils.Amount.Type; //导入依赖的package包/类
public void setType(final Type type) {
this.type = type;
}