1 28 29 package ist.coach.coachEmfServicesComponents.BasicLogProviderComposition; 30 31 import ist.coach.coachEmfCommon.LogAttributeValueChangeFactory; 32 import ist.coach.coachEmfCommon.LogThresholdAlarmFactory; 33 import ist.coach.coachEmfCommon.NamePrimaryKeyFactory; 34 import ist.coach.coachEmfCommon.LogNewRecordFactory; 35 36 import ist.coach.coachEmfServicesComponents.BasicLogProvider; 37 40 import ist.coach.coachEmfServicesComponents.BasicLogProviderComposition.*; 41 42 import java.util.Vector ; 43 import java.util.Enumeration ; 44 53 public class BasicLogProviderHomeImpl 54 extends ist.coach.coachEmfServicesComponents.BasicLogProviderComposition.BasicLogProviderSimpleHome_impl 55 { 56 private Vector allExistingLogs_; 62 63 64 69 71 public BasicLogProviderHomeImpl() 72 { 73 allExistingLogs_ = new Vector (); 74 } 75 76 82 91 public org.omg.Components.ExecutorSegmentBase 92 create_executor_segment(int segid) 93 { 94 95 96 switch (segid) 97 { 98 case ist.coach.coachEmfServicesComponents.BasicLogProviderComposition.basicLogSegImpl._segment_id_value : 99 100 return new ist.coach.coachEmfServicesComponents.BasicLogProviderComposition.basicLogSegImpl(); 101 default : 102 ist.coach.coachEmfServicesComponents.BasicLogProviderComposition.BasicLogProviderImpl new_logProvider = 103 new ist.coach.coachEmfServicesComponents.BasicLogProviderComposition.BasicLogProviderImpl(); 104 105 return new_logProvider; 106 } 107 } 108 118 124 public static org.omg.Components.HomeExecutorBase 125 create_home() 126 { 127 128 BasicLogProviderHomeImpl home = new BasicLogProviderHomeImpl(); 129 return home; 130 } 131 132 133 136 public ist.coach.coachEmfServices.EmfBasicLog.BasicLog[] 137 list_logs() 138 { 139 ist.coach.coachEmfServices.EmfBasicLog.BasicLog[] logs_list = 143 new ist.coach.coachEmfServices.EmfBasicLog.BasicLog[allExistingLogs_.size()]; 144 145 for(int i = 0; i < logs_list.length; i++) 146 logs_list[i] = ((BasicLogProvider) allExistingLogs_.elementAt(i)).provide_i_BasicLog(); 147 149 return logs_list; 150 } 151 152 153 156 public int[] 157 list_logs_by_id() 158 { 159 int[] logs_by_id = new int[allExistingLogs_.size()]; 163 int i = 0; 164 for (Enumeration e = allExistingLogs_.elements() ; e.hasMoreElements() && 165 i < logs_by_id.length ; i++) { 166 logs_by_id[i] = ((BasicLogProvider) e.nextElement()).logId(); 167 168 } 169 170 return logs_by_id; 171 } 172 173 174 static { 177 178 LogAttributeValueChangeFactory.register(); 179 LogThresholdAlarmFactory.register(); 180 NamePrimaryKeyFactory.register(); 181 LogNewRecordFactory.register(); 182 183 } 184 185 } 186 | Popular Tags |