1 package com.daffodilwoods.daffodildb.server.sql99.expression.expressionprimary; 2 3 import java.util.*; 4 5 import com.daffodilwoods.daffodildb.server.sql99.expression.rowvalueexpression.*; 6 import com.daffodilwoods.database.resource.*; 7 8 public class identifierchain extends AbstractRowValueExpression implements com.daffodilwoods.daffodildb.utils.parser.StatementExecuter { 9 10 public Speriod_991726143identifier[] _OptRepSperiod_991726143identifier0; 11 public identifier _identifier1; 12 13 public Object run(Object object) throws com.daffodilwoods.database.resource.DException { 14 if (_OptRepSperiod_991726143identifier0 != null) { 15 return gettingIdentifiers(object); 16 } 17 return new String [] { ( (String ) _identifier1.run(object))}; 18 } 19 20 private String [] gettingIdentifiers(Object object) throws DException { 21 int length = _OptRepSperiod_991726143identifier0.length; 22 ArrayList listOfIdentifiers = new ArrayList(length + 1); 23 listOfIdentifiers.add( ( (String ) _identifier1.run(object))); 24 for (int i = 0; i < length; i++) { 25 listOfIdentifiers.add( ( (String ) _OptRepSperiod_991726143identifier0[i].run(object))); 26 } 27 return (String []) listOfIdentifiers.toArray(new String [length + 1]); 28 } 29 30 public AbstractRowValueExpression[] getChilds() { 31 AbstractRowValueExpression[] childs = new AbstractRowValueExpression[] {}; 32 return childs; 33 34 } 35 36 public String toString() { 37 StringBuffer sb = new StringBuffer (); 38 sb.append(" "); 39 sb.append(_identifier1); 40 if (_OptRepSperiod_991726143identifier0 != null) { 41 for (int i = 0; i < _OptRepSperiod_991726143identifier0.length; i++) { 42 sb.append(_OptRepSperiod_991726143identifier0[i]); 43 } 44 } 45 else 46 sb.append(" "); 47 return sb.toString(); 48 } 49 50 public Object clone() throws CloneNotSupportedException { 51 identifierchain tempClass = new identifierchain(); 52 if (_OptRepSperiod_991726143identifier0 != null) { 53 Speriod_991726143identifier[] temp_OptRepSperiod_991726143identifier0 = new Speriod_991726143identifier[_OptRepSperiod_991726143identifier0.length]; 54 for (int i = 0; i < _OptRepSperiod_991726143identifier0.length; i++) { 55 temp_OptRepSperiod_991726143identifier0[i] = (Speriod_991726143identifier) _OptRepSperiod_991726143identifier0[i].clone(); 56 } 57 tempClass._OptRepSperiod_991726143identifier0 = temp_OptRepSperiod_991726143identifier0; 58 } 59 tempClass._identifier1 = (identifier) _identifier1.clone(); 60 return tempClass; 61 } 62 63 } 64 | Popular Tags |