Package org.joda.beans

Examples of org.joda.beans.Bean.property()


        ComputationTarget computationTarget = _computationTargetResolver.resolve(targetSpec, VersionCorrection.LATEST);
        Object targetValue = computationTarget.getValue();
        if (targetValue instanceof Bean) {
          Bean bean = (Bean) targetValue;
          for (String propertyName : bean.propertyNames()) {
            Property<Object> property = bean.property(propertyName);
            final long targetPropertyId = nextId(RSK_SEQUENCE_NAME);
            targetProperties.add(getTargetPropertyArgs(targetPropertyId, computationTargetId, propertyName, property.get() == null ? "NULL" : property.get().toString()));
          }
        }
      }
View Full Code Here


  public static <T> ConfigItem<T> of(final T object) {
    final ConfigItem<T> item = new ConfigItem<T>(object);
    if (object instanceof Bean) {
      final Bean bean = (Bean) object;
      if (bean.metaBean().metaPropertyExists("name")) {
        item.setName(ObjectUtils.toString(bean.property("name").get(), null));
      }
    } else if (object != null) {
      try {
        item.setName((String) object.getClass().getMethod("getName").invoke(object));
      } catch (final Exception ex) {
View Full Code Here

  public static Bean withPagingRequest(final Bean requestBean, final PagingRequest pagingRequest) {
    if (requestBean.propertyNames().contains("pagingRequest")) {
      final Bean newRequest = JodaBeanUtils.clone(requestBean);
      if (pagingRequest != null) {
        newRequest.property("pagingRequest").set(
            PagingRequest.ofIndex(pagingRequest.getFirstItem(), pagingRequest.getPagingSize()));
      } else {
        newRequest.property("pagingRequest").set(null);
      }
      return newRequest;
View Full Code Here

      final Bean newRequest = JodaBeanUtils.clone(requestBean);
      if (pagingRequest != null) {
        newRequest.property("pagingRequest").set(
            PagingRequest.ofIndex(pagingRequest.getFirstItem(), pagingRequest.getPagingSize()));
      } else {
        newRequest.property("pagingRequest").set(null);
      }
      return newRequest;
    } else {
      throw new OpenGammaRuntimeException(
          "Could not invoke setPagingRequest() on request object of type " + requestBean.getClass());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.