code: public Environment getEnvironment()
      {
          if (this.getTask() != null)
          	if (this.getTask().getApplication() instanceof BaseApplication)
          		return ((BaseApplication)this.getTask().getApplication()).getEnvironment();
          return null;
      }
docs: Get the environment.
  From the database owner interface.
  @return The Environment.