@SuppressWarnings({"unchecked"})
 protected void ensureModelsLoaded() {
   if (_modelStats == null) {
     _modelStats = new NSMutableDictionary<String, SEModelStats>();
     for (EOModel model : (NSArray<EOModel>) _modelGroup.models()) {
       SEModelStats modelStats = new SEModelStats(model);
       _modelStats.setObjectForKey(modelStats, model.name());
     }
   }
 }
Exemple #2
0
 private EOEntity entityForTableName(String tableName) {
   EOModelGroup modelGroup = EOModelGroup.globalModelGroup();
   for (EOModel model : modelGroup.models()) {
     for (EOEntity entity : model.entities()) {
       if (entity.externalName() != null && entity.externalName().equalsIgnoreCase(tableName)) {
         return entity;
       }
     }
   }
   return null;
 }