Klasse Options

java.lang.Object
org.apache.torque.generator.option.Options

public class Options extends Object
A Store for all options.
  • Konstruktordetails

    • Options

      public Options()
  • Methodendetails

    • setGlobalOption

      public void setGlobalOption(Option option)
      Sets an option with global scope.
      Parameter:
      option - the option to set, not null.
      Löst aus:
      NullPointerException - if option is null.
    • addGlobalOptions

      public void addGlobalOptions(Collection<Option> options)
      Adds several options with global scope.
      Parameter:
      options - the option to add, not null, may not contain null.
      Löst aus:
      NullPointerException - if options is null or contains null.
    • getInHierarchy

      public Option getInHierarchy(QualifiedName key)
      Returns the value of the option which is closest in Hierarchy. If more than one matching options (options with the matching name and in the name space or parent name space of the key) are found, the one which name space is closer to the given key's name space is chosen.
      Parameter:
      key - the key for the option which value should be retrieved.
      Gibt zurück:
      the value of the option (can be null), or null if no matching option exists.
    • getInHierarchy

      public Options getInHierarchy(Namespace namespace)
      Returns all mappings which live in the given name space. If one mapping hides another mapping, i.e. if one mapping is a more specialized version of another, the hidden mapping is NOT returned.
      Parameter:
      namespace - the name space from which the returned options should be visible.
      Gibt zurück:
      an Options object containing the matching options
    • getAllInHierarchy

      public Options getAllInHierarchy(Namespace namespace)
      Returns all mappings which live in the given namespace. If one mapping hides another mapping, i.e. if one mapping is a more specialized version of another, both mappings are present in the returned map.
      Parameter:
      namespace - the name space from which the returned options should be visible.
      Gibt zurück:
      an Options object containing the matching options
    • values

      public Collection<Option> values()
      Returns all options in a Collection.
      Gibt zurück:
      a Collection containing all options, not null. The collection is unmodifiable.
    • keySet

      public Collection<QualifiedName> keySet()
      Returns all options in a set.
      Gibt zurück:
      a Collection containing the qualified names of all options, not null.
    • getGlobalScope

      public Map<QualifiedName,Option> getGlobalScope()
      Returns a map containing all options in the global scope. The key of the map is the key of the option, the value is the option itself.
      Gibt zurück:
      a map containing the options in global scope, not null.
    • containsKey

      public boolean containsKey(QualifiedName key)
      Checks if an option with the given key exists in any scope.
      Parameter:
      key - the key to check.
      Gibt zurück:
      true if the key exists, false otherwise.
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object