Examples of CtCompoundTypeScalarList


Examples of com.avaje.ebeaninternal.server.type.CtCompoundTypeScalarList

      // represents the root property
      BeanPropertyCompoundRoot rootProperty = new BeanPropertyCompoundRoot(this);
     
      // Walk the tree of a compound type collecting the
      // scalar types and non-scalar properties
      CtCompoundTypeScalarList ctMeta = new CtCompoundTypeScalarList();
     
      compoundType.accumulateScalarTypes(null, ctMeta);
     
      List<BeanProperty> beanPropertyList = new ArrayList<BeanProperty>();
     
     
      // for each of the scalar types inside a compound value object
      // build a BeanPropertyCompoundScalar with appropriate deployment
      // information.
     
      for (Entry<String, ScalarType<?>> entry : ctMeta.entries()) {

          String relativePropertyName = entry.getKey();
          ScalarType<?> scalarType = entry.getValue();
         
          CtCompoundProperty ctProp = ctMeta.getCompoundType(relativePropertyName);
         
         
          String dbColumn = relativePropertyName.replace(".", "_");
          dbColumn = getDbColumn(relativePropertyName, dbColumn);
         
          DeployBeanProperty deploy = new DeployBeanProperty(null, scalarType.getType(), scalarType, null);
          deploy.setScalarType(scalarType);
          deploy.setDbColumn(dbColumn);
          deploy.setName(relativePropertyName);
          deploy.setDbInsertable(true);
          deploy.setDbUpdateable(true);
          deploy.setDbRead(true);
         
          BeanPropertyCompoundScalar bp = new BeanPropertyCompoundScalar(rootProperty, deploy, ctProp, typeConverter);
          beanPropertyList.add(bp);
         
          rootProperty.register(bp);
      }
     
      rootProperty.setNonScalarProperties(ctMeta.getNonScalarProperties());
      return rootProperty;
  }
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.