File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
common/src/main/java/com/genexus Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ public Vector getStruct()
9999 return struct ;
100100 }
101101
102+ @ SuppressWarnings ("unchecked" )
102103 public ArrayList getExternalInstance () {
103104 ArrayList list = new ArrayList ();
104105 for (T Item : this )
@@ -115,5 +116,23 @@ public ArrayList getExternalInstance() {
115116 return list ;
116117 }
117118
119+ @ SuppressWarnings ("unchecked" )
120+ public void setExternalInstance (ArrayList <?> data )
121+ {
122+ try {
123+ clear ();
124+ for (Object item : data ) {
125+ T obj = elementsType .getConstructor (new Class []{}).newInstance ();
126+ obj .getClass ().getMethod ("setExternalInstance" , item .getClass ()).invoke (obj , item );
127+ super .add (obj );
128+ vectorExternal .add (item );
129+ }
130+ }
131+ catch (Exception ex )
132+ {
133+ ex .printStackTrace ();
134+ }
135+ }
136+
118137}
119138
You can’t perform that action at this time.
0 commit comments