コード例 #1
0
 @Override
 public IGxObject getGxObject(String name) {
   GxObjectDefinition objDef = MyApplication.getInstance().getGxObject(name);
   if (objDef != null && objDef.getConnectivitySupport() == Connectivity.Online)
     return mRemoteServer.getGxObject(name);
   if (objDef != null && objDef.getConnectivitySupport() == Connectivity.Offline)
     return mLocalServer.getGxObject(name);
   // Inherit
   return getDefaultServer().getGxObject(name);
 }
コード例 #2
0
  @Override
  public IBusinessComponent getBusinessComponent(String name) {
    StructureDefinition objDef = MyApplication.getInstance().getBusinessComponent(name);
    if (objDef != null && objDef.getConnectivitySupport() == Connectivity.Online)
      return mRemoteServer.getBusinessComponent(name);
    if (objDef != null && objDef.getConnectivitySupport() == Connectivity.Offline)
      return mLocalServer.getBusinessComponent(name);

    return getDefaultServer().getBusinessComponent(name);
  }