Пример #1
0
 public String getType(ResizableArray<AttributeValue> leftBindAttrs) {
   StringBuilder buf = new StringBuilder();
   buf.append(get());
   for (int i = 0; i < leftBindAttrs.size(); i++) {
     AttributeValue av = leftBindAttrs.get(i);
     if (av == null) continue;
     buf.append(" ").append(av.get());
   }
   addDefaultValue(buf);
   return buf.toString();
 }
Пример #2
0
 private static ColumnDecl buildDecl(DataType dt, List<AttributeValue> attrs) {
   StringBuilder buf = new StringBuilder();
   List<AttributeValue> attrApplied = new ArrayList<AttributeValue>();
   ResizableArray<AttributeValue> leftBind = new ResizableArray<AttributeValue>();
   if (attrs != null) {
     for (AttributeValue p : attrs) {
       if (p.canApply(dt, attrApplied)) {
         if (p.getAttribute().getType().getOrder() > -1)
           leftBind.set(p.getAttribute().getType().getOrder(), p);
         attrApplied.add(p);
       }
     }
   }
   buf.append(dt.getType(leftBind));
   for (AttributeValue av : attrApplied) {
     if (av.isOrdered()) continue;
     buf.append(" ").append(av.get());
   }
   return new ColumnDecl(dt, attrApplied, buf.toString());
 }